Package org.apache.pivot.wtk
Class Menu.Item
- java.lang.Object
-
- org.apache.pivot.wtk.Component
-
- org.apache.pivot.wtk.Button
-
- org.apache.pivot.wtk.Menu.Item
-
- All Implemented Interfaces:
ConstrainedVisual
,Visual
- Enclosing class:
- Menu
@DefaultProperty("menu") public static class Menu.Item extends Button
Component representing a menu item.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Button
Button.ButtonDataBindMapping, Button.DataRenderer, Button.SelectedBindMapping, Button.State, Button.StateBindMapping
-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListenerList<Menu.ItemListener>
getItemListeners()
Menu
getMenu()
Menu.Section
getSection()
boolean
isActive()
void
press()
"Presses" the button.void
setActive(boolean active)
void
setEnabled(boolean enabled)
Sets the component's enabled state.void
setMenu(Menu menu)
protected void
setParent(Container parent)
void
setTriState(boolean triState)
Sets the button's tri-state state.-
Methods inherited from class org.apache.pivot.wtk.Button
clear, getAction, getButtonBindingListeners, getButtonData, getButtonDataBindMapping, getButtonDataBindType, getButtonDataKey, getButtonGroup, getButtonListeners, getButtonPressListeners, getButtonStateListeners, getDataRenderer, getQueuedActionDelay, getSelectedBindMapping, getSelectedBindType, getSelectedKey, getState, getStateBindMapping, getStateBindType, getStateKey, isQueuedAction, isSelected, isToggleButton, isTriState, load, setAction, setAction, setButtonData, setButtonDataBindMapping, setButtonDataBindType, setButtonDataKey, setButtonGroup, setDataRenderer, setQueuedAction, setQueuedActionDelay, setSelected, setSelectedBindMapping, setSelectedBindType, setSelectedKey, setState, setStateBindMapping, setStateBindType, setStateKey, setToggleButton, store
-
Methods inherited from class org.apache.pivot.wtk.Component
checkSkin, clearFocus, contains, copyStyle, copyStyle, getAncestor, getAncestor, getAttribute, getAutomationID, getBaseline, getBaseline, getBounds, getComponentClassListeners, getComponentDataListeners, getComponentDecoratorListeners, getComponentKeyListeners, getComponentListeners, getComponentMouseButtonListeners, getComponentMouseListeners, getComponentMouseWheelListeners, getComponentStateListeners, getComponentStyleListeners, getComponentTooltipListeners, getCursor, getDecoratedBounds, getDecorators, getDisplay, getDragSource, getDropTarget, getFocusedComponent, getGraphics, getHeight, getHeightLimits, getLocation, getMaximumHeight, getMaximumWidth, getMenuHandler, getMinimumHeight, getMinimumWidth, getMouseLocation, getName, getNamedStyles, getParent, getPreferredHeight, getPreferredHeight, getPreferredSize, getPreferredWidth, getPreferredWidth, getScreenBounds, getSize, getSkin, getStyle, getStyle, getStyleBoolean, getStyleBoolean, getStyleColor, getStyleColor, getStyleFont, getStyleFont, getStyleInt, getStyleInt, getStyles, getTextInputMethodListener, getTooltipDelay, getTooltipText, getTooltipWrapText, getTypedStyles, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWidthLimits, getWindow, getX, getY, indexBoundsCheck, installSkin, invalidate, isBlocked, isEnabled, isFocusable, isFocused, isMouseOver, isOpaque, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isValid, isVisible, keyPressed, keyReleased, keyTyped, layout, mapPointFromAncestor, mapPointFromAncestor, mapPointToAncestor, mapPointToAncestor, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, offsetToScreen, paint, putStyle, putStyle, reenterMouse, repaint, repaint, repaint, repaint, repaint, repaint, requestFocus, scrollAreaToVisible, scrollAreaToVisible, setAttribute, setAutomationID, setAutomationID, setCursor, setDragSource, setDropTarget, setFocused, setHeight, setHeightLimits, setHeightLimits, setLocation, setLocation, setMaximumHeight, setMaximumWidth, setMenuHandler, setMinimumHeight, setMinimumWidth, setName, setPreferredHeight, setPreferredSize, setPreferredSize, setPreferredWidth, setSize, setSize, setSkin, setStyleName, setStyleNames, setStyleNames, setStyles, setStyles, setTooltipDelay, setTooltipText, setTooltipWrapText, setVisible, setWidth, setWidthLimits, setWidthLimits, setX, setY, toString, transferFocus, validate
-
-
-
-
Method Detail
-
setEnabled
public void setEnabled(boolean enabled)
Description copied from class:Component
Sets the component's enabled state. Enabled components respond to user input events; disabled components do not.- Overrides:
setEnabled
in classButton
- Parameters:
enabled
-true
if the component is enabled;false
, otherwise.
-
getSection
public Menu.Section getSection()
-
getMenu
public Menu getMenu()
-
setMenu
public void setMenu(Menu menu)
-
isActive
public boolean isActive()
-
setActive
public void setActive(boolean active)
-
setTriState
@UnsupportedOperation public void setTriState(boolean triState)
Description copied from class:Button
Sets the button's tri-state state.- Overrides:
setTriState
in classButton
- Parameters:
triState
- Whether or not to make this a tri-state button.
-
press
public void press()
Description copied from class:Button
"Presses" the button. Performs any action associated with the button.
-
getItemListeners
public ListenerList<Menu.ItemListener> getItemListeners()
-
-