|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.ui.hud.widgets.EmptyWidget
public class EmptyWidget
The EmptyWidget can be used to add an empty place in
LayoutManager-controlled panels.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.xith3d.ui.hud.base.Widget |
|---|
Widget.DescriptionBase |
| Field Summary | |
|---|---|
protected java.util.ArrayList<WidgetContainerListener> |
containerListeners
|
| Constructor Summary | |
|---|---|
EmptyWidget()
Creates a new EmptyWidget. |
|
EmptyWidget(float width,
float height)
Creates a new EmptyWidget. |
|
| Method Summary | |
|---|---|
void |
addContainerListener(WidgetContainerListener l)
Adds a new WidgetContainerListener. |
void |
addFocusListener(WidgetFocusListener l)
Adds a new WidgetFocusListener. |
void |
addInputListener(WidgetInputListener l)
Adds a new WidgetInputListener. |
void |
addLocationListener(WidgetLocationListener l)
Adds a new WidgetLocationListener. |
void |
addSizeListener(WidgetSizeListener l)
Adds a new WidgetSizeListener. |
void |
addVisibilityListener(WidgetVisibilityListener l)
Adds a new WidgetVisibilityListener. |
void |
detach()
Instantly removes the Widget from its Container. |
void |
detach(boolean delayed)
Removes the Widget from its Container. |
float |
getAspect()
|
Widget |
getAssembly()
|
Widget |
getCachedToolTipWidget()
|
WidgetContainer |
getContainer()
The Container which contains this Widget |
ContextMenu |
getContextMenu()
|
Cursor.Type |
getCursor()
|
float |
getHeight()
|
HUD |
getHUD()
|
Cursor.Type |
getInheritedCursor()
|
float |
getLeft()
|
org.openmali.vecmath2.Tuple2f |
getLocation()
|
java.lang.String |
getName()
|
Node |
getSGNode()
|
float |
getSGZPosition()
|
org.openmali.types.twodee.Sized2fRO |
getSize()
|
java.lang.String |
getToolTip()
|
float |
getTop()
|
float |
getTransparency()
|
java.lang.Object |
getUserObject()
|
float |
getWidth()
|
int |
getZIndex()
|
boolean |
hasFocus()
Is this Widget focused? |
boolean |
hasFocus(boolean testLeaf)
Is this Widget focused? |
boolean |
hasToolTip()
|
boolean |
isClickable()
|
boolean |
isDraggable()
|
boolean |
isFocussable()
|
boolean |
isPickable()
|
boolean |
isVisible()
|
protected void |
onAddedToContainer(WidgetContainer container)
This event is fired, when this Widget is added to a WidgetContainer. |
protected void |
onAddedToHUD(HUD hud)
This event is fired, when this Widget is added to a WidgetContainer and the container itself is already added to the HUD or is the HUD itself. |
void |
onControllerAxisChanged(org.jagatoo.input.devices.components.ControllerAxis axis,
int axisDelta)
This event is fired when a ControllerAxis has changed and this Widget is the currently focussed one. |
void |
onControllerButtonPressed(org.jagatoo.input.devices.components.ControllerButton button)
This event is fired when a ControllerButton has been pressed and this Widget is the currently focussed one. |
void |
onControllerButtonReleased(org.jagatoo.input.devices.components.ControllerButton button)
This event is fired when a ControllerButton has been released and this Widget is the currently focussed one. |
void |
onDetached()
This method is called right before the Widget has been detached from its WidgetContainer. |
void |
onFocusGained()
This event is fired, when the focus is gained to a Widget. |
void |
onFocusLost()
This event is fired, when the focus is lost by a Widget. |
void |
onInputStateChanged(org.jagatoo.input.devices.components.DeviceComponent comp,
int delta,
int state,
boolean isTopMost,
boolean hasFocus)
This event is fired when the state of any DeviceComponent has changed. |
void |
onKeyPressed(org.jagatoo.input.devices.components.Key key,
long when)
This event is fired, when a key is pressed on a focused Widget. |
void |
onKeyReleased(org.jagatoo.input.devices.components.Key key,
long when)
This event is fired, when a key is released on a focused Widget. |
void |
onKeyTyped(char ch,
long when)
This event is fired when a key is typed on the keyboard. |
void |
onMouseButtonPressed(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 pressed on a focused Widget. |
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 |
onMouseMoved(int x,
int y,
int buttonsState,
long when,
boolean isTopMost,
boolean hasFocus)
This event is fired, when the mouse is moved on a Widget. |
void |
onMouseStopped(int x,
int y,
long when,
boolean isTopMost,
boolean hasFocus)
This event is fired, when the mouse position has not been changed on this Widget for a certain amount of time. |
void |
onMouseUnbound()
This event is fired, when the mouse is released. |
void |
onMouseWheelMoved(int delta,
boolean isPageMove,
int x,
int y,
long when,
boolean isTopMost)
This event is fired, when the mouse wheel is moved on a Widget. |
protected void |
onRemovedFromContainer(WidgetContainer container)
This event is fired, when this Widget is removed from a WidgetContainer. |
HUDPickResult |
pick(int canvasX,
int canvasY,
HUDPickResult.HUDPickReason pickReason,
org.jagatoo.input.devices.components.MouseButton button,
long when,
long meta,
int flags)
Tests whether a Widget is under the cursor and runs the approriate methods if true. |
void |
removeContainerListener(WidgetContainerListener l)
Removes a WidgetContainerListener. |
void |
removeFocusListener(WidgetFocusListener l)
Removes a WidgetFocusListener. |
void |
removeInputListener(WidgetInputListener l)
Removes a WidgetInputListener. |
void |
removeLocationListener(WidgetLocationListener l)
Removes a WidgetFocusListener. |
void |
removeSizeListener(WidgetSizeListener l)
Removes a WidgetSizeListener. |
void |
removeVisibilityListener(WidgetVisibilityListener l)
Removes a WidgetVisibilityListener. |
void |
requestFocus()
Requests the focus from the HUD system. |
void |
setAssembly(Widget assembly)
Sets the Widget, which uses this one to assemle itself, if any. |
void |
setCachedToolTipWidget(Widget tooltipWidget)
|
void |
setClickable(boolean isClickable)
Sets wheather this Widget is clickable. |
void |
setContainer(WidgetContainer container)
Sets this Widget's container |
void |
setContextMenu(ContextMenu contextMenu)
Sets the ContextMenu for this Widget and inherits it to all children, if this is a container. |
void |
setCursor(Cursor.Type cursor)
Sets the Cursor type to be used when the cursor is over this Widget and which is inherited to the Children, if this is a container. |
void |
setDraggable(boolean draggable)
Sets wheather this Widget is clickable. |
void |
setFocussable(boolean focussable)
Sets whether this Widget can get the focus or not. |
void |
setHeight(float height)
|
EmptyWidget |
setLocation(float locX,
float locY)
Sets this Widget's location relative to the upper-left corner of it's WidgetContainer |
EmptyWidget |
setLocation(org.openmali.vecmath2.Tuple2f loc)
Sets this Widget's location relative to the upper-left corner of it's WidgetContainer |
void |
setName(java.lang.String name)
Sets this Widget's name |
void |
setPickable(boolean isPickable)
Sets wheather this Widget is pickable. |
EmptyWidget |
setSize(float width,
float height)
Resizes this Widget to the given width and height. |
EmptyWidget |
setSize(org.openmali.types.twodee.Sized2fRO size)
Resizes this Widget to the given width and height. |
EmptyWidget |
setSize(org.openmali.vecmath2.Tuple2f size)
Resizes this Widget to the given width and height. |
void |
setToolTip(java.lang.String tooltip)
Sets the tooltip to be displayed when the mouse stopps over this Widget. |
void |
setTransparency(float transparency)
Sets the whole Widget's Transparency. |
void |
setUserObject(java.lang.Object userObject)
Sets this Widget's user-Object. |
void |
setVisible(boolean visible)
Sets wheather this Widget is visible or not |
void |
setWidth(float width)
|
void |
setZIndex(int zIndex)
Sets the z-index of this Widget. |
void |
update()
Updates the Widget's internals. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.util.ArrayList<WidgetContainerListener> containerListeners
| Constructor Detail |
|---|
public EmptyWidget(float width,
float height)
width - height - public EmptyWidget()
| Method Detail |
|---|
public final Node getSGNode()
getSGNode in interface Widgetpublic void setName(java.lang.String name)
setName in interface org.jagatoo.datatypes.NamableObjectsetName in interface Widgetpublic final java.lang.String getName()
getName in interface org.jagatoo.datatypes.NamedObjectgetName in interface Widgetpublic void setUserObject(java.lang.Object userObject)
setUserObject in interface WidgetuserObject - the new user-Objectpublic final java.lang.Object getUserObject()
getUserObject in interface Widgetpublic final HUD getHUD()
getHUD in interface Widgetpublic void setAssembly(Widget assembly)
setAssembly in interface Widgetpublic final Widget getAssembly()
getAssembly in interface Widgetpublic void detach(boolean delayed)
detach in interface Widgetdelayed - if true, the widget is detached with the next frame, but not instantly.public final void detach()
detach in interface Widgetpublic void onDetached()
onDetached in interface Widgetpublic void update()
update in interface Widgetprotected void onAddedToContainer(WidgetContainer container)
container - the WidgetContainer, the Widget is added toprotected void onAddedToHUD(HUD hud)
hud - the HUD, the Widget is added toprotected void onRemovedFromContainer(WidgetContainer container)
container - the WidgetContainer, the Widget is removed frompublic void setContainer(WidgetContainer container)
setContainer in interface Widgetcontainer - the new Containerpublic final WidgetContainer getContainer()
getContainer in interface Widget
public EmptyWidget setSize(float width,
float height)
setSize in interface org.openmali.types.twodee.Sized2fsetSize in interface Widgetwidth - the new width of this Widgetheight - the new height of this Widget
public final EmptyWidget setSize(org.openmali.types.twodee.Sized2fRO size)
setSize in interface org.openmali.types.twodee.Sized2fsetSize in interface Widgetsize - the new size of this Widget
public final EmptyWidget setSize(org.openmali.vecmath2.Tuple2f size)
setSize in interface org.openmali.types.twodee.Sized2fsetSize in interface Widgetsize - the new size of this Widget
public final void setWidth(float width)
setWidth in interface org.openmali.types.twodee.Sized2fpublic final void setHeight(float height)
setHeight in interface org.openmali.types.twodee.Sized2fpublic final org.openmali.types.twodee.Sized2fRO getSize()
getSize in interface Widgetpublic final float getWidth()
getWidth in interface org.openmali.types.twodee.Sized2fROgetWidth in interface Widgetpublic final float getHeight()
getHeight in interface org.openmali.types.twodee.Sized2fROgetHeight in interface Widgetpublic final float getAspect()
getAspect in interface org.openmali.types.twodee.Sized2fROgetAspect in interface Widget
public EmptyWidget setLocation(float locX,
float locY)
setLocation in interface org.openmali.types.twodee.Positioned2fsetLocation in interface WidgetlocX - the new x-locationlocY - the new y-location
public final EmptyWidget setLocation(org.openmali.vecmath2.Tuple2f loc)
setLocation in interface org.openmali.types.twodee.Positioned2fsetLocation in interface Widgetloc - the new location
public final org.openmali.vecmath2.Tuple2f getLocation()
getLocation in interface org.openmali.types.twodee.Positioned2fROgetLocation in interface Widgetpublic final float getLeft()
getLeft in interface org.openmali.types.twodee.Positioned2fROgetLeft in interface Widgetpublic final float getTop()
getTop in interface org.openmali.types.twodee.Positioned2fROgetTop in interface Widgetpublic void setZIndex(int zIndex)
setZIndex in interface Widgetpublic final int getZIndex()
getZIndex in interface Widgetpublic final float getSGZPosition()
getSGZPosition in interface Widgetpublic void setTransparency(float transparency)
setTransparency in interface Widgetpublic final float getTransparency()
getTransparency in interface Widgetpublic void setVisible(boolean visible)
setVisible in interface Widgetvisible - visible?public final boolean isVisible()
isVisible in interface Widgetpublic void setDraggable(boolean draggable)
setDraggable in interface Widgetpublic final boolean isDraggable()
isDraggable in interface Widgetpublic void setClickable(boolean isClickable)
setClickable in interface Widgetpublic final boolean isClickable()
isClickable in interface Widgetpublic void setPickable(boolean isPickable)
setPickable in interface Widgetpublic final boolean isPickable()
isPickable in interface Widgetpublic final void setCursor(Cursor.Type cursor)
setCursor in interface Widgetpublic final Cursor.Type getCursor()
getCursor in interface Widgetpublic final Cursor.Type getInheritedCursor()
getInheritedCursor in interface Widget
public HUDPickResult pick(int canvasX,
int canvasY,
HUDPickResult.HUDPickReason pickReason,
org.jagatoo.input.devices.components.MouseButton button,
long when,
long meta,
int flags)
pick in interface WidgetcanvasX - the x position of the mouse on the Canvas3DcanvasY - the y position of the mouse on the Canvas3DpickReason - the action which caused this pick operationbutton - the mouse-button, that caused the pickingwhen - the timestamp of the pickingmeta - this could be either the lastPressTime, lastReleaseTime, buttonsState mask or the page-move-boolean. (depends on the pickReason)
public void setFocussable(boolean focussable)
setFocussable in interface Widgetpublic final boolean isFocussable()
isFocussable in interface Widgetpublic void requestFocus()
requestFocus in interface Widgetpublic final boolean hasFocus(boolean testLeaf)
hasFocus in interface WidgettestLeaf - only returns true, if this Widget is focused and is a Leafpublic final boolean hasFocus()
hasFocus in interface Widgetpublic void onFocusGained()
onFocusGained in interface Widgetpublic void onFocusLost()
onFocusLost in interface Widget
public void onKeyPressed(org.jagatoo.input.devices.components.Key key,
long when)
onKeyPressed in interface Widgetkey - the key that was pressedwhen - the keyevent's timestamp
public void onKeyReleased(org.jagatoo.input.devices.components.Key key,
long when)
onKeyReleased in interface Widgetkey - the key that was releasedwhen - the keyevent's timestamp
public void onKeyTyped(char ch,
long when)
onKeyTyped in interface Widgetch - the typed key's characterwhen - the keyevent's timestamp
public void onMouseButtonPressed(org.jagatoo.input.devices.components.MouseButton button,
int x,
int y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
onMouseButtonPressed in interface Widgetbutton - the button that was pressedx - the current mouse x positiony - the current mouse y positionisTopMost - is this Widget topMosthasFocus - is this Widget focusednet.jtank.input.MouseCode
public void onMouseButtonReleased(org.jagatoo.input.devices.components.MouseButton button,
int x,
int y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
onMouseButtonReleased in interface Widgetbutton - the button that was releasedx - the current mouse x positiony - the current mouse y positionisTopMost - is this Widget topMosthasFocus - is this Widget focusednet.jtank.input.MouseCode
public void onMouseMoved(int x,
int y,
int buttonsState,
long when,
boolean isTopMost,
boolean hasFocus)
onMouseMoved in interface Widgetx - the new X coordinatey - the new Y coordinateisTopMost - is this Widget topMosthasFocus - is this Widget focused
public void onMouseStopped(int x,
int y,
long when,
boolean isTopMost,
boolean hasFocus)
onMouseStopped in interface Widgetx - the new X coordinatey - the new Y coordinateisTopMost - is this Widget topMosthasFocus - is this Widget focused
public void onMouseWheelMoved(int delta,
boolean isPageMove,
int x,
int y,
long when,
boolean isTopMost)
onMouseWheelMoved in interface Widgetdelta - a positive value when the wheel was moved upx - the current mouse x positiony - the current mouse y positionisTopMost - is this Widget topMost
public void onMouseEntered(boolean isTopMost,
boolean hasFocus)
onMouseEntered in interface WidgetisTopMost - is this Widget topMosthasFocus - is this Widget focused
public void onMouseLeft(boolean isTopMost,
boolean hasFocus)
onMouseLeft in interface WidgetisTopMost - is this Widget topMosthasFocus - is this Widget focusedpublic void onMouseUnbound()
onMouseUnbound in interface Widgetpublic void onControllerButtonPressed(org.jagatoo.input.devices.components.ControllerButton button)
onControllerButtonPressed in interface Widgetbutton - the pressed buttonpublic void onControllerButtonReleased(org.jagatoo.input.devices.components.ControllerButton button)
onControllerButtonReleased in interface Widgetbutton - the released button
public void onControllerAxisChanged(org.jagatoo.input.devices.components.ControllerAxis axis,
int axisDelta)
onControllerAxisChanged in interface Widgetaxis - the changed axis
public void onInputStateChanged(org.jagatoo.input.devices.components.DeviceComponent comp,
int delta,
int state,
boolean isTopMost,
boolean hasFocus)
onInputStateChanged in interface Widgetpublic void addInputListener(WidgetInputListener l)
addInputListener in interface Widgetpublic void removeInputListener(WidgetInputListener l)
removeInputListener in interface Widgetpublic void addFocusListener(WidgetFocusListener l)
addFocusListener in interface Widgetpublic void removeFocusListener(WidgetFocusListener l)
removeFocusListener in interface Widgetpublic void addLocationListener(WidgetLocationListener l)
addLocationListener in interface Widgetpublic void removeLocationListener(WidgetLocationListener l)
removeLocationListener in interface Widgetpublic void addSizeListener(WidgetSizeListener l)
addSizeListener in interface Widgetpublic void removeSizeListener(WidgetSizeListener l)
removeSizeListener in interface Widgetpublic void addVisibilityListener(WidgetVisibilityListener l)
addVisibilityListener in interface Widgetpublic void removeVisibilityListener(WidgetVisibilityListener l)
removeVisibilityListener in interface Widgetpublic void addContainerListener(WidgetContainerListener l)
addContainerListener in interface Widgetpublic void removeContainerListener(WidgetContainerListener l)
removeContainerListener in interface Widgetpublic void setContextMenu(ContextMenu contextMenu)
setContextMenu in interface Widgetpublic ContextMenu getContextMenu()
getContextMenu in interface Widgetpublic void setToolTip(java.lang.String tooltip)
HUD.setToolTipFactory(org.xith3d.ui.hud.utils.ToolTipFactory)
and HUD.getToolTipFactory().
setToolTip in interface Widgetpublic final java.lang.String getToolTip()
getToolTip in interface WidgetHUD.setToolTipFactory(org.xith3d.ui.hud.utils.ToolTipFactory)
and HUD.getToolTipFactory().public final boolean hasToolTip()
hasToolTip in interface Widgetpublic void setCachedToolTipWidget(Widget tooltipWidget)
setCachedToolTipWidget in interface Widgetpublic final Widget getCachedToolTipWidget()
getCachedToolTipWidget in interface Widget
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||