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.
Method Summary |
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)
Associates a skin with a component. |
boolean |
keyPressed(Component component,
int keyCode,
Keyboard.KeyLocation keyLocation)
ENTER Close the dialog with a 'result' of true. |
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, setBackgroundColor, setPadding, setPadding, setPadding, setPadding, setPadding, setResizable, setShowCloseButton, setShowContentBevel, setShowMaximizeButton, setShowMinimizeButton, setShowWindowControls, titleChanged |
Methods inherited from class org.apache.pivot.wtk.skin.ContainerSkin |
componentInserted, componentMoved, componentsRemoved, focusTraversalPolicyChanged, getBackgroundColor, getBackgroundPaint, isFocusable, isOpaque, mouseMove, mouseUp, mouseWheel, setBackgroundColor, setBackgroundPaint, setBackgroundPaint, setBackgroundPaint |
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin |
cursorChanged, decodeFont, dragSourceChanged, dropTargetChanged, enabledChanged, focusedChanged, getBaseline, getBaseline, getComponent, getHeight, getWidth, heightLimitsChanged, invalidateComponent, keyReleased, keyTyped, locationChanged, menuHandlerChanged, mouseClick, mouseOut, mouseOver, mouseWheel, nameChanged, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setSize, sizeChanged, tooltipDelayChanged, tooltipTextChanged, tooltipTriggered, visibleChanged, widthLimitsChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TerraDialogSkin
public TerraDialogSkin()
install
public void install(Component component)
- Description copied from interface:
Skin
- Associates a skin with a component.
- Specified by:
install
in interface Skin
- Overrides:
install
in class TerraFrameSkin
- 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 interface ContainerMouseListener
- Overrides:
mouseDown
in class WindowSkin
- Returns:
- true to consume the event; false to allow it to
propagate.
keyPressed
public boolean keyPressed(Component component,
int keyCode,
Keyboard.KeyLocation keyLocation)
ENTER
Close the dialog with a 'result' of true.
ESCAPE
Close the dialog with a 'result' of false.
- Specified by:
keyPressed
in interface ComponentKeyListener
- Overrides:
keyPressed
in class TerraFrameSkin
- 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 interface WindowStateListener
- Overrides:
windowOpened
in class WindowSkin
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 interface WindowStateListener
- Overrides:
windowClosed
in class WindowSkin
modalChanged
public void modalChanged(Dialog dialog)
- Description copied from interface:
DialogListener
- Called when a dialog's modal flag has changed.
- Specified by:
modalChanged
in interface DialogListener
previewDialogClose
public Vote previewDialogClose(Dialog dialog,
boolean result)
- Description copied from interface:
DialogStateListener
- Called to preview a dialog close event.
- Specified by:
previewDialogClose
in interface DialogStateListener
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 interface DialogStateListener
dialogClosed
public void dialogClosed(Dialog dialog,
boolean modal)
- Description copied from interface:
DialogCloseListener
- Called when a dialog has closed.
- Specified by:
dialogClosed
in interface DialogCloseListener