org.xith3d.ui.hud.widgets
Class DynamicLabel

java.lang.Object
  extended by org.xith3d.ui.hud.base.WidgetBase
      extended by org.xith3d.ui.hud.base.RectangularWidget
          extended by org.xith3d.ui.hud.widgets.Label
              extended by org.xith3d.ui.hud.widgets.DynamicLabel
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

public class DynamicLabel
extends Label

A DynamicLabel is optimized to display highly dynamic text content on your HUD. Please compare the performance with a regular Label for your situation.

See Also:
Label, NumberLabel

Nested Class Summary
 
Nested classes/interfaces inherited from class org.xith3d.ui.hud.widgets.Label
Label.Description
 
Nested classes/interfaces inherited from interface org.xith3d.ui.hud.base.Widget
Widget.DescriptionBase
 
Field Summary
 
Fields inherited from class org.xith3d.ui.hud.widgets.Label
autoSize
 
Fields inherited from class org.xith3d.ui.hud.base.WidgetBase
containerListeners, transformGroup, translation, Z_INDEX_UNIT, Z_INDEX_UNIT_ASSEMBLER
 
Constructor Summary
DynamicLabel(float width, float height)
          Creates a new DynamicLabel with the given width and height and no text initially.
DynamicLabel(float width, float height, int zIndex)
          Creates a new DynamicLabel with the given width, height and z-index and no text initially.
DynamicLabel(float width, float height, int zIndex, java.lang.String text)
          Creates a new DynamicLabel with the given width and height and no text initially.
DynamicLabel(float width, float height, int zIndex, java.lang.String text, org.openmali.vecmath2.Colorf color)
          Creates a new DynamicLabel with the given width, height and z-index.
DynamicLabel(float width, float height, int zIndex, java.lang.String text, org.openmali.vecmath2.Colorf color, TextAlignment alignment)
          Creates a new DynamicLabel with the given width and height and a z-index of 0.
DynamicLabel(float width, float height, int zIndex, java.lang.String text, java.awt.Font font, org.openmali.vecmath2.Colorf color)
          Creates a new DynamicLabel with the given width, height and z-index.
DynamicLabel(float width, float height, int zIndex, java.lang.String text, java.awt.Font font, org.openmali.vecmath2.Colorf color, TextAlignment alignment)
          Creates a new DynamicLabel with the given width, height and z-index.
DynamicLabel(float width, float height, int zIndex, java.lang.String text, Label.Description labelDesc)
          Creates a new DynamicLabel with the given width, height and z-index.
DynamicLabel(float width, float height, int zIndex, java.lang.String text, TextAlignment alignment)
          Creates a new DynamicLabel with the given width and height and a z-index of 0.
DynamicLabel(float width, float height, java.lang.String text)
          Creates a new DynamicLabel with the given width and height and no text initially.
DynamicLabel(float width, float height, java.lang.String text, org.openmali.vecmath2.Colorf color)
          Creates a new DynamicLabel with the given width and height and a z-index of 0.
DynamicLabel(float width, float height, java.lang.String text, org.openmali.vecmath2.Colorf color, TextAlignment alignment)
          Creates a new DynamicLabel with the given width and height and a z-index of 0.
DynamicLabel(float width, float height, java.lang.String text, java.awt.Font font)
          Creates a new DynamicLabel with the given width and height and a z-index of 0.
DynamicLabel(float width, float height, java.lang.String text, java.awt.Font font, org.openmali.vecmath2.Colorf color)
          Creates a new DynamicLabel with the given width and height and a z-index of 0.
DynamicLabel(float width, float height, java.lang.String text, java.awt.Font font, org.openmali.vecmath2.Colorf color, TextAlignment alignment)
          Creates a new DynamicLabel with the given width and height and a z-index of 0.
DynamicLabel(float width, float height, java.lang.String text, java.awt.Font font, TextAlignment alignment)
          Creates a new DynamicLabel with the given width and height and a z-index of 0.
DynamicLabel(float width, float height, java.lang.String text, Label.Description labelDesc)
          Creates a new DynamicLabel with the given width, height and z-index.
DynamicLabel(float width, float height, java.lang.String text, TextAlignment alignment)
          Creates a new DynamicLabel with the given width and height and a z-index of 0.
DynamicLabel(org.openmali.types.twodee.Sized2fRO size)
          Creates a new DynamicLabel with the given width and height and no text initially.
DynamicLabel(org.openmali.types.twodee.Sized2fRO size, int zIndex)
          Creates a new DynamicLabel with the given width, height and z-index and no text initially.
DynamicLabel(org.openmali.types.twodee.Sized2fRO size, int zIndex, java.lang.String text, org.openmali.vecmath2.Colorf color)
          Creates a new DynamicLabel with the given width, height and z-index.
DynamicLabel(org.openmali.types.twodee.Sized2fRO size, int zIndex, java.lang.String text, org.openmali.vecmath2.Colorf color, TextAlignment alignment)
          Creates a new DynamicLabel with the given width and height and a z-index of 0.
DynamicLabel(org.openmali.types.twodee.Sized2fRO size, int zIndex, java.lang.String text, java.awt.Font font, org.openmali.vecmath2.Colorf color)
          Creates a new DynamicLabel with the given width, height and z-index.
DynamicLabel(org.openmali.types.twodee.Sized2fRO size, int zIndex, java.lang.String text, java.awt.Font font, org.openmali.vecmath2.Colorf color, TextAlignment alignment)
          Creates a new DynamicLabel with the given width, height and z-index.
DynamicLabel(org.openmali.types.twodee.Sized2fRO size, int zIndex, java.lang.String text, Label.Description labelDesc)
          Creates a new DynamicLabel with the given width, height and z-index.
DynamicLabel(org.openmali.types.twodee.Sized2fRO size, int zIndex, java.lang.String text, TextAlignment alignment)
          Creates a new DynamicLabel with the given width and height and a z-index of 0.
DynamicLabel(org.openmali.types.twodee.Sized2fRO size, java.lang.String text)
          Creates a new DynamicLabel with the given width and height and no text initially.
DynamicLabel(org.openmali.types.twodee.Sized2fRO size, java.lang.String text, org.openmali.vecmath2.Colorf color)
          Creates a new DynamicLabel with the given width and height and a z-index of 0.
DynamicLabel(org.openmali.types.twodee.Sized2fRO size, java.lang.String text, org.openmali.vecmath2.Colorf color, TextAlignment alignment)
          Creates a new DynamicLabel with the given width and height and a z-index of 0.
DynamicLabel(org.openmali.types.twodee.Sized2fRO size, java.lang.String text, java.awt.Font font)
          Creates a new DynamicLabel with the given width and height and a z-index of 0.
DynamicLabel(org.openmali.types.twodee.Sized2fRO size, java.lang.String text, java.awt.Font font, org.openmali.vecmath2.Colorf color)
          Creates a new DynamicLabel with the given width and height and a z-index of 0.
DynamicLabel(org.openmali.types.twodee.Sized2fRO size, java.lang.String text, java.awt.Font font, org.openmali.vecmath2.Colorf color, TextAlignment alignment)
          Creates a new DynamicLabel with the given width and height and a z-index of 0.
DynamicLabel(org.openmali.types.twodee.Sized2fRO size, java.lang.String text, java.awt.Font font, TextAlignment alignment)
          Creates a new DynamicLabel with the given width and height and a z-index of 0.
DynamicLabel(org.openmali.types.twodee.Sized2fRO size, java.lang.String text, Label.Description labelDesc)
          Creates a new DynamicLabel with the given width, height and z-index.
DynamicLabel(org.openmali.types.twodee.Sized2fRO size, java.lang.String text, TextAlignment alignment)
          Creates a new DynamicLabel with the given width and height and a z-index of 0.
 
Method Summary
protected  void fixTranslation(org.openmali.vecmath2.Tuple2f offset)
           
 Text2D getTextNode()
           
 Rectangle getTextRectangle()
          
 float getTransparency()
          
protected  void init()
          This method is called when the WidgetContainer is set.
 void setMinimalSize()
          Resizes this Label to the minimum Size needed to contain the whole caption.
 boolean setSize(float width, float height, boolean forced)
          
 void setTransparency(float transparency)
          Sets the whole Widget's Transparency.
protected  void updateText()
           
 
Methods inherited from class org.xith3d.ui.hud.widgets.Label
getAlignment, getBackground, getBackgroundColor, getBackgroundTileHeight, getBackgroundTileSize, getBackgroundTileWidth, getContentGroup, getDisplayedText, getFont, getFont, getFontColor, getFontColor, getFontColorDisabled, getFontDisabled, getMinimalSize, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getText, isAutoSizeEnabled, isEnabled, setAlignment, setAutoSizeEnabled, setBackground, setBackground, setBackground, setBackgroundTileSize, setBackgroundTileSize, setContainer, setEnabled, setEnabledImpl, setFont, setFontColor, setFontColorDisabled, setFontDisabled, setPadding, setPadding, setText, toString, updateTranslation
 
Methods inherited from class org.xith3d.ui.hud.base.RectangularWidget
getPickHeight, getPickSGZPosition, getPickWidth, pick
 
Methods inherited from class org.xith3d.ui.hud.base.WidgetBase
addContainerListener, addFocusListener, addInputListener, addLocationListener, addSizeListener, addVisibilityListener, detach, detach, getAspect, getAssembly, getCachedToolTipWidget, getContainer, getContextMenu, 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, onMouseButtonReleased, onMouseEntered, onMouseLeft, onMouseMoved, onMouseStopped, onMouseUnbound, onMouseWheelMoved, onRemovedFromContainer, pickWidgetAssembler, removeContainerListener, removeFocusListener, removeInputListener, removeLocationListener, removeSizeListener, removeVisibilityListener, requestFocus, setAssembly, setCachedToolTipWidget, setClickable, setContextMenu, 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, getContextMenu, 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, onMouseButtonReleased, onMouseEntered, onMouseLeft, onMouseMoved, onMouseStopped, onMouseUnbound, onMouseWheelMoved, pick, removeContainerListener, removeFocusListener, removeInputListener, removeLocationListener, removeSizeListener, removeVisibilityListener, requestFocus, setAssembly, setCachedToolTipWidget, setClickable, setContextMenu, 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
 

Constructor Detail

DynamicLabel

public DynamicLabel(float width,
                    float height,
                    int zIndex,
                    java.lang.String text,
                    Label.Description labelDesc)
Creates a new DynamicLabel with the given width, height and z-index.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
zIndex - the z-index of this Widget
text - the text to display in this TextWidget
labelDesc - a LabelDescription instance holding information about font, color, alignment and background-texture

DynamicLabel

public DynamicLabel(float width,
                    float height,
                    java.lang.String text,
                    Label.Description labelDesc)
Creates a new DynamicLabel with the given width, height and z-index.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
text - the text to display in this TextWidget
labelDesc - a LabelDescription instance holding information about font, color, alignment and background-texture

DynamicLabel

public DynamicLabel(org.openmali.types.twodee.Sized2fRO size,
                    int zIndex,
                    java.lang.String text,
                    Label.Description labelDesc)
Creates a new DynamicLabel with the given width, height and z-index.

Parameters:
size - the new size of this Widget
zIndex - the z-index of this Widget
text - the text to display in this TextWidget
labelDesc - a LabelDescription instance holding information about font, color, alignment and background-texture

DynamicLabel

public DynamicLabel(org.openmali.types.twodee.Sized2fRO size,
                    java.lang.String text,
                    Label.Description labelDesc)
Creates a new DynamicLabel with the given width, height and z-index.

Parameters:
size - the new size of this Widget
text - the text to display in this TextWidget
labelDesc - a LabelDescription instance holding information about font, color, alignment and background-texture

DynamicLabel

public DynamicLabel(float width,
                    float height,
                    int zIndex,
                    java.lang.String text,
                    java.awt.Font font,
                    org.openmali.vecmath2.Colorf color,
                    TextAlignment alignment)
Creates a new DynamicLabel with the given width, height and z-index.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
zIndex - the z-index of this Widget
text - the text to display in this TextWidget
font - the Font to be used for the text
color - the color to be used
alignment - the horizontal and vertical alignment

DynamicLabel

public DynamicLabel(org.openmali.types.twodee.Sized2fRO size,
                    int zIndex,
                    java.lang.String text,
                    java.awt.Font font,
                    org.openmali.vecmath2.Colorf color,
                    TextAlignment alignment)
Creates a new DynamicLabel with the given width, height and z-index.

Parameters:
size - the new size of this Widget
zIndex - the z-index of this Widget
text - the text to display in this TextWidget
font - the Font to be used for the text
color - the color to be used
alignment - the horizontal and vertical alignment

DynamicLabel

public DynamicLabel(org.openmali.types.twodee.Sized2fRO size,
                    int zIndex,
                    java.lang.String text,
                    TextAlignment alignment)
Creates a new DynamicLabel with the given width and height and a z-index of 0.

Parameters:
size - the new size of this Widget
zIndex - the z-index of this Widget
text - the text to display in this TextWidget
alignment - the horizontal and vertical alignment

DynamicLabel

public DynamicLabel(float width,
                    float height,
                    int zIndex,
                    java.lang.String text,
                    TextAlignment alignment)
Creates a new DynamicLabel with the given width and height and a z-index of 0.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
zIndex - the z-index of this Widget
text - the text to display in this TextWidget
alignment - the horizontal and vertical alignment

DynamicLabel

public DynamicLabel(org.openmali.types.twodee.Sized2fRO size,
                    java.lang.String text,
                    TextAlignment alignment)
Creates a new DynamicLabel with the given width and height and a z-index of 0.

Parameters:
size - the new size of this Widget
text - the text to display in this TextWidget
alignment - the horizontal and vertical alignment

DynamicLabel

public DynamicLabel(float width,
                    float height,
                    java.lang.String text,
                    TextAlignment alignment)
Creates a new DynamicLabel with the given width and height and a z-index of 0.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
text - the text to display in this TextWidget
alignment - the horizontal and vertical alignment

DynamicLabel

public DynamicLabel(org.openmali.types.twodee.Sized2fRO size,
                    int zIndex,
                    java.lang.String text,
                    org.openmali.vecmath2.Colorf color,
                    TextAlignment alignment)
Creates a new DynamicLabel with the given width and height and a z-index of 0.

Parameters:
size - the new size of this Widget
zIndex - the z-index of this Widget
text - the text to display in this TextWidget
color - the color to be used
alignment - the horizontal and vertical alignment

DynamicLabel

public DynamicLabel(float width,
                    float height,
                    int zIndex,
                    java.lang.String text,
                    org.openmali.vecmath2.Colorf color,
                    TextAlignment alignment)
Creates a new DynamicLabel with the given width and height and a z-index of 0.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
zIndex - the z-index of this Widget
text - the text to display in this TextWidget
color - the color to be used
alignment - the horizontal and vertical alignment

DynamicLabel

public DynamicLabel(org.openmali.types.twodee.Sized2fRO size,
                    java.lang.String text,
                    org.openmali.vecmath2.Colorf color,
                    TextAlignment alignment)
Creates a new DynamicLabel with the given width and height and a z-index of 0.

Parameters:
size - the new size of this Widget
text - the text to display in this TextWidget
color - the color to be used
alignment - the horizontal and vertical alignment

DynamicLabel

public DynamicLabel(float width,
                    float height,
                    java.lang.String text,
                    org.openmali.vecmath2.Colorf color,
                    TextAlignment alignment)
Creates a new DynamicLabel with the given width and height and a z-index of 0.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
text - the text to display in this TextWidget
color - the color to be used
alignment - the horizontal and vertical alignment

DynamicLabel

public DynamicLabel(org.openmali.types.twodee.Sized2fRO size,
                    java.lang.String text,
                    java.awt.Font font,
                    org.openmali.vecmath2.Colorf color,
                    TextAlignment alignment)
Creates a new DynamicLabel with the given width and height and a z-index of 0.

Parameters:
size - the new size of this Widget
text - the text to display in this TextWidget
font - the Font to be used for the text
color - the color to be used
alignment - the horizontal and vertical alignment

DynamicLabel

public DynamicLabel(float width,
                    float height,
                    java.lang.String text,
                    java.awt.Font font,
                    org.openmali.vecmath2.Colorf color,
                    TextAlignment alignment)
Creates a new DynamicLabel with the given width and height and a z-index of 0.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
text - the text to display in this TextWidget
font - the Font to be used for the text
color - the color to be used
alignment - the horizontal and vertical alignment

DynamicLabel

public DynamicLabel(org.openmali.types.twodee.Sized2fRO size,
                    int zIndex,
                    java.lang.String text,
                    java.awt.Font font,
                    org.openmali.vecmath2.Colorf color)
Creates a new DynamicLabel with the given width, height and z-index.

Parameters:
size - the new size of this Widget
zIndex - the z-index of this Widget
text - the text to display in this TextWidget
font - the Font to be used for the text
color - the color to be used

DynamicLabel

public DynamicLabel(float width,
                    float height,
                    int zIndex,
                    java.lang.String text,
                    java.awt.Font font,
                    org.openmali.vecmath2.Colorf color)
Creates a new DynamicLabel with the given width, height and z-index.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
zIndex - the z-index of this Widget
text - the text to display in this TextWidget
font - the Font to be used for the text
color - the color to be used

DynamicLabel

public DynamicLabel(org.openmali.types.twodee.Sized2fRO size,
                    java.lang.String text,
                    java.awt.Font font,
                    org.openmali.vecmath2.Colorf color)
Creates a new DynamicLabel with the given width and height and a z-index of 0.

Parameters:
size - the new size of this Widget
text - the text to display in this TextWidget
font - the Font to be used for the text
color - the color to be used

DynamicLabel

public DynamicLabel(float width,
                    float height,
                    java.lang.String text,
                    java.awt.Font font,
                    org.openmali.vecmath2.Colorf color)
Creates a new DynamicLabel with the given width and height and a z-index of 0.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
text - the text to display in this TextWidget
font - the Font to be used for the text
color - the color to be used

DynamicLabel

public DynamicLabel(org.openmali.types.twodee.Sized2fRO size,
                    int zIndex,
                    java.lang.String text,
                    org.openmali.vecmath2.Colorf color)
Creates a new DynamicLabel with the given width, height and z-index.

Parameters:
size - the new size of this Widget
zIndex - the z-index of this Widget
text - the text to display in this TextWidget
color - the color to be used

DynamicLabel

public DynamicLabel(float width,
                    float height,
                    int zIndex,
                    java.lang.String text,
                    org.openmali.vecmath2.Colorf color)
Creates a new DynamicLabel with the given width, height and z-index.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
zIndex - the z-index of this Widget
text - the text to display in this TextWidget
color - the color to be used

DynamicLabel

public DynamicLabel(org.openmali.types.twodee.Sized2fRO size,
                    java.lang.String text,
                    org.openmali.vecmath2.Colorf color)
Creates a new DynamicLabel with the given width and height and a z-index of 0.

Parameters:
size - the new size of this Widget
text - the text to display in this TextWidget
color - the color to be used

DynamicLabel

public DynamicLabel(float width,
                    float height,
                    java.lang.String text,
                    org.openmali.vecmath2.Colorf color)
Creates a new DynamicLabel with the given width and height and a z-index of 0.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
text - the text to display in this TextWidget
color - the color to be used

DynamicLabel

public DynamicLabel(org.openmali.types.twodee.Sized2fRO size,
                    java.lang.String text,
                    java.awt.Font font)
Creates a new DynamicLabel with the given width and height and a z-index of 0.

Parameters:
size - the new size of this Widget
text - the text to display in this TextWidget
font - the Font to be used for the text

DynamicLabel

public DynamicLabel(float width,
                    float height,
                    java.lang.String text,
                    java.awt.Font font)
Creates a new DynamicLabel with the given width and height and a z-index of 0.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
text - the text to display in this TextWidget
font - the Font to be used for the text

DynamicLabel

public DynamicLabel(org.openmali.types.twodee.Sized2fRO size,
                    java.lang.String text,
                    java.awt.Font font,
                    TextAlignment alignment)
Creates a new DynamicLabel with the given width and height and a z-index of 0.

Parameters:
size - the new size of this Widget
text - the text to display in this TextWidget
font - the Font to be used for the text
alignment - the horizontal and vertical alignment

DynamicLabel

public DynamicLabel(float width,
                    float height,
                    java.lang.String text,
                    java.awt.Font font,
                    TextAlignment alignment)
Creates a new DynamicLabel with the given width and height and a z-index of 0.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
text - the text to display in this TextWidget
font - the Font to be used for the text
alignment - the horizontal and vertical alignment

DynamicLabel

public DynamicLabel(org.openmali.types.twodee.Sized2fRO size,
                    int zIndex)
Creates a new DynamicLabel with the given width, height and z-index and no text initially.

Parameters:
size - the new size of this Widget
zIndex - the z-index of this Widget

DynamicLabel

public DynamicLabel(float width,
                    float height,
                    int zIndex)
Creates a new DynamicLabel with the given width, height and z-index and no text initially.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
zIndex - the z-index of this Widget

DynamicLabel

public DynamicLabel(org.openmali.types.twodee.Sized2fRO size)
Creates a new DynamicLabel with the given width and height and no text initially.

Parameters:
size - the new size of this Widget

DynamicLabel

public DynamicLabel(float width,
                    float height)
Creates a new DynamicLabel with the given width and height and no text initially.

Parameters:
width - the new width of this Widget
height - the new height of this Widget

DynamicLabel

public DynamicLabel(org.openmali.types.twodee.Sized2fRO size,
                    java.lang.String text)
Creates a new DynamicLabel with the given width and height and no text initially.

Parameters:
size - the new size of this Widget
text - the text to display in this TextWidget

DynamicLabel

public DynamicLabel(float width,
                    float height,
                    int zIndex,
                    java.lang.String text)
Creates a new DynamicLabel with the given width and height and no text initially.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
zIndex - the z-index of this Widget
text - the text to display in this TextWidget

DynamicLabel

public DynamicLabel(float width,
                    float height,
                    java.lang.String text)
Creates a new DynamicLabel with the given width and height and no text initially.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
text - the text to display in this TextWidget
Method Detail

setTransparency

public void setTransparency(float transparency)
Sets the whole Widget's Transparency.

Specified by:
setTransparency in interface Widget
Overrides:
setTransparency in class Label

getTransparency

public float getTransparency()

Specified by:
getTransparency in interface Widget
Overrides:
getTransparency in class Label
Returns:
the whole Widget's Transparency.

getTextRectangle

public Rectangle getTextRectangle()

Overrides:
getTextRectangle in class Label
Returns:
the untilized Quad to display the text

getTextNode

public Text2D getTextNode()
Returns:
the untilized Text2D object to display the text

updateText

protected void updateText()
Overrides:
updateText in class Label

setMinimalSize

public void setMinimalSize()
Resizes this Label to the minimum Size needed to contain the whole caption.

Overrides:
setMinimalSize in class Label

setSize

public boolean setSize(float width,
                       float height,
                       boolean forced)

Overrides:
setSize in class Label

fixTranslation

protected void fixTranslation(org.openmali.vecmath2.Tuple2f offset)
Overrides:
fixTranslation in class Label

init

protected void init()
This method is called when the WidgetContainer is set.

Overrides:
init in class Label