pivot.wtk.skin
Class MenuBarItemSkin

java.lang.Object
  extended by pivot.wtk.skin.ComponentSkin
      extended by pivot.wtk.skin.ButtonSkin
          extended by pivot.wtk.skin.MenuBarItemSkin
All Implemented Interfaces:
ButtonListener, ButtonPressListener, ButtonStateListener, ComponentKeyListener, ComponentLayoutListener, ComponentListener, ComponentMouseButtonListener, ComponentMouseListener, ComponentMouseWheelListener, ComponentStateListener, ConstrainedVisual, MenuBar.ItemListener, Skin, Visual
Direct Known Subclasses:
TerraMenuBarItemSkin

public abstract class MenuBarItemSkin
extends ButtonSkin
implements MenuBar.ItemListener

Abstract base class for menu bar item skins.

Author:
gbrown

Nested Class Summary
 
Nested classes/interfaces inherited from interface pivot.wtk.ButtonListener
ButtonListener.Adapter
 
Nested classes/interfaces inherited from interface pivot.wtk.ComponentListener
ComponentListener.Adapter
 
Nested classes/interfaces inherited from interface pivot.wtk.ComponentStateListener
ComponentStateListener.Adapter
 
Nested classes/interfaces inherited from interface pivot.wtk.ComponentMouseListener
ComponentMouseListener.Adapter
 
Nested classes/interfaces inherited from interface pivot.wtk.ComponentMouseButtonListener
ComponentMouseButtonListener.Adapter
 
Nested classes/interfaces inherited from interface pivot.wtk.ComponentKeyListener
ComponentKeyListener.Adapter
 
Field Summary
protected  MenuPopup menuPopup
           
 
Fields inherited from class pivot.wtk.skin.ButtonSkin
highlighted
 
Fields inherited from class pivot.wtk.skin.ComponentSkin
SHOW_TOOLTIP_TIMEOUT
 
Constructor Summary
MenuBarItemSkin()
           
 
Method Summary
 void buttonPressed(Button button)
          Called when a button is pressed.
 void enabledChanged(Component component)
          Called when a component's enabled state has changed.
 void focusedChanged(Component component, boolean temporary)
          Called when a component's focused state has changed.
 void install(Component component)
          Associates a skin with a component.
 boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
          Called when a key has been pressed.
 boolean keyReleased(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
          Called when a key has been released.
 void menuChanged(MenuBar.Item menuBarItem, Menu previousMenu)
           
 boolean mouseClick(Component component, Mouse.Button button, int x, int y, int count)
          Called when a mouse button is clicked over a component.
 boolean mouseDown(Component component, Mouse.Button button, int x, int y)
          Called when a mouse button is pressed over a component.
 void mouseOver(Component component)
          Called when the mouse enters a component.
 void uninstall()
          Dissociates a skin from a component.
 
Methods inherited from class pivot.wtk.skin.ButtonSkin
actionChanged, buttonDataChanged, dataRendererChanged, groupChanged, layout, mouseOut, selectedKeyChanged, stateChanged, stateKeyChanged, toggleButtonChanged, triStateChanged
 
Methods inherited from class pivot.wtk.skin.ComponentSkin
cursorChanged, displayableChanged, getComponent, getHeight, getPreferredSize, getWidth, invalidateComponent, isFocusable, isOpaque, keyTyped, locationChanged, mouseMove, mouseUp, mouseWheel, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setSize, sizeChanged, styleUpdated, tooltipTextChanged, visibleChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface pivot.wtk.ConstrainedVisual
getPreferredHeight, getPreferredWidth
 
Methods inherited from interface pivot.wtk.Visual
paint
 

Field Detail

menuPopup

protected MenuPopup menuPopup
Constructor Detail

MenuBarItemSkin

public MenuBarItemSkin()
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 ButtonSkin
Parameters:
component - The component to which the skin is being attached.

uninstall

public void uninstall()
Description copied from interface: Skin
Dissociates a skin from a component.

Specified by:
uninstall in interface Skin
Overrides:
uninstall in class ButtonSkin

mouseOver

public void mouseOver(Component component)
Description copied from interface: ComponentMouseListener
Called when the mouse enters a component.

Specified by:
mouseOver in interface ComponentMouseListener
Overrides:
mouseOver in class ButtonSkin

mouseDown

public boolean mouseDown(Component component,
                         Mouse.Button button,
                         int x,
                         int y)
Description copied from interface: ComponentMouseButtonListener
Called when a mouse button is pressed over a component.

Specified by:
mouseDown in interface ComponentMouseButtonListener
Overrides:
mouseDown in class ComponentSkin
Returns:
true to consume the event; false to allow it to propagate.

mouseClick

public boolean mouseClick(Component component,
                          Mouse.Button button,
                          int x,
                          int y,
                          int count)
Description copied from interface: ComponentMouseButtonListener
Called when a mouse button is clicked over a component.

Specified by:
mouseClick in interface ComponentMouseButtonListener
Overrides:
mouseClick in class ComponentSkin
Returns:
true to consume the event; false to allow it to propagate.

keyPressed

public boolean keyPressed(Component component,
                          int keyCode,
                          Keyboard.KeyLocation keyLocation)
Description copied from interface: ComponentKeyListener
Called when a key has been pressed.

Specified by:
keyPressed in interface ComponentKeyListener
Overrides:
keyPressed in class ComponentSkin
Returns:
true to consume the event; false to allow it to propagate.

keyReleased

public boolean keyReleased(Component component,
                           int keyCode,
                           Keyboard.KeyLocation keyLocation)
Description copied from interface: ComponentKeyListener
Called when a key has been released.

Specified by:
keyReleased in interface ComponentKeyListener
Overrides:
keyReleased in class ComponentSkin
Returns:
true to consume the event; false to allow it to propagate.

enabledChanged

public void enabledChanged(Component component)
Description copied from interface: ComponentStateListener
Called when a component's enabled state has changed.

Specified by:
enabledChanged in interface ComponentStateListener
Overrides:
enabledChanged in class ButtonSkin

focusedChanged

public void focusedChanged(Component component,
                           boolean temporary)
Description copied from interface: ComponentStateListener
Called when a component's focused state has changed.

Specified by:
focusedChanged in interface ComponentStateListener
Overrides:
focusedChanged in class ButtonSkin

buttonPressed

public void buttonPressed(Button button)
Description copied from interface: ButtonPressListener
Called when a button is pressed.

Specified by:
buttonPressed in interface ButtonPressListener
Overrides:
buttonPressed in class ButtonSkin

menuChanged

public void menuChanged(MenuBar.Item menuBarItem,
                        Menu previousMenu)
Specified by:
menuChanged in interface MenuBar.ItemListener