|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.ui.hud.HUD
public class HUD
This is a 3D HUD implementation. A HUD can contain WidgetContainers and Widgets.
| Nested Class Summary | |
|---|---|
static class |
HUD.FocusMoveDirection
|
| Field Summary | |
|---|---|
static int |
CROSSHAIR_Z_INDEX
|
static int |
CURSOR_Z_INDEX
|
static int |
POPUP_Z_INDEX
|
static int |
TOOLTIP_Z_INDEX
|
static int |
WINDOW_BASE_Z_INDEX
|
| Constructor Summary | |
|---|---|
|
HUD(int canvasWidth,
int canvasHeight)
Creates a new HUD with a coordinate system with the given width and height and a
default content pane. |
|
HUD(int canvasWidth,
int canvasHeight,
float resX)
Creates a new HUD with a coordinate system with the given width and height and a default content pane. |
|
HUD(int canvasWidth,
int canvasHeight,
float resX,
float resY)
Creates a new HUD with a coordinate system with the given width and height and a
default content pane. |
|
HUD(int canvasWidth,
int canvasHeight,
float resX,
float resY,
WidgetContainer contentPane)
Creates a new HUD with a coordinate system with the given width and height. |
|
HUD(int canvasWidth,
int canvasHeight,
float resX,
WidgetContainer contentPane)
Creates a new HUD with a coordinate system with the given width and height. |
|
HUD(int canvasWidth,
int canvasHeight,
org.openmali.types.twodee.Sized2fRO resolution)
Creates a new HUD with a coordinate system with the given width and height and a
default content pane. |
|
HUD(int canvasWidth,
int canvasHeight,
org.openmali.types.twodee.Sized2fRO resolution,
WidgetContainer contentPane)
Creates a new HUD with a coordinate system with the given width and height. |
protected |
HUD(int canvasWidth,
int canvasHeight,
org.openmali.types.twodee.Sized2fRO resolution,
WidgetContainer contentPane,
boolean createHeavyWeightContentPane)
Creates a new HUD with a coordinate system with the given width and height. |
|
HUD(org.openmali.types.twodee.Sized2iRO canvas)
Creates a new HUD with a coordinate system with the given width and height and a
default content pane. |
|
HUD(org.openmali.types.twodee.Sized2iRO canvas,
boolean createHeavyWeightContentPane)
Creates a new HUD with a coordinate system with the given width and height and a
default content pane. |
|
HUD(org.openmali.types.twodee.Sized2iRO canvas,
float resX)
Creates a new HUD with a coordinate system with the given width and height and a
default content pane. |
|
HUD(org.openmali.types.twodee.Sized2iRO canvas,
float resX,
boolean createHeavyWeightContentPane)
Creates a new HUD with a coordinate system with the given width and height and a
default content pane. |
|
HUD(org.openmali.types.twodee.Sized2iRO canvas,
float resX,
float resY)
Creates a new HUD with a coordinate system with the given width and height and a
default content pane. |
|
HUD(org.openmali.types.twodee.Sized2iRO canvas,
float resX,
float resY,
boolean createHeavyWeightContentPane)
Creates a new HUD with a coordinate system with the given width and height and a
default content pane. |
|
HUD(org.openmali.types.twodee.Sized2iRO canvas,
float resX,
float resY,
WidgetContainer contentPane)
Creates a new HUD with a coordinate system with the given width and height. |
|
HUD(org.openmali.types.twodee.Sized2iRO canvas,
float resX,
WidgetContainer contentPane)
Creates a new HUD with a coordinate system with the given width and height. |
|
HUD(org.openmali.types.twodee.Sized2iRO canvas,
org.openmali.types.twodee.Sized2fRO resolution)
Creates a new HUD with a coordinate system with the given resolution and a
default content pane. |
|
HUD(org.openmali.types.twodee.Sized2iRO canvas,
org.openmali.types.twodee.Sized2fRO resolution,
WidgetContainer contentPane)
Creates a new HUD with a coordinate system with the given resolution. |
| Method Summary | |
|---|---|
void |
addGlobalContainerListener(WidgetContainerListener l)
Adds a new WidgetContainerListener to be notified of global widget container events. |
void |
addGlobalInputListener(WidgetInputListener l)
Adds a new WidgetInputListener to be notified of global widget input events. |
void |
addPickMissedListener(int mask,
HUDPickMissedListener l)
Adds a new HUDPickMissedListener to be notified of a pick event, that didn't hit
any Widget. |
Window |
addWindow(Window window)
Adds a Window to this HUD at the default location. |
Window |
addWindow(Window window,
float locX,
float locY)
Adds a Window to this HUD. |
Window |
addWindowCentered(Window window)
Adds a Window to this HUD centered within the HUD. |
void |
bindFocusMoveAccessor(org.jagatoo.input.devices.components.DeviceComponent comp,
HUD.FocusMoveDirection direction)
Binds a DeviceComponent to this HUD, that works as a focus-move-accessor
for a given direction. |
void |
connect(org.openmali.types.twodee.ExtSized2i canvas)
Connects this HUD to the given Sized2i instance (e.g. a
Canvas3D) and listens for its resized event. |
void |
connect(org.jagatoo.input.InputSystem inputSystem)
Connects this HUD to the given InputSystem. |
protected WidgetContainer |
createDefaultContentPane(boolean heavyWeight,
float resX,
float resY)
Creates the default content pane for this HUD. |
void |
detach()
Detaches this HUD. |
void |
disconnect(org.openmali.types.twodee.ExtSized2i canvas)
Disconnects this HUD from the given Sized2i instance (e.g. a
Canvas3D) and does not listen for its resized event anymore. |
void |
disconnect(org.jagatoo.input.InputSystem inputSystem)
Disconnects this HUD from the given InputSystem. |
void |
disposeFocus()
Unfocusses all Widgets. |
float |
getAspect()
Returns the aspect ratio of this HUD. |
WidgetContainer |
getContentPane()
Returns the content pane, where all other Widgets (except for windows) must be added to. |
ContextMenu |
getContextMenu()
Returns the ContextMenu. |
HUDCoordinatesConverter |
getCoordinatesConverter()
Returns the converter utility to convert from different coordinate spaces. |
CursorSet |
getCursorSet()
Returns the CursorSet used to manage the standard cursor types. |
DropShadowFactory |
getDropShadowFactory()
Returns the DropShadowFactory used to render drop shadows. |
float |
getHeight()
Returns this HUD's height. |
java.lang.String |
getName()
Returns the name of this HUD. |
OperationScheduler |
getOperationScheduler()
Returns this HUD's OperationScheduler. |
ForegroundRenderPass |
getRenderPass()
Walks up the SceneGraph to the root BranchGroup. |
float |
getResAspect()
Returns the aspect ratio of the resolution. |
org.openmali.vecmath2.Tuple2f |
getResolution()
Returns the resolution of the HUD. |
float |
getResX()
Returns the x-resolution of the HUD. |
float |
getResY()
Returns the y-resolution of the HUD. |
BranchGroup |
getSGGroup()
Returns the BranchGroup associated with this HUD. |
org.openmali.types.twodee.Sized2fRO |
getSize()
Return this size of this HUD. |
static WidgetTheme |
getTheme()
Returns the WidgetTheme to use for default textures and some default properties. |
ToolTipFactory |
getToolTipFactory()
Returns the ToolTipFactory used to generate tooltip-Widgets. |
float |
getTransparency()
Gets the content pane's transparency. |
float |
getWidth()
Returns this HUD's width. |
boolean |
hasCustomResolution()
Returns whether a custom resolution is defined for the HUD. |
boolean |
isConnected()
Checks whether the HUD is currently connected with the SceneGraph. |
boolean |
isCrosshairVisible()
Returns the crosshair's current visibility. |
boolean |
isCursorVisible()
Returns the cursor's current visibility. |
boolean |
isVisible()
Returns whether the whole HUD is visible or invisible. |
void |
removeGlobalContainerListener(WidgetContainerListener l)
Removes a global WidgetContainerListener. |
void |
removeGlobalInputListener(WidgetInputListener l)
Removes a global WidgetInputListener. |
void |
removePickMissedListener(HUDPickMissedListener l)
Removes a HUDPickMissedListener. |
void |
removeWindow(Window window)
Removes the given Window from this HUD. |
void |
setContentPane(WidgetContainer contentPane)
Sets the content pane, where all other Widgets (except for windows) must be added to. |
void |
setContextMenu(ContextMenu contextMenu)
Sets the ContextMenu. |
void |
setCrosshair(java.lang.String texture)
Sets the Texture for the crosshair. |
void |
setCrosshair(java.lang.String texture,
int hotspotX,
int hotspotY)
Sets the Texture for the crosshair. |
void |
setCrosshair(java.lang.String texture,
org.openmali.vecmath2.Tuple2i hotspot)
Sets the Texture for the crosshair. |
void |
setCrosshair(Texture2D texture)
Sets the Texture for the crosshair. |
void |
setCrosshair(Texture2D texture,
int hotspotX,
int hotspotY)
Sets the Texture for the crosshair. |
void |
setCrosshair(Texture2D texture,
org.openmali.vecmath2.Tuple2i hotspot)
Sets the Texture for the crosshair. |
void |
setCrosshairVisible(boolean visible)
Sets the crosshair's visibility. |
void |
setCursor(Cursor pointer1)
This is a convenience (and backwards-compatible) method to set the Cursor. |
void |
setCursor(java.lang.String pointer1)
This is a convenience (and backwards-compatible) method to set the Cursor. |
void |
setCursorSet(CursorSet cursorSet)
Sets the CursorSet with standard cursor types. |
void |
setCursorVisible(boolean visible)
Sets the cursor's visibility. |
void |
setDropShadowFactory(DropShadowFactory dsf)
Sets the DropShadowFactory to be used to render drop shadows. |
void |
setHeight(float height)
Sets the new height of the HUD. |
void |
setName(java.lang.String name)
Sets the name for this HUD. |
HUD |
setSize(float resX,
float resY)
Resizes this HUD's coordinate system to the given width and height. |
protected boolean |
setSize(float resX,
float resY,
boolean forced)
Resizes this HUD's coordinate system to the given width and height. |
void |
setSize(int canvasWidth,
int canvasHeight)
Creates a new coordinate system on the HUD. |
void |
setSize(int canvasWidth,
int canvasHeight,
float resX,
float resY)
Creates a new coordinate system on the HUD. |
void |
setSize(int canvasWidth,
int canvasHeight,
org.openmali.types.twodee.Sized2fRO resolution)
Creates a new coordinate system on the HUD. |
HUD |
setSize(org.openmali.types.twodee.Sized2fRO resolution)
Resizes this HUD's coordinate system to the given width and height. |
void |
setSize(org.openmali.types.twodee.Sized2iRO canvas)
Creates a new coordinate system on the HUD. |
void |
setSize(org.openmali.types.twodee.Sized2iRO canvas,
float resX,
float resY)
Creates a new coordinate system on the HUD. |
void |
setSize(org.openmali.types.twodee.Sized2iRO canvas,
org.openmali.types.twodee.Sized2fRO resolution)
Creates a new coordinate system on the HUD. |
HUD |
setSize(org.openmali.vecmath2.Tuple2f resolution)
Resizes this HUD's coordinate system to the given width and height. |
static void |
setTheme(java.lang.String theme)
Sets the built-in WidgetTheme to use for default textures and some default
properties. |
static void |
setTheme(WidgetTheme theme)
Sets the WidgetTheme to use for default textures and some default properties. |
void |
setToolTipFactory(ToolTipFactory ttf)
Sets the ToolTipFactory to be used to generate tooltip-Widgets. |
void |
setTransparency(float transparency)
Sets all Widgets' transparency. |
void |
setUseVoidContextMenu(boolean use)
Defines whether a ContextMenu is to be used if the mouse was clicked in an
empty space (where no Widget is displayed). |
void |
setVisible(boolean visible)
Sets the whole HUD visible/invisible. |
void |
setWidth(float width)
Sets the new width of the HUD. |
void |
unbindFocusMoveAccessor(org.jagatoo.input.devices.components.DeviceComponent comp,
HUD.FocusMoveDirection direction)
Unbinds the given focus-move-accessor DeviceComponent from this HUD for
the given direction. |
void |
update()
Updates the HUD. |
boolean |
useVoidContextMenu()
Returns whether a ContextMenu is to be used if the mouse was clicked in an empty
space (where no Widget is displayed). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int WINDOW_BASE_Z_INDEX
public static final int POPUP_Z_INDEX
public static final int TOOLTIP_Z_INDEX
public static final int CROSSHAIR_Z_INDEX
public static final int CURSOR_Z_INDEX
| Constructor Detail |
|---|
protected HUD(int canvasWidth,
int canvasHeight,
org.openmali.types.twodee.Sized2fRO resolution,
WidgetContainer contentPane,
boolean createHeavyWeightContentPane)
HUD with a coordinate system with the given width and height.
canvasWidth - the width of the Canvas3D to take the resolution and aspect
ratio fromcanvasHeight - the height of the Canvas3D to take the resolution and aspect
ratio fromresolution - the resolution of the coordinate systemcontentPane - the content pane to usecreateHeavyWeightContentPane - true if it is to be heavyweight;
false otherwise
public HUD(int canvasWidth,
int canvasHeight,
org.openmali.types.twodee.Sized2fRO resolution,
WidgetContainer contentPane)
HUD with a coordinate system with the given width and height.
canvasWidth - the width of the Canvas3D to take the resolution and aspect
ratio fromcanvasHeight - the height of the Canvas3D to take the resolution and
aspect ratio fromresolution - the resolution of the coordinate systemcontentPane - the content pane to use
public HUD(int canvasWidth,
int canvasHeight,
org.openmali.types.twodee.Sized2fRO resolution)
HUD with a coordinate system with the given width and height and a
default content pane.
canvasWidth - the width of the Canvas3D to take the resolution and aspect
ratio fromcanvasHeight - the height of the Canvas3D to take the resolution and
aspect ratio fromresolution - the resolution of the coordinate system
public HUD(int canvasWidth,
int canvasHeight,
float resX,
float resY)
HUD with a coordinate system with the given width and height and a
default content pane.
canvasWidth - the width of the Canvas3D to take the resolution and aspect
ratio fromcanvasHeight - the height of the Canvas3D to take the resolution and
aspect ratio fromresX - the width of the coordinate systemresY - the height of the coordinate system
public HUD(int canvasWidth,
int canvasHeight,
float resX,
float resY,
WidgetContainer contentPane)
HUD with a coordinate system with the given width and height.
canvasWidth - the width of the Canvas3D to take the resolution and aspect
ratio fromcanvasHeight - the height of the Canvas3D to take the resolution and
aspect ratio fromresX - the width of the coordinate systemresY - the height of the coordinate systemcontentPane - the content pane to use
public HUD(org.openmali.types.twodee.Sized2iRO canvas,
org.openmali.types.twodee.Sized2fRO resolution)
HUD with a coordinate system with the given resolution and a
default content pane.
canvas - the Canvas3D to take the aspect ratio fromresolution - the resolution of the coordinate system
public HUD(org.openmali.types.twodee.Sized2iRO canvas,
org.openmali.types.twodee.Sized2fRO resolution,
WidgetContainer contentPane)
HUD with a coordinate system with the given resolution.
canvas - the Canvas3D to take the aspect ratio fromresolution - the resolution of the coordinate systemcontentPane - the content pane to use
public HUD(org.openmali.types.twodee.Sized2iRO canvas,
float resX)
HUD with a coordinate system with the given width and height and a
default content pane.
canvas - the Canvas3D to take the aspect ratio fromresX - the x-resolution of the coordinate system. The y-resolution is calculated by (
resX / canvasAspect).
public HUD(org.openmali.types.twodee.Sized2iRO canvas,
float resX,
boolean createHeavyWeightContentPane)
HUD with a coordinate system with the given width and height and a
default content pane.
canvas - the Canvas3D to take the aspect ratio fromresX - the x-resolution of the coordinate system. The y-resolution is calculated by (
resX / canvasAspect).createHeavyWeightContentPane - true if it is to be heavyweight;
false otherwise
public HUD(org.openmali.types.twodee.Sized2iRO canvas,
float resX,
WidgetContainer contentPane)
HUD with a coordinate system with the given width and height.
canvas - the Canvas3D to take the aspect ratio fromresX - the x-resolution of the coordinate system. The y-resolution is calculated by (
resX / canvasAspect).contentPane - the content pane to use
public HUD(int canvasWidth,
int canvasHeight,
float resX)
HUD with a coordinate system with the given width and height and a default content pane.
canvasWidth - the width of the Canvas3D to take the resolution and aspect
ratio fromcanvasHeight - the height of the Canvas3D to take the resolution and
aspect ratio fromresX - the x-resolution of the coordinate system. The y-resolution is calculated by (
resX / canvasAspect).
public HUD(int canvasWidth,
int canvasHeight,
float resX,
WidgetContainer contentPane)
HUD with a coordinate system with the given width and height.
canvasWidth - the width of the Canvas3D to take the resolution and aspect
ratio fromcanvasHeight - the height of the Canvas3D to take the resolution and
aspect ratio fromresX - the x-resolution of the coordinate system. The y-resolution is calculated by (
resX / canvasAspect).contentPane - the content pane to use
public HUD(org.openmali.types.twodee.Sized2iRO canvas,
float resX,
float resY)
HUD with a coordinate system with the given width and height and a
default content pane.
canvas - the Canvas3D to take the aspect ratio fromresX - the width of the coordinate systemresY - the height of the coordinate system
public HUD(org.openmali.types.twodee.Sized2iRO canvas,
float resX,
float resY,
boolean createHeavyWeightContentPane)
HUD with a coordinate system with the given width and height and a
default content pane.
canvas - the Canvas3D to take the aspect ratio fromresX - the width of the coordinate systemresY - the height of the coordinate systemcreateHeavyWeightContentPane - true if it is to be heavyweight;
false otherwise
public HUD(org.openmali.types.twodee.Sized2iRO canvas,
float resX,
float resY,
WidgetContainer contentPane)
HUD with a coordinate system with the given width and height.
canvas - the Canvas3D to take the aspect ratio fromresX - the width of the coordinate systemresY - the height of the coordinate systemcontentPane - the content pane to use
public HUD(int canvasWidth,
int canvasHeight)
HUD with a coordinate system with the given width and height and a
default content pane.
canvasWidth - the width of the Canvas3D to take the resolution and aspect
ratio fromcanvasHeight - the width of the Canvas3D to take the resolution and
aspect ratio frompublic HUD(org.openmali.types.twodee.Sized2iRO canvas)
HUD with a coordinate system with the given width and height and a
default content pane.
canvas - the Canvas3D to take the resolution and aspect ratio from
public HUD(org.openmali.types.twodee.Sized2iRO canvas,
boolean createHeavyWeightContentPane)
HUD with a coordinate system with the given width and height and a
default content pane.
canvas - the Canvas3D to take the resolution and aspect ratio fromcreateHeavyWeightContentPane - true if it is to be heavyweight;
false otherwise| Method Detail |
|---|
public final ForegroundRenderPass getRenderPass()
SceneGraph to the root BranchGroup. If there is one
the associated RenderPass is searched for and returned. If this HUD
is not attached to a BranchGroup or the BranchGroup is not
associated with a RenderPass they are created.
RenderPass to add to the Renderer or
Xith3DEnvironmentpublic final BranchGroup getSGGroup()
BranchGroup associated with this HUD.
BranchGroup instancepublic final void detach()
HUD.
public void setName(java.lang.String name)
HUD.
name - he name to setpublic final java.lang.String getName()
HUD.
public static void setTheme(WidgetTheme theme)
WidgetTheme to use for default textures and some default properties.
theme - the new WidgetTheme to use
public static void setTheme(java.lang.String theme)
throws java.io.IOException
WidgetTheme to use for default textures and some default
properties.
theme - the new WidgetTheme to use
java.io.IOExceptionpublic static final WidgetTheme getTheme()
WidgetTheme to use for default textures and some default properties.
WidgetTheme
public void addPickMissedListener(int mask,
HUDPickMissedListener l)
HUDPickMissedListener to be notified of a pick event, that didn't hit
any Widget.
mask - a bitmask to define which HUDPickResult.HUDPickReasons cause the listener to be
notifiedl - the listener to addHUDPickResult.HUDPickReason.getMaskValue()public void removePickMissedListener(HUDPickMissedListener l)
HUDPickMissedListener.
l - the listener to removepublic void addGlobalInputListener(WidgetInputListener l)
WidgetInputListener to be notified of global widget input events.
l - the listener to addpublic void removeGlobalInputListener(WidgetInputListener l)
WidgetInputListener.
l - the listener to removepublic void addGlobalContainerListener(WidgetContainerListener l)
WidgetContainerListener to be notified of global widget container events.
l - the listener to addpublic void removeGlobalContainerListener(WidgetContainerListener l)
WidgetContainerListener.
l - the listener to removepublic void disposeFocus()
Widgets.
public void setVisible(boolean visible)
HUD visible/invisible.
visible - true to make it visible; false to make it invisiblepublic final boolean isVisible()
HUD is visible or invisible.
true if the HUD is visible; false otherwisepublic void setTransparency(float transparency)
transparency - the transparency to apply to all Widgetspublic final float getTransparency()
public final float getWidth()
HUD's width.
public final float getHeight()
HUD's height.
public final float getAspect()
HUD.
public final org.openmali.types.twodee.Sized2fRO getSize()
HUD.
public final boolean hasCustomResolution()
HUD.
true if a custom resolution is defined; false otherwisepublic final float getResX()
HUD.
public final float getResY()
HUD.
public final org.openmali.vecmath2.Tuple2f getResolution()
HUD.
public final float getResAspect()
public final HUDCoordinatesConverter getCoordinatesConverter()
public void update()
HUD.
protected boolean setSize(float resX,
float resY,
boolean forced)
HUD's coordinate system to the given width and height.
resX - the new width of this HUD's coordinate systemresY - the new height of this HUD's coordinate systemforced - true to force the resize
public final HUD setSize(float resX,
float resY)
HUD's coordinate system to the given width and height.
resX - the new width of this HUD's coordinate systemresY - the new height of this HUD's coordinate systempublic final HUD setSize(org.openmali.types.twodee.Sized2fRO resolution)
HUD's coordinate system to the given width and height.
resolution - the new resolution of this HUD's coordinate systempublic final HUD setSize(org.openmali.vecmath2.Tuple2f resolution)
HUD's coordinate system to the given width and height.
resolution - the new resolution of this HUD's coordinate system
public final void setSize(int canvasWidth,
int canvasHeight,
float resX,
float resY)
HUD. It does not actually resize the HUD.
canvasWidth - the width of the Canvas3D to take the resolution and aspect
fromcanvasHeight - the width of the Canvas3D to take the resolution and
aspect fromresX - the view width of the coordinate systemresY - the view height of the coordinate system
public final void setSize(org.openmali.types.twodee.Sized2iRO canvas,
float resX,
float resY)
HUD. It does not actually resize the HUD.
canvas - the Canvas3D to take the aspect ratio fromresX - the view width of the coordinate systemresY - the view height of the coordinate system
public final void setSize(int canvasWidth,
int canvasHeight,
org.openmali.types.twodee.Sized2fRO resolution)
HUD. It does not actually resize the HUD.
canvasWidth - the width of the Canvas3D to take the resolution and aspect
fromcanvasHeight - the width of the Canvas3D to take the resolution and aspect
fromresolution - the resolution of the coordinate system
public final void setSize(org.openmali.types.twodee.Sized2iRO canvas,
org.openmali.types.twodee.Sized2fRO resolution)
HUD. It does not actually resize the HUD.
canvas - the Canvas3D to take the aspect ratio fromresolution - the resolution of the coordinate system
public final void setSize(int canvasWidth,
int canvasHeight)
HUD. It does not actually resize the HUD.
canvasWidth - the width of the Canvas3D to take the resolution and aspect
fromcanvasHeight - the width of the Canvas3D to take the resolution and
aspect frompublic final void setSize(org.openmali.types.twodee.Sized2iRO canvas)
HUD. It does not actually resize the HUD.
canvas - the canvas to take the resolution and aspect frompublic final void setWidth(float width)
HUD.
width - the new width to setpublic final void setHeight(float height)
HUD.
height - the new height to set
public Window addWindow(Window window,
float locX,
float locY)
Window to this HUD.
window - the Window to addlocX - the x-location of the WindowlocY - the y-location of the Window
Windowpublic final Window addWindow(Window window)
Window to this HUD at the default location.
window - the Window to add
Windowpublic final Window addWindowCentered(Window window)
Window to this HUD centered within the HUD.
window - the Window to add
Windowpublic void removeWindow(Window window)
Window from this HUD.
window - the Window to removepublic void setContentPane(WidgetContainer contentPane)
Widgets (except for windows) must be added to.
contentPane - the content pane (WidgetContainer) to setpublic final WidgetContainer getContentPane()
Widgets (except for windows) must be added to.
WidgetContainer) to returnpublic void setToolTipFactory(ToolTipFactory ttf)
ToolTipFactory to be used to generate tooltip-Widgets.
ttf - the ToolTipFactory instance to usepublic final ToolTipFactory getToolTipFactory()
ToolTipFactory used to generate tooltip-Widgets.
ToolTipFactory instance usedpublic void setDropShadowFactory(DropShadowFactory dsf)
DropShadowFactory to be used to render drop shadows.
dsf - the DropShadowFactory to setpublic final DropShadowFactory getDropShadowFactory()
DropShadowFactory used to render drop shadows.
DropShadowFactory usedpublic void setContextMenu(ContextMenu contextMenu)
ContextMenu.
contextMenu - the ContextMenu to setpublic ContextMenu getContextMenu()
ContextMenu.
ContextMenupublic void setUseVoidContextMenu(boolean use)
ContextMenu is to be used if the mouse was clicked in an
empty space (where no Widget is displayed).
use - true to use a ContextMenu; false
otherwisepublic final boolean useVoidContextMenu()
ContextMenu is to be used if the mouse was clicked in an empty
space (where no Widget is displayed).
true if a ContextMenu is to be used; false
otherwise
public void bindFocusMoveAccessor(org.jagatoo.input.devices.components.DeviceComponent comp,
HUD.FocusMoveDirection direction)
DeviceComponent to this HUD, that works as a focus-move-accessor
for a given direction.
comp - the component to binddirection - the direction to useHUD.FocusMoveDirection
public void unbindFocusMoveAccessor(org.jagatoo.input.devices.components.DeviceComponent comp,
HUD.FocusMoveDirection direction)
DeviceComponent from this HUD for
the given direction.
comp - the component to unbinddirection - the direction to useHUD.FocusMoveDirectionpublic void setCursorSet(CursorSet cursorSet)
CursorSet with standard cursor types.
cursorSet - the CursorSet to setpublic final CursorSet getCursorSet()
CursorSet used to manage the standard cursor types.
CursorSet to returnpublic void setCursor(Cursor pointer1)
Cursor. This sets
the Cursor.Type#POINTER1 entry in the current CursorSet.
pointer1 - the new cursor to use for POINTER1 (or null for
no cursor)public void setCursor(java.lang.String pointer1)
Cursor. This sets
the Cursor.Type#POINTER1 entry in the current CursorSet.
pointer1 - the new cursor to use for POINTER1 (or null for
no cursor)public void setCursorVisible(boolean visible)
Sets the cursor's visibility.
If no cursor image has been set, this call will have no effect!
visible - true to make the cursor visible; false otherwisepublic final boolean isCursorVisible()
true if the cursor is currently visible; false otherwise
public void setCrosshair(Texture2D texture,
int hotspotX,
int hotspotY)
Sets the Texture for the crosshair.
Use null for texture to remove the crosshair.
texture - the new texture for the crosshair Image (or null for no crosshair)hotspotX - texture-relative x-location of the crosshair's hotspothotspotY - texture-relative y-location of the crosshair's hotspot
public final void setCrosshair(Texture2D texture,
org.openmali.vecmath2.Tuple2i hotspot)
Sets the Texture for the crosshair.
Use null for texture to remove the crosshair.
texture - the new texture for the crosshair Image (or null for no crosshair)hotspot - texture-relative location of the crosshair's hotspot
public final void setCrosshair(java.lang.String texture,
int hotspotX,
int hotspotY)
Sets the Texture for the crosshair. The texture MUST support an alpha channel.
Use null for texture to remove the crosshair.
texture - the new texture for the crosshair Image (or null for no
crosshair)hotspotX - texture-relative x-location of the crosshair's hotspothotspotY - texture-relative y-location of the crosshair's hotspot
public final void setCrosshair(java.lang.String texture,
org.openmali.vecmath2.Tuple2i hotspot)
Sets the Texture for the crosshair. The texture MUST support an alpha channel.
Use null for texture to remove the crosshair.
texture - the new texture for the crosshair Image (or null for no
crosshair)hotspot - texture-relative location of the crosshair's hotspotpublic final void setCrosshair(Texture2D texture)
Sets the Texture for the crosshair.
Use null for texture to remove the crosshair.
texture - the new texture for the crosshair Image (or null for no
crosshair)public final void setCrosshair(java.lang.String texture)
Sets the Texture for the crosshair. The texture MUST support an alpha channel.
Use null for texture to remove the crosshair.
texture - the new texture for the crosshair Image (or null for no
crosshair)public void setCrosshairVisible(boolean visible)
Sets the crosshair's visibility.
If no crosshair image has been set, this call will have no effect!
visible - true to make the crosshair visible; false otherwisepublic final boolean isCrosshairVisible()
true if the crosshair is currently visible; false otherwisepublic final OperationScheduler getOperationScheduler()
HUD's OperationScheduler.
OperationSchedulerpublic void connect(org.openmali.types.twodee.ExtSized2i canvas)
HUD to the given Sized2i instance (e.g. a
Canvas3D) and listens for its resized event.
canvas - public void connect(org.jagatoo.input.InputSystem inputSystem)
HUD to the given InputSystem.
inputSystem - the InputSystem to connect topublic void disconnect(org.openmali.types.twodee.ExtSized2i canvas)
HUD from the given Sized2i instance (e.g. a
Canvas3D) and does not listen for its resized event anymore.
canvas - the canvas to disconnect frompublic void disconnect(org.jagatoo.input.InputSystem inputSystem)
HUD from the given InputSystem.
inputSystem - the InputSystem to disconnect frompublic final boolean isConnected()
HUD is currently connected with the SceneGraph.
true if it is connected; false otherwise
protected WidgetContainer createDefaultContentPane(boolean heavyWeight,
float resX,
float resY)
HUD.
heavyWeight - true if it is to be heavyweightresX - the x-resolution for the content paneresY - the y-resolution for the content pane
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||