org.jdesktop.wonderland.client.hud
Interface HUDObject

All Superinterfaces:
HUDEventSource
All Known Subinterfaces:
HUD, HUDButton, HUDComponent, HUDDialog, HUDMessage

public interface HUDObject
extends HUDEventSource

A generic HUD type that defines a rectangular 2D visual.

Author:
nsimpson

Nested Class Summary
static class HUDObject.DisplayMode
          Display modes
 
Method Summary
 void changeTransparency(java.lang.Float from, java.lang.Float to)
          Changes the transparency of the HUD object from one transparency to another over the default duration, where 0.0f is opaque and 1.0f is completely transparent.
 void changeTransparency(java.lang.Float from, java.lang.Float to, long duration)
          Changes the transparency of the HUD object from one transparency to another over a specified duration, where 0.0f is opaque and 1.0f is completely transparent.
 java.awt.Rectangle getBounds()
          Gets the bounds of the HUD object
 boolean getDecoratable()
          Gets whether the HUD object can be decorated
 HUDObject.DisplayMode getDisplayMode()
          Gets the display mode
 int getHeight()
          Gets the height of the HUD object in pixels
 javax.swing.ImageIcon getIcon()
          Gets the icon for this HUD object
 java.awt.Point getLocation()
          Gets the location of this HUD object in the form of a point specifying the view's origin
 java.lang.String getName()
          Gets the name assigned to this HUD object
 CompassLayout.Layout getPreferredLocation()
          Gets the preferred compass point location
 float getPreferredTransparency()
          Gets the preferred transparency of the HUD object
 java.awt.Dimension getSize()
          Gets the size of the HUD object
 float getTransparency()
          Gets the current transparency of the HUD object
 int getWidth()
          Gets the width of the HUD object in pixels
 com.jme.math.Vector3f getWorldLocation()
          Gets the location of the object in 3D space
 int getX()
          Gets the x-coordinate of the HUD object's origin
 int getY()
          Gets the y-coordinate of the HUD object's origin
 boolean hasControl()
          Gets whether the HUD object has control
 boolean isEnabled()
          Gets whether the HUD object is enabled
 boolean isMinimized()
          Gets the minimized state of a component
 boolean isVisible()
          Gets whether the HUD object is visible
 boolean isWorldVisible()
          Gets whether the HUD object is visible in-world
 void setBounds(int x, int y, int width, int height)
          Sets the position and size of the HUD object
 void setBounds(java.awt.Rectangle bounds)
          Sets the bounds (x, y position, width, height) of the HUD object
 void setClosed()
          Closes the component
 void setDecoratable(boolean decoratable)
          Sets whether the HUD object can be decorated
 void setDisplayMode(HUDObject.DisplayMode mode)
          Sets the display mode, either in-world or on-HUD
 void setEnabled(boolean enabled)
          Sets whether the HUD object is responsive to mouse and keyboard events
 void setHeight(int height)
          Sets the height of the HUD object in pixels
 void setIcon(javax.swing.ImageIcon iconImage)
          Sets the icon to display when this HUD object is minimized
 void setLocation(int x, int y)
          Moves the HUD object to a new location
 void setLocation(int x, int y, boolean notify)
          Moves the HUD object to a new location
 void setLocation(java.awt.Point p)
          Moves the HUD object to a new location
 void setMaximized()
          Maximizes a component
 void setMinimized()
          Minimizes a component
 void setName(java.lang.String name)
          Assigns a name to this HUD object
 void setPreferredLocation(CompassLayout.Layout compassPoint)
          Sets the preferred location as a compass point
 void setPreferredTransparency(java.lang.Float transparency)
          Sets the preferred transparency of the HUD object on a scale of 0.0f to 1.0f, where 0.0f is opaque and 1.0f is completely transparent.
 void setSize(java.awt.Dimension dimension)
          Sets the width and height of the HUD object
 void setSize(int width, int height)
          Sets the width and height of the HUD object
 void setTransparency(java.lang.Float transparency)
          Sets the transparency of the HUD object on a scale of 0.0f to 1.0f, where 0.0f is opaque and 1.0f is completely transparent.
 void setVisible(boolean visible)
          Sets the visibility of the HUD object
 void setVisible(boolean visible, long when)
          Sets the visibility of the HUD object after a specified time
 void setWidth(int width)
          Sets the width of the HUD object in pixels
 void setWorldLocation(com.jme.math.Vector3f location)
          Sets the location in 3D space
 void setWorldVisible(boolean worldVisible)
          Sets the visibility of the HUD object in-world
 void setWorldVisible(boolean visible, long when)
          Sets the visibility of the HUD object in-world after a specified time
 void setX(int x)
          Sets the x-coordinate of the HUD object's origin
 void setY(int y)
          Sets the y-coordinate of the HUD object's origin
 
Methods inherited from interface org.jdesktop.wonderland.client.hud.HUDEventSource
addEventListener, getEventListeners, notifyEventListeners, notifyEventListeners, removeEventListener
 

Method Detail

setName

void setName(java.lang.String name)
Assigns a name to this HUD object

Parameters:
name - the name to assign to this HUD object

getName

java.lang.String getName()
Gets the name assigned to this HUD object

Returns:
the name of the HUD object

setWidth

void setWidth(int width)
Sets the width of the HUD object in pixels

Parameters:
width - the width of the HUD object (pixels)

getWidth

int getWidth()
Gets the width of the HUD object in pixels

Returns:
the width of the HUD object in pixels

setHeight

void setHeight(int height)
Sets the height of the HUD object in pixels

Parameters:
height - the height of the HUD object (pixels)

getHeight

int getHeight()
Gets the height of the HUD object in pixels

Returns:
the height of the HUD object in pixels

setSize

void setSize(int width,
             int height)
Sets the width and height of the HUD object

Parameters:
width - the new width in pixels
height - the new height in pixels

setSize

void setSize(java.awt.Dimension dimension)
Sets the width and height of the HUD object

Parameters:
dimension - the new width and height of the HUD object

getSize

java.awt.Dimension getSize()
Gets the size of the HUD object

Returns:
the component's size

setBounds

void setBounds(java.awt.Rectangle bounds)
Sets the bounds (x, y position, width, height) of the HUD object

Parameters:
bounds - the bounds of the HUD object

setBounds

void setBounds(int x,
               int y,
               int width,
               int height)
Sets the position and size of the HUD object

Parameters:
x - the new x-coordinate of this HUD object
y - the new y-coordinate of this HUD object
width - the new width of this HUD object
height - the new height of this HUD object

getBounds

java.awt.Rectangle getBounds()
Gets the bounds of the HUD object

Returns:
the bounds of the HUD object

setX

void setX(int x)
Sets the x-coordinate of the HUD object's origin

Parameters:
x - the x-coordinate of the HUD object's origin

getX

int getX()
Gets the x-coordinate of the HUD object's origin

Returns:
the x-coordinate of the HUD object's origin

setY

void setY(int y)
Sets the y-coordinate of the HUD object's origin

Parameters:
y - the y-coordinate of the HUD object's origin

getY

int getY()
Gets the y-coordinate of the HUD object's origin

Returns:
the y-coordinate of the HUD object's origin

setLocation

void setLocation(java.awt.Point p)
Moves the HUD object to a new location

Parameters:
p - the new position of the HUD object

setLocation

void setLocation(int x,
                 int y)
Moves the HUD object to a new location

Parameters:
x - the new x-coordinate of this HUD object
y - the new y-coordinate of this HUD object

setLocation

void setLocation(int x,
                 int y,
                 boolean notify)
Moves the HUD object to a new location

Parameters:
x - the new x-coordinate of this HUD object
y - the new y-coordinate of this HUD object
notify - whether to notify HUD listeners

getLocation

java.awt.Point getLocation()
Gets the location of this HUD object in the form of a point specifying the view's origin

Returns:
a Point representing the origin of the HUD object

setPreferredLocation

void setPreferredLocation(CompassLayout.Layout compassPoint)
Sets the preferred location as a compass point

Parameters:
compassPoint - the compass point location

getPreferredLocation

CompassLayout.Layout getPreferredLocation()
Gets the preferred compass point location

Returns:
the preferred location as a compass point

setWorldLocation

void setWorldLocation(com.jme.math.Vector3f location)
Sets the location in 3D space

Parameters:
location - the location of the object in 3D space

getWorldLocation

com.jme.math.Vector3f getWorldLocation()
Gets the location of the object in 3D space

Returns:
the 3D location

setVisible

void setVisible(boolean visible)
Sets the visibility of the HUD object

Parameters:
visible - if true, shows the HUD object, otherwise hides the HUD object

setVisible

void setVisible(boolean visible,
                long when)
Sets the visibility of the HUD object after a specified time

Parameters:
visible - if true, shows the HUD object, otherwise hides the HUD object
when - the visibility of the object will change after when milliseconds

isVisible

boolean isVisible()
Gets whether the HUD object is visible

Returns:
true if the HUD object should be visible, false otherwise

setWorldVisible

void setWorldVisible(boolean worldVisible)
Sets the visibility of the HUD object in-world

Parameters:
worldVisible - if true, shows the HUD object in world, otherwise hides the HUD object

setWorldVisible

void setWorldVisible(boolean visible,
                     long when)
Sets the visibility of the HUD object in-world after a specified time

Parameters:
visible - if true, shows the HUD object in world, otherwise hides the HUD object
when - the visibility of the object will change after when milliseconds

isWorldVisible

boolean isWorldVisible()
Gets whether the HUD object is visible in-world

Returns:
true if the HUD object should be visible in-world, false otherwise

setClosed

void setClosed()
Closes the component


setDisplayMode

void setDisplayMode(HUDObject.DisplayMode mode)
Sets the display mode, either in-world or on-HUD

Parameters:
mode - the new mode

getDisplayMode

HUDObject.DisplayMode getDisplayMode()
Gets the display mode

Returns:
the display mode: in-world or on-HUD

setPreferredTransparency

void setPreferredTransparency(java.lang.Float transparency)
Sets the preferred transparency of the HUD object on a scale of 0.0f to 1.0f, where 0.0f is opaque and 1.0f is completely transparent.

Parameters:
transparency - the preferred transparency of the HUD object

getPreferredTransparency

float getPreferredTransparency()
Gets the preferred transparency of the HUD object

Returns:
the preferred transparency of the HUD object on the scale of 0.0f to 1.0f

setTransparency

void setTransparency(java.lang.Float transparency)
Sets the transparency of the HUD object on a scale of 0.0f to 1.0f, where 0.0f is opaque and 1.0f is completely transparent.

Parameters:
transparency - the transparency of the HUD object

getTransparency

float getTransparency()
Gets the current transparency of the HUD object

Returns:
the transparency of the HUD object on the scale of 0.0f to 1.0f

changeTransparency

void changeTransparency(java.lang.Float from,
                        java.lang.Float to)
Changes the transparency of the HUD object from one transparency to another over the default duration, where 0.0f is opaque and 1.0f is completely transparent.

Parameters:
from - the initial transparency
to - the final transparency

changeTransparency

void changeTransparency(java.lang.Float from,
                        java.lang.Float to,
                        long duration)
Changes the transparency of the HUD object from one transparency to another over a specified duration, where 0.0f is opaque and 1.0f is completely transparent.

Parameters:
from - the initial transparency
to - the final transparency
duration - the time in milliseconds over which to effect the change

setEnabled

void setEnabled(boolean enabled)
Sets whether the HUD object is responsive to mouse and keyboard events

Parameters:
enabled - true if the HUD object is to be enabled, false otherwise

isEnabled

boolean isEnabled()
Gets whether the HUD object is enabled

Returns:
true if the HUD object is enabled, false otherwise

setMinimized

void setMinimized()
Minimizes a component


setMaximized

void setMaximized()
Maximizes a component


isMinimized

boolean isMinimized()
Gets the minimized state of a component

Returns:
true if the component is minimized, false otherwise

setDecoratable

void setDecoratable(boolean decoratable)
Sets whether the HUD object can be decorated

Parameters:
decoratable - true if the HUD object can be decorated, false otherwise

getDecoratable

boolean getDecoratable()
Gets whether the HUD object can be decorated

Returns:
true if the HUD object can be decorated, false otherwise

setIcon

void setIcon(javax.swing.ImageIcon iconImage)
Sets the icon to display when this HUD object is minimized

Parameters:
iconImage - the icon image

getIcon

javax.swing.ImageIcon getIcon()
Gets the icon for this HUD object

Returns:
the icon image

hasControl

boolean hasControl()
Gets whether the HUD object has control

Returns:
true if the HUD object has control, false otherwise


Open Wonderland - http://openwonderland.org