org.apache.pivot.wtk.skin.terra
Class TerraMenuPopupSkin

java.lang.Object
  extended by org.apache.pivot.wtk.skin.ComponentSkin
      extended by org.apache.pivot.wtk.skin.ContainerSkin
          extended by org.apache.pivot.wtk.skin.WindowSkin
              extended by org.apache.pivot.wtk.skin.terra.TerraMenuPopupSkin
All Implemented Interfaces:
ComponentKeyListener, ComponentListener, ComponentMouseButtonListener, ComponentMouseListener, ComponentMouseWheelListener, ComponentStateListener, ComponentTooltipListener, ConstrainedVisual, ContainerListener, ContainerMouseListener, MenuPopupListener, MenuPopupStateListener, Skin, Visual, Window.Skin, WindowListener, WindowStateListener

public class TerraMenuPopupSkin
extends WindowSkin
implements MenuPopupListener, MenuPopupStateListener

Menu popup skin.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.skin.WindowSkin
WindowSkin.WindowFocusTraversalPolicy
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.skin.ContainerSkin
ContainerSkin.IndexFocusTraversalPolicy
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.MenuPopupStateListener
MenuPopupStateListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.WindowListener
WindowListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.WindowStateListener
WindowStateListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerListener
ContainerListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerMouseListener
ContainerMouseListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentListener
ComponentListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentStateListener
ComponentStateListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseListener
ComponentMouseListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseButtonListener
ComponentMouseButtonListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentKeyListener
ComponentKeyListener.Adapter
 
Constructor Summary
TerraMenuPopupSkin()
           
 
Method Summary
 Color getBorderColor()
           
 int getCloseTransitionDuration()
           
 int getCloseTransitionRate()
           
 void install(Component component)
          Associates a skin with a component.
 boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
          ESCAPE Close the menu popup.
 void menuChanged(MenuPopup menuPopup, Menu previousMenu)
          Called when a menu popup's menu has changed.
 void menuPopupClosed(MenuPopup menuPopup)
          Called when a menu popup has closed.
 void menuPopupCloseVetoed(MenuPopup menuPopup, Vote reason)
          Called when a menu popup close event has been vetoed.
 Vote previewMenuPopupClose(MenuPopup menuPopup, boolean immediate)
          Called to preview a menu popup close event.
 void setBorderColor(Color borderColor)
           
 void setBorderColor(String borderColor)
           
 void setCloseTransitionDuration(int closeTransitionDuration)
           
 void setCloseTransitionRate(int closeTransitionRate)
           
 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.WindowSkin
activeChanged, contentChanged, getClientArea, getPreferredHeight, getPreferredSize, getPreferredWidth, iconAdded, iconInserted, iconsRemoved, layout, maximizedChanged, mouseDown, previewWindowClose, previewWindowOpen, titleChanged, windowCloseVetoed, windowOpenVetoed
 
Methods inherited from class org.apache.pivot.wtk.skin.ContainerSkin
componentInserted, componentMoved, componentsRemoved, focusTraversalPolicyChanged, getBackgroundColor, getBackgroundPaint, isFocusable, isOpaque, mouseMove, mouseUp, mouseWheel, paint, setBackgroundColor, 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, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, 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
 
Methods inherited from interface org.apache.pivot.wtk.Skin
getComponent, isFocusable, isOpaque
 
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisual
getBaseline, setSize
 
Methods inherited from interface org.apache.pivot.wtk.Visual
getBaseline, getHeight, getWidth, paint
 

Constructor Detail

TerraMenuPopupSkin

public TerraMenuPopupSkin()
Method Detail

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 WindowSkin
Parameters:
component - The component to which the skin is being attached.

getBorderColor

public Color getBorderColor()

setBorderColor

public void setBorderColor(Color borderColor)

setBorderColor

public void setBorderColor(String borderColor)

getCloseTransitionDuration

public int getCloseTransitionDuration()

setCloseTransitionDuration

public void setCloseTransitionDuration(int closeTransitionDuration)

getCloseTransitionRate

public int getCloseTransitionRate()

setCloseTransitionRate

public void setCloseTransitionRate(int closeTransitionRate)

keyPressed

public boolean keyPressed(Component component,
                          int keyCode,
                          Keyboard.KeyLocation keyLocation)
ESCAPE Close the menu popup.

Specified by:
keyPressed in interface ComponentKeyListener
Overrides:
keyPressed in class ComponentSkin
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

menuChanged

public void menuChanged(MenuPopup menuPopup,
                        Menu previousMenu)
Description copied from interface: MenuPopupListener
Called when a menu popup's menu has changed.

Specified by:
menuChanged in interface MenuPopupListener

previewMenuPopupClose

public Vote previewMenuPopupClose(MenuPopup menuPopup,
                                  boolean immediate)
Description copied from interface: MenuPopupStateListener
Called to preview a menu popup close event.

Specified by:
previewMenuPopupClose in interface MenuPopupStateListener

menuPopupCloseVetoed

public void menuPopupCloseVetoed(MenuPopup menuPopup,
                                 Vote reason)
Description copied from interface: MenuPopupStateListener
Called when a menu popup close event has been vetoed.

Specified by:
menuPopupCloseVetoed in interface MenuPopupStateListener

menuPopupClosed

public void menuPopupClosed(MenuPopup menuPopup)
Description copied from interface: MenuPopupStateListener
Called when a menu popup has closed.

Specified by:
menuPopupClosed in interface MenuPopupStateListener