|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pivot.wtk.skin.ComponentSkin
org.apache.pivot.wtk.skin.ButtonSkin
org.apache.pivot.wtk.skin.MenuItemSkin
public abstract class MenuItemSkin
Abstract base class for menu item skins.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ButtonListener |
---|
ButtonListener.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 |
Field Summary | |
---|---|
protected ApplicationContext.ScheduledCallback |
buttonPressCallback
|
protected int |
buttonPressInterval
|
protected MenuPopup |
menuPopup
|
Fields inherited from class org.apache.pivot.wtk.skin.ButtonSkin |
---|
highlighted |
Constructor Summary | |
---|---|
MenuItemSkin()
|
Method Summary | |
---|---|
void |
activeChanged(Menu.Item menuItem)
Called when an item's active state has changed. |
void |
buttonPressed(Button button)
Called when a button is pressed. |
void |
enabledChanged(Component component)
Called when a component's enabled state has changed. |
void |
install(Component component)
Associates a skin with a component. |
boolean |
isFocusable()
By default, skins are focusable. |
void |
menuChanged(Menu.Item menuItem,
Menu previousMenu)
Called when an item's menu has changed. |
boolean |
mouseDown(Component component,
Mouse.Button button,
int x,
int y)
Called when a mouse button is pressed over a component. |
void |
mouseOut(Component component)
Called when the mouse exits a component. |
void |
mouseOver(Component component)
Called when the mouse enters a component. |
boolean |
mouseUp(Component component,
Mouse.Button button,
int x,
int y)
Called when a mouse button is released over a component. |
Methods inherited from class org.apache.pivot.wtk.skin.ButtonSkin |
---|
actionChanged, buttonDataChanged, buttonGroupChanged, dataRendererChanged, focusedChanged, layout, stateChanged, toggleButtonChanged, triStateChanged |
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin |
---|
cursorChanged, decodeFont, dragSourceChanged, dropTargetChanged, getBaseline, getBaseline, getComponent, getHeight, getPreferredSize, getWidth, heightLimitsChanged, invalidateComponent, isOpaque, keyPressed, keyReleased, keyTyped, locationChanged, menuHandlerChanged, mouseClick, mouseMove, 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.ConstrainedVisual |
---|
getPreferredHeight, getPreferredWidth |
Methods inherited from interface org.apache.pivot.wtk.Visual |
---|
paint |
Field Detail |
---|
protected MenuPopup menuPopup
protected int buttonPressInterval
protected ApplicationContext.ScheduledCallback buttonPressCallback
Constructor Detail |
---|
public MenuItemSkin()
Method Detail |
---|
public void install(Component component)
Skin
install
in interface Skin
install
in class ButtonSkin
component
- The component to which the skin is being attached.public boolean isFocusable()
ComponentSkin
isFocusable
in interface Skin
isFocusable
in class ComponentSkin
public void mouseOver(Component component)
ComponentMouseListener
mouseOver
in interface ComponentMouseListener
mouseOver
in class ButtonSkin
public void mouseOut(Component component)
ComponentMouseListener
mouseOut
in interface ComponentMouseListener
mouseOut
in class ButtonSkin
public boolean mouseDown(Component component, Mouse.Button button, int x, int y)
ComponentMouseButtonListener
mouseDown
in interface ComponentMouseButtonListener
mouseDown
in class ComponentSkin
public boolean mouseUp(Component component, Mouse.Button button, int x, int y)
ComponentMouseButtonListener
mouseUp
in interface ComponentMouseButtonListener
mouseUp
in class ComponentSkin
public void enabledChanged(Component component)
ComponentStateListener
Called both when the component is enabled and when it is disabled.
The component's enabled
flag has already been set when this
method is called so the new state can be determined by calling the
Component.isEnabled()
method.
enabledChanged
in interface ComponentStateListener
enabledChanged
in class ButtonSkin
component
- The component whose enabled state is changing.public void buttonPressed(Button button)
ButtonPressListener
buttonPressed
in interface ButtonPressListener
buttonPressed
in class ButtonSkin
public void menuChanged(Menu.Item menuItem, Menu previousMenu)
Menu.ItemListener
menuChanged
in interface Menu.ItemListener
public void activeChanged(Menu.Item menuItem)
Menu.ItemListener
activeChanged
in interface Menu.ItemListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |