Package org.apache.pivot.wtk.skin.terra
Class TerraDialogSkin
- java.lang.Object
-
- org.apache.pivot.wtk.skin.ComponentSkin
-
- org.apache.pivot.wtk.skin.ContainerSkin
-
- org.apache.pivot.wtk.skin.WindowSkin
-
- org.apache.pivot.wtk.skin.terra.TerraFrameSkin
-
- org.apache.pivot.wtk.skin.terra.TerraDialogSkin
-
- All Implemented Interfaces:
ComponentKeyListener
,ComponentListener
,ComponentMouseButtonListener
,ComponentMouseListener
,ComponentMouseWheelListener
,ComponentStateListener
,ComponentTooltipListener
,ConstrainedVisual
,ContainerListener
,ContainerMouseListener
,DialogCloseListener
,DialogListener
,DialogStateListener
,FrameListener
,Skin
,Visual
,Window.Skin
,WindowListener
,WindowStateListener
- Direct Known Subclasses:
TerraAlertSkin
public class TerraDialogSkin extends TerraFrameSkin implements DialogListener, DialogStateListener
Dialog 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.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 TerraDialogSkin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dialogClosed(Dialog dialog, boolean modal)
Called when a dialog has closed.void
dialogCloseVetoed(Dialog dialog, Vote reason)
Called when a dialog close event has been vetoed.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.boolean
keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
void
modalChanged(Dialog dialog)
Called when a dialog's modal flag has changed.boolean
mouseDown(Container container, Mouse.Button button, int x, int y)
Called when the mouse is pressed over a container.Vote
previewDialogClose(Dialog dialog, boolean result)
Called to preview a dialog close event.void
windowClosed(Window window, Display display, Window owner)
Called when a window has closed.void
windowOpened(Window window)
Called when a window has opened.-
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, previewWindowOpen, 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 classTerraFrameSkin
- Parameters:
component
- The component to which the skin is being attached.
-
mouseDown
public boolean mouseDown(Container container, Mouse.Button button, int x, int y)
Description copied from interface:ContainerMouseListener
Called when the mouse is pressed over a container.- Specified by:
mouseDown
in interfaceContainerMouseListener
- Overrides:
mouseDown
in classWindowSkin
- Parameters:
container
- The container under the mouse.button
- Which button was pressed.x
- The X-position of the mouse.y
- The Y-position of the mouse.- Returns:
true
to consume the event;false
to allow it to propagate.
-
keyPressed
public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
- Specified by:
keyPressed
in interfaceComponentKeyListener
- Overrides:
keyPressed
in classTerraFrameSkin
- Parameters:
component
- Component that has the focus.keyCode
- The key code for the key that was pressed.keyLocation
- Location value for the key (left or right for shift keys, etc.).- Returns:
true
to consume the event;false
to allow it to propagate.
-
windowOpened
public void windowOpened(Window window)
Description copied from interface:WindowStateListener
Called when a window has opened.- Specified by:
windowOpened
in interfaceWindowStateListener
- Parameters:
window
- The newly opened window.
-
windowClosed
public void windowClosed(Window window, Display display, Window owner)
Description copied from interface:WindowStateListener
Called when a window has closed.- Specified by:
windowClosed
in interfaceWindowStateListener
- Overrides:
windowClosed
in classWindowSkin
- Parameters:
window
- The window that is now closed.display
- The display in which the window was shown.owner
- The owner of this window (which could benull
).
-
modalChanged
public void modalChanged(Dialog dialog)
Description copied from interface:DialogListener
Called when a dialog's modal flag has changed.- Specified by:
modalChanged
in interfaceDialogListener
- Parameters:
dialog
- The dialog that has changed.
-
previewDialogClose
public Vote previewDialogClose(Dialog dialog, boolean result)
Description copied from interface:DialogStateListener
Called to preview a dialog close event.- Specified by:
previewDialogClose
in interfaceDialogStateListener
- Parameters:
dialog
- The dialog that is requesting to close.result
- The result flag (true
means "OK", whilefalse
roughly means "Cancel").- Returns:
- The consensus vote as to whether or not to allow the close to occur.
-
dialogCloseVetoed
public void dialogCloseVetoed(Dialog dialog, Vote reason)
Description copied from interface:DialogStateListener
Called when a dialog close event has been vetoed.- Specified by:
dialogCloseVetoed
in interfaceDialogStateListener
- Parameters:
dialog
- The dialog that is not going to close because of this veto.reason
- The vote result that indicates the veto.
-
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
- Parameters:
dialog
- The dialog that has been closed.modal
- Whether this was a modal dialog or not.
-
-