Package org.apache.pivot.wtk.skin.terra
Class TerraAlertSkin
- java.lang.Object
-
- All Implemented Interfaces:
AlertListener
,ComponentKeyListener
,ComponentListener
,ComponentMouseButtonListener
,ComponentMouseListener
,ComponentMouseWheelListener
,ComponentStateListener
,ComponentTooltipListener
,ConstrainedVisual
,ContainerListener
,ContainerMouseListener
,DialogCloseListener
,DialogListener
,DialogStateListener
,FrameListener
,Skin
,Visual
,Window.Skin
,WindowListener
,WindowStateListener
public class TerraAlertSkin extends TerraDialogSkin implements AlertListener
Alert skin.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.skin.terra.TerraFrameSkin
TerraFrameSkin.ButtonImage, TerraFrameSkin.CloseImage, TerraFrameSkin.FrameButton, TerraFrameSkin.FrameButtonSkin, TerraFrameSkin.MaximizeImage, TerraFrameSkin.MinimizeImage, TerraFrameSkin.ResizeImage, TerraFrameSkin.RestoreImage
-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.skin.ContainerSkin
ContainerSkin.IndexFocusTraversalPolicy
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.AlertListener
AlertListener.Adapter, AlertListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentKeyListener
ComponentKeyListener.Adapter, ComponentKeyListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentListener
ComponentListener.Adapter, ComponentListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseButtonListener
ComponentMouseButtonListener.Adapter, ComponentMouseButtonListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseListener
ComponentMouseListener.Adapter, ComponentMouseListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseWheelListener
ComponentMouseWheelListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentStateListener
ComponentStateListener.Adapter, ComponentStateListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentTooltipListener
ComponentTooltipListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerListener
ContainerListener.Adapter, ContainerListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerMouseListener
ContainerMouseListener.Adapter, ContainerMouseListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.DialogListener
DialogListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.DialogStateListener
DialogStateListener.Adapter, DialogStateListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.FrameListener
FrameListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.WindowListener
WindowListener.Adapter, WindowListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.WindowStateListener
WindowStateListener.Adapter, WindowStateListener.Listeners
-
-
Field Summary
-
Fields inherited from class org.apache.pivot.wtk.skin.terra.TerraFrameSkin
ALPHA
-
-
Constructor Summary
Constructors Constructor Description TerraAlertSkin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bodyChanged(Alert alert, Component previousBody)
Called when an alert's body has changed.void
dialogClosed(Dialog dialog, boolean modal)
Called when a dialog has closed.java.awt.Color
getBorderBackgroundColor()
java.awt.Color
getBorderColor()
void
install(Component component)
Must be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.void
messageChanged(Alert alert, java.lang.String previousMessage)
Called when an alert's message has changed.void
messageTypeChanged(Alert alert, MessageType previousMessageType)
Called when an alert's message type has changed.void
optionInserted(Alert alert, int index)
Called when an option has been inserted into an alert's option sequence.void
optionsRemoved(Alert alert, int index, Sequence<?> removed)
Called when options have been removed from an alert's option sequence.Vote
previewWindowOpen(Window window)
Called to preview a window open event.void
selectedOptionChanged(Alert alert, int previousSelectedOption)
Called when an alert's selected option has changed.void
setBorderBackgroundColor(int borderBackgroundColor)
void
setBorderBackgroundColor(java.awt.Color borderBackgroundColor)
void
setBorderBackgroundColor(java.lang.String borderBackgroundColor)
void
setBorderColor(int borderColor)
void
setBorderColor(java.awt.Color borderColor)
void
setBorderColor(java.lang.String borderColor)
void
windowOpened(Window window)
Called when a window has opened.-
Methods inherited from class org.apache.pivot.wtk.skin.terra.TerraDialogSkin
dialogCloseVetoed, keyPressed, modalChanged, mouseDown, previewDialogClose, windowClosed
-
Methods inherited from class org.apache.pivot.wtk.skin.terra.TerraFrameSkin
activeChanged, getClientArea, getPadding, getPreferredHeight, getPreferredSize, getPreferredWidth, getShowCloseButton, getShowContentBevel, getShowMaximizeButton, getShowMinimizeButton, getShowWindowControls, iconAdded, iconsRemoved, isResizable, layout, maximizedChanged, menuBarChanged, mouseDown, mouseMove, mouseUp, paint, setBackgroundColor, setPadding, setPadding, setPadding, setPadding, setPadding, setPadding, setResizable, setShowCloseButton, setShowContentBevel, setShowMaximizeButton, setShowMinimizeButton, setShowWindowControls, titleChanged
-
Methods inherited from class org.apache.pivot.wtk.skin.WindowSkin
contentChanged
-
Methods inherited from class org.apache.pivot.wtk.skin.ContainerSkin
componentInserted, componentMoved, componentsRemoved, focusTraversalPolicyChanged, getBackgroundColor, getBackgroundPaint, isFocusable, isOpaque, mouseMove, mouseUp, mouseWheel, setBackgroundColor, setBackgroundColor, setBackgroundPaint, setBackgroundPaint, setBackgroundPaint
-
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin
colorFromObject, colorFromObject, colorFromObject, colorFromObject, currentTheme, cursorChanged, decodeFont, defaultBackgroundColor, defaultForegroundColor, dragSourceChanged, dropTargetChanged, enabledChanged, focusedChanged, fontFromObject, getBaseline, getBaseline, getColor, getComponent, getFocusRectangleStroke, getHeight, getSize, getTextInputMethodListener, getThemeFont, getWidth, heightLimitsChanged, invalidateComponent, keyReleased, keyTyped, locationChanged, menuHandlerChanged, mouseClick, mouseOut, mouseOver, mouseWheel, nameChanged, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setDefaultStyles, setSize, sizeChanged, themeHasThickFocusRectangle, themeHasTransitionEnabled, themeIsDark, themeIsFlat, tooltipDelayChanged, tooltipTextChanged, tooltipTriggered, visibleChanged, widthLimitsChanged
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisual
getBaseline, setSize, setSize
-
Methods inherited from interface org.apache.pivot.wtk.Skin
getComponent, isFocusable, isOpaque
-
Methods inherited from interface org.apache.pivot.wtk.Visual
getBaseline, getHeight, getSize, getWidth
-
Methods inherited from interface org.apache.pivot.wtk.WindowListener
iconInserted
-
Methods inherited from interface org.apache.pivot.wtk.WindowStateListener
previewWindowClose, windowCloseVetoed, windowOpenVetoed
-
-
-
-
Method Detail
-
install
public void install(Component component)
Description copied from class:ComponentSkin
Must be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.- Specified by:
install
in interfaceSkin
- Overrides:
install
in classTerraDialogSkin
- Parameters:
component
- The component to which the skin is being attached.
-
windowOpened
public void windowOpened(Window window)
Description copied from interface:WindowStateListener
Called when a window has opened.- Specified by:
windowOpened
in interfaceWindowStateListener
- Overrides:
windowOpened
in classTerraDialogSkin
- Parameters:
window
- The newly opened window.
-
messageTypeChanged
public void messageTypeChanged(Alert alert, MessageType previousMessageType)
Description copied from interface:AlertListener
Called when an alert's message type has changed.- Specified by:
messageTypeChanged
in interfaceAlertListener
- Parameters:
alert
- The alert that has changed.previousMessageType
- The previous message type for the alert.
-
messageChanged
public void messageChanged(Alert alert, java.lang.String previousMessage)
Description copied from interface:AlertListener
Called when an alert's message has changed.- Specified by:
messageChanged
in interfaceAlertListener
- Parameters:
alert
- The alert that has changed.previousMessage
- The previous message for this alert.
-
bodyChanged
public void bodyChanged(Alert alert, Component previousBody)
Description copied from interface:AlertListener
Called when an alert's body has changed.- Specified by:
bodyChanged
in interfaceAlertListener
- Parameters:
alert
- The alert that has changed.previousBody
- The previous body for this alert.
-
optionInserted
public void optionInserted(Alert alert, int index)
Description copied from interface:AlertListener
Called when an option has been inserted into an alert's option sequence.- Specified by:
optionInserted
in interfaceAlertListener
- Parameters:
alert
- The alert that has changed.index
- The index where the new option was inserted.
-
optionsRemoved
public void optionsRemoved(Alert alert, int index, Sequence<?> removed)
Description copied from interface:AlertListener
Called when options have been removed from an alert's option sequence.- Specified by:
optionsRemoved
in interfaceAlertListener
- Parameters:
alert
- The alert that has changed.index
- The starting index where the options were removed.removed
- The actual sequence of the options that were removed.
-
selectedOptionChanged
public void selectedOptionChanged(Alert alert, int previousSelectedOption)
Description copied from interface:AlertListener
Called when an alert's selected option has changed.- Specified by:
selectedOptionChanged
in interfaceAlertListener
- Parameters:
alert
- The alert that has changed.previousSelectedOption
- The index of the previously selected option.
-
previewWindowOpen
public Vote previewWindowOpen(Window window)
Description copied from interface:WindowStateListener
Called to preview a window open event.- Specified by:
previewWindowOpen
in interfaceWindowStateListener
- Parameters:
window
- The window that wants to open.- Returns:
- The vote from the listener as to whether to allow the open.
-
dialogClosed
public void dialogClosed(Dialog dialog, boolean modal)
Description copied from interface:DialogCloseListener
Called when a dialog has closed.- Specified by:
dialogClosed
in interfaceDialogCloseListener
- Specified by:
dialogClosed
in interfaceDialogStateListener
- Overrides:
dialogClosed
in classTerraDialogSkin
- Parameters:
dialog
- The dialog that has been closed.modal
- Whether this was a modal dialog or not.
-
setBorderBackgroundColor
public void setBorderBackgroundColor(java.awt.Color borderBackgroundColor)
-
setBorderBackgroundColor
public final void setBorderBackgroundColor(java.lang.String borderBackgroundColor)
-
setBorderBackgroundColor
public final void setBorderBackgroundColor(int borderBackgroundColor)
-
getBorderBackgroundColor
public java.awt.Color getBorderBackgroundColor()
-
setBorderColor
public void setBorderColor(java.awt.Color borderColor)
-
setBorderColor
public final void setBorderColor(java.lang.String borderColor)
-
setBorderColor
public final void setBorderColor(int borderColor)
-
getBorderColor
public java.awt.Color getBorderColor()
-
-