org.xith3d.ui.hud.contextmenu
Class DefaultContextMenuItem
java.lang.Object
org.xith3d.ui.hud.base.Widget
org.xith3d.ui.hud.base.BackgroundSettableWidget
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, AutoSizable, PaddingSettable, TextWidget, ContextMenuItem
public class DefaultContextMenuItem
- extends Label
- implements ContextMenuItem
Insert type comment here.
|
Method Summary |
boolean |
clickCausesMenuHide()
|
ContextMenu |
getContextMenu()
|
org.openmali.vecmath2.Colorf |
getHoveredColor()
|
protected void |
markFree()
|
protected void |
markHovered()
|
protected void |
onItemClicked()
|
protected void |
onMouseButtonReleased(org.jagatoo.input.devices.components.MouseButton button,
float x,
float y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
This event is fired, when a mouse button is released on a focused Widget. |
protected void |
onMouseEntered(boolean isTopMost,
boolean hasFocus)
This method is called when the mouse entered the Widget area. |
protected void |
onMouseExited(boolean isTopMost,
boolean hasFocus)
This method is called when the mouse exited 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 |
drawIcon, drawText, drawWidget, getAlignment, getDisplayedText, getFont, getFont, getFontColor, getFontColor, getFontColorDisabled, getFontDisabled, getIcon, getIconGap, getMinimalHeight, getMinimalSize, getMinimalWidth, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getText, getTextOffsetX, getTextOffsetY, init, initSize, isAutoSizeEnabled, isEnabled, onAttachedToHUD, onSizeChanged, prepareText, setAlignment, setAutoSizeEnabled, setEnabled, setEnabledImpl, setFont, setFontColor, setFontColorDisabled, setFontDisabled, setIcon, setIcon, setIconGap, setMinimalSize, setPadding, setPadding, setText, setText, setText, setTextOffset, updateText |
| Methods inherited from class org.xith3d.ui.hud.base.BackgroundSettableWidget |
drawBackground, getBackgroundColor, getBackgroundTexture, getBackgroundTileMode, setBackground, setBackground, setBackground, setBackgroundColor, setBackgroundTexture, setBackgroundTexture, setBackgroundTexture, setBackgroundTexture, setBackgroundTileMode, setNoBackground |
| Methods inherited from class org.xith3d.ui.hud.base.Widget |
addContainerListener, addControllerListener, addFocusListener, addInputListener, addKeyboardListener, addLocationListener, addMouseListener, addSizeListener, addVisibilityListener, bindToGlobalMouseMovement, blocksFocusMoveDeviceComponent, calculateTransformHeight_Pixels2HUD, calculateTransformWidth_Pixels2HUD, compareAbsZIndex, createShape, detach, drawAndUpdateWidget, drawBorder, drawWidgetAfterWidgetAssembler, drawWidgetContents, getAbsoluteLocationOnHUD_, getAspect, getAssembly, getBorder, getContainer, getContentAspect, getContentHeight, getContentHeightPX, getContentLeftPX, getContentOffset, getContentTopPX, getContentWidth, getContentWidthPX, getCursor, getEqualHeight_, getEqualWidth_, getForcedRedrawFrequency, getHeight, getHeightPX, getHUD, getLeft, getLevel, getLocation, getLocation, getLocationHUD2Pixels_, getLocationHUD2SG_, getLocationPixels2HUD_, getLocationSG2HUD_, getMaxRedrawFrequency, getMinHeight, getMinWidth, getName, getParentWindow, getPickHeight, getPickWidth, getRelLocationHUD2Pixels_, getRootHostWidget, getShape, getSize, getSizeHUD2Pixels_, getSizeHUD2SG_, getSizeOfPixels_, getSizePixels2HUD_, getSizeSG2HUD_, getToolTip, getTop, getTransparency, getUserObject, getWidgetAssembler, getWidth, getWidthPX, getZIndex, hasDropShadow, hasFocus, hasFocus, hasToolTip, isAHostedWidgetDirty, isClickable, isDraggable, isFocussable, isHeavyWeight, isHovered, isInitialized, isInitializing, isPickable, isThisWidgetDirty, isVisible, notifyOnDragStopped, onAttachedToContainer, onControllerAxisChanged, onControllerButtonPressed, onControllerButtonReleased, onDetachedFromContainer, onDetachedFromHUD, onFocusGained, onFocusLost, onInputStateChanged, onKeyPressed, onKeyReleased, onKeyTyped, onLocationChanged, onMouseButtonPressed, onMouseMoved, onMouseStopped, onMouseWheelMoved, onVisibilityChanged, pick, pickConditionsMatch, removeContainerListener, removeControllerListener, removeFocusListener, removeInputListener, removeKeyboardListener, removeLocationListener, removeMouseListener, removeSizeListener, removeVisibilityListener, requestFocus, resetWidgetDirty, setBorder, setBorder, setClickable, setContentClipRect, setCursor, setDraggable, setFocussable, setForcedRedrawFrequency, setHasDropShadow, setHeight, setHostedWidgetDirty, setHostTextureDirty, setHostTextureDirty, setHostWidget, setLocation, setLocation, setLocation, setMaxRedrawFrequency, setName, setPickable, setSize, setSize, setSize, setSize, setTextureDirty, setTextureDirty, setToolTip, setTransparency, setTransparency, setUserObject, setVisible, setWidgetDirty, setWidth, setZIndex, startDragging, toString, update, updateAbsZIndex, updateSizeFactors, updateTranslation |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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 org.openmali.vecmath2.Colorf getHoveredColor()
clickCausesMenuHide
public 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 ContextMenuItem- Overrides:
setContextMenu in class Widget
getContextMenu
public final ContextMenu getContextMenu()
-
- Specified by:
getContextMenu in interface ContextMenuItem- Overrides:
getContextMenu in class Widget
- Returns:
- the (inherited) ContextMenu.
markHovered
protected void markHovered()
markFree
protected void markFree()
onMouseEntered
protected void onMouseEntered(boolean isTopMost,
boolean hasFocus)
- Description copied from class:
Widget
- This method is called when the mouse entered the Widget area.
- Overrides:
onMouseEntered in class Widget
- Parameters:
isTopMost - is this Widget topMosthasFocus - is this Widget focused
onMouseExited
protected void onMouseExited(boolean isTopMost,
boolean hasFocus)
- Description copied from class:
Widget
- This method is called when the mouse exited the Widget area.
- Overrides:
onMouseExited in class Widget
- Parameters:
isTopMost - is this Widget topMosthasFocus - is this Widget focused
onItemClicked
protected void onItemClicked()
onMouseButtonReleased
protected void onMouseButtonReleased(org.jagatoo.input.devices.components.MouseButton button,
float x,
float y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
- Description copied from class:
Widget
- This event is fired, when a mouse button is released on a focused Widget.
- Overrides:
onMouseButtonReleased in class Widget
- 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