org.xith3d.ui.hud.contextmenu
Class DefaultContextMenuItem
java.lang.Object
org.xith3d.ui.hud.base.WidgetBase
org.xith3d.ui.hud.base.RectangularWidget
org.xith3d.ui.hud.widgets.Label
org.xith3d.ui.hud.contextmenu.DefaultContextMenuItem
- All Implemented Interfaces:
- org.jagatoo.datatypes.Enableable, org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.types.twodee.Positioned2f, org.openmali.types.twodee.Positioned2fRO, org.openmali.types.twodee.Sized2f, org.openmali.types.twodee.Sized2fRO, AdvancedTextWidget, BackgroundSettable, BackgroundSettableWidget, PaddingSettable, TextWidget, Widget, ContextMenuItem
public class DefaultContextMenuItem
- extends Label
- implements ContextMenuItem
Insert type comment here.
| Fields inherited from class org.xith3d.ui.hud.widgets.Label |
autoSize |
|
Method Summary |
boolean |
clickCausesMenuHide()
|
ContextMenu |
getContextMenu()
|
org.openmali.vecmath2.Colorf |
getHoveredColor()
|
protected void |
markFree()
|
protected void |
markHovered()
|
protected void |
onItemClicked()
|
void |
onMouseButtonReleased(org.jagatoo.input.devices.components.MouseButton button,
int x,
int y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
This event is fired, when a mouse button is released on a focused Widget. |
void |
onMouseEntered(boolean isTopMost,
boolean hasFocus)
This method is called when the mouse entered the Widget area |
void |
onMouseLeft(boolean isTopMost,
boolean hasFocus)
This method is called when the mouse left the Widget area |
void |
setContextMenu(ContextMenu contextMenu)
Sets the ContextMenu for this Widget and inherits it to all children,
if this is a container. |
void |
setHoveredColor(org.openmali.vecmath2.Colorf hoveredColor)
|
| Methods inherited from class org.xith3d.ui.hud.widgets.Label |
fixTranslation, getAlignment, getBackground, getBackgroundColor, getBackgroundTileHeight, getBackgroundTileSize, getBackgroundTileWidth, getContentGroup, getDisplayedText, getFont, getFont, getFontColor, getFontColor, getFontColorDisabled, getFontDisabled, getMinimalSize, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getText, getTextRectangle, getTransparency, init, isAutoSizeEnabled, isEnabled, setAlignment, setAutoSizeEnabled, setBackground, setBackground, setBackground, setBackgroundTileSize, setBackgroundTileSize, setContainer, setEnabled, setEnabledImpl, setFont, setFontColor, setFontColorDisabled, setFontDisabled, setMinimalSize, setPadding, setPadding, setSize, setText, setTransparency, toString, updateText, updateTranslation |
| Methods inherited from class org.xith3d.ui.hud.base.WidgetBase |
addContainerListener, addFocusListener, addInputListener, addLocationListener, addSizeListener, addVisibilityListener, detach, detach, getAspect, getAssembly, getCachedToolTipWidget, getContainer, getCursor, getHeight, getHUD, getInheritedCursor, getLeft, getLocation, getName, getSGNode, getSGZPosition, getSize, getToolTip, getTop, getUserObject, getWidgetAssembler, getWidth, getZIndex, hasFocus, hasFocus, hasToolTip, isClickable, isDraggable, isFocussable, isInitialized, isInitializing, isPickable, isVisible, onAddedToContainer, onAddedToHUD, onControllerAxisChanged, onControllerButtonPressed, onControllerButtonReleased, onDetached, onFocusGained, onFocusLost, onInputStateChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseButtonPressed, onMouseMoved, onMouseStopped, onMouseUnbound, onMouseWheelMoved, onRemovedFromContainer, pickWidgetAssembler, removeContainerListener, removeFocusListener, removeInputListener, removeLocationListener, removeSizeListener, removeVisibilityListener, requestFocus, setAssembly, setCachedToolTipWidget, setClickable, setCursor, setDraggable, setFocussable, setHeight, setLocation, setLocation, setLocation, setName, setPickable, setSize, setSize, setSize, setToolTip, setUserObject, setVisible, setWidth, setZIndex, update |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.xith3d.ui.hud.base.Widget |
addContainerListener, addFocusListener, addInputListener, addLocationListener, addSizeListener, addVisibilityListener, detach, detach, getAspect, getAssembly, getCachedToolTipWidget, getContainer, getCursor, getHeight, getHUD, getInheritedCursor, getLeft, getLocation, getName, getSGNode, getSGZPosition, getSize, getToolTip, getTop, getUserObject, getWidth, getZIndex, hasFocus, hasFocus, hasToolTip, isClickable, isDraggable, isFocussable, isPickable, isVisible, onControllerAxisChanged, onControllerButtonPressed, onControllerButtonReleased, onDetached, onFocusGained, onFocusLost, onInputStateChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseButtonPressed, onMouseMoved, onMouseStopped, onMouseUnbound, onMouseWheelMoved, pick, removeContainerListener, removeFocusListener, removeInputListener, removeLocationListener, removeSizeListener, removeVisibilityListener, requestFocus, setAssembly, setCachedToolTipWidget, setClickable, setCursor, setDraggable, setFocussable, setLocation, setLocation, setName, setPickable, setSize, setSize, setSize, setToolTip, setUserObject, setVisible, setZIndex, update |
| Methods inherited from interface org.openmali.types.twodee.Sized2f |
setHeight, setWidth |
DefaultContextMenuItem
public DefaultContextMenuItem(java.lang.String text,
Label.Description labelDesc,
java.lang.Object userObject)
DefaultContextMenuItem
public DefaultContextMenuItem(java.lang.String text,
java.lang.Object userObject)
DefaultContextMenuItem
public DefaultContextMenuItem(java.lang.String text,
Label.Description labelDesc)
DefaultContextMenuItem
public DefaultContextMenuItem(java.lang.String text)
setHoveredColor
public void setHoveredColor(org.openmali.vecmath2.Colorf hoveredColor)
getHoveredColor
public final org.openmali.vecmath2.Colorf getHoveredColor()
clickCausesMenuHide
public final boolean clickCausesMenuHide()
-
- Specified by:
clickCausesMenuHide in interface ContextMenuItem
setContextMenu
public void setContextMenu(ContextMenu contextMenu)
- Sets the ContextMenu for this Widget and inherits it to all children,
if this is a container.
- Specified by:
setContextMenu in interface Widget- Specified by:
setContextMenu in interface ContextMenuItem- Overrides:
setContextMenu in class WidgetBase
getContextMenu
public final ContextMenu getContextMenu()
-
- Specified by:
getContextMenu in interface Widget- Specified by:
getContextMenu in interface ContextMenuItem- Overrides:
getContextMenu in class WidgetBase
- Returns:
- the (inherited) ContextMenu.
markHovered
protected void markHovered()
markFree
protected void markFree()
onMouseEntered
public void onMouseEntered(boolean isTopMost,
boolean hasFocus)
- Description copied from class:
WidgetBase
- This method is called when the mouse entered the Widget area
- Specified by:
onMouseEntered in interface Widget- Overrides:
onMouseEntered in class WidgetBase
- Parameters:
isTopMost - is this Widget topMosthasFocus - is this Widget focused
onMouseLeft
public void onMouseLeft(boolean isTopMost,
boolean hasFocus)
- Description copied from class:
WidgetBase
- This method is called when the mouse left the Widget area
- Specified by:
onMouseLeft in interface Widget- Overrides:
onMouseLeft in class WidgetBase
- Parameters:
isTopMost - is this Widget topMosthasFocus - is this Widget focused
onItemClicked
protected void onItemClicked()
onMouseButtonReleased
public void onMouseButtonReleased(org.jagatoo.input.devices.components.MouseButton button,
int x,
int y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
- Description copied from class:
WidgetBase
- This event is fired, when a mouse button is released on a focused Widget.
- Specified by:
onMouseButtonReleased in interface Widget- Overrides:
onMouseButtonReleased in class WidgetBase
- Parameters:
button - the button that was releasedx - the current mouse x positiony - the current mouse y positionisTopMost - is this Widget topMosthasFocus - is this Widget focused- See Also:
net.jtank.input.MouseCode