org.xith3d.ui.hud.widgets
Class Label.Description

java.lang.Object
  extended by org.xith3d.ui.hud.base.Widget.DescriptionBase
      extended by org.xith3d.ui.hud.widgets.Label.Description
Direct Known Subclasses:
TextField.Description, WindowHeaderWidget.Description
Enclosing class:
Label

public static class Label.Description
extends Widget.DescriptionBase

This class is used to describe a (set of) Label Widget(s). You can pass it to the Label constructor. Modifications on the used instance after creating the Label Widget won't have any effect.


Constructor Summary
  Label.Description(org.openmali.vecmath2.Colorf backgroundColor, java.lang.String backgroundTexture, HUDFont font_enabled, HUDFont font_disabled, org.openmali.vecmath2.Colorf color_enabled, org.openmali.vecmath2.Colorf color_disabled, TextAlignment alignment)
          Creates a new Label.Description.
  Label.Description(org.openmali.vecmath2.Colorf backgroundColor, Texture2D backgroundTexture, HUDFont font_enabled, HUDFont font_disabled, org.openmali.vecmath2.Colorf color_enabled, org.openmali.vecmath2.Colorf color_disabled, TextAlignment alignment)
          Creates a new Label.Description.
protected Label.Description(Label.Description desc)
          Clon-Constructor
 
Method Summary
 Label.Description clone()
           
static HUDFont deriveDisabledFont(HUDFont enabledFont)
           
 TextAlignment getAlignment()
           
 org.openmali.vecmath2.Colorf getBackgroundColor()
           
 Texture2D getBackgroundTexture()
           
 HUDFont getFont(boolean disabled)
           
 org.openmali.vecmath2.Colorf getFontColor(boolean disabled)
           
 void set(Label.Description desc)
          Clon-Constructor
 void setAlignment(TextAlignment alignment)
          Sets the horizontal and vertical alignment of the text
 void setBackgroundColor(org.openmali.vecmath2.Colorf color)
          Sets the background color of this label
 void setBackgroundTexture(java.lang.String texture)
          Sets the background texture of this label
 void setBackgroundTexture(Texture2D texture)
          Sets the background texture of this label
 void setFont(HUDFont font, boolean disabled)
          Sets the new Font to be used
 void setFontColor(org.openmali.vecmath2.Colorf color, boolean disabled)
          Sets the new color to be used
 
Methods inherited from class org.xith3d.ui.hud.base.Widget.DescriptionBase
toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Label.Description

protected Label.Description(Label.Description desc)
Clon-Constructor

Parameters:
desc - the original to clone

Label.Description

public Label.Description(org.openmali.vecmath2.Colorf backgroundColor,
                         Texture2D backgroundTexture,
                         HUDFont font_enabled,
                         HUDFont font_disabled,
                         org.openmali.vecmath2.Colorf color_enabled,
                         org.openmali.vecmath2.Colorf color_disabled,
                         TextAlignment alignment)
Creates a new Label.Description.

Parameters:
backgroundColor -
backgroundTexture - the background texture
font_enabled - the Font to be used for the text
font_disabled - the Font to be used for the text
color_enabled - the color to be used
color_disabled - the color to be used
alignment - the horizontal and vertical alignment

Label.Description

public Label.Description(org.openmali.vecmath2.Colorf backgroundColor,
                         java.lang.String backgroundTexture,
                         HUDFont font_enabled,
                         HUDFont font_disabled,
                         org.openmali.vecmath2.Colorf color_enabled,
                         org.openmali.vecmath2.Colorf color_disabled,
                         TextAlignment alignment)
Creates a new Label.Description.

Parameters:
backgroundColor -
backgroundTexture - the background texture
font_enabled - the Font to be used for the text
font_disabled - the Font to be used for the text
color_enabled - the color to be used
color_disabled - the color to be used
alignment - the horizontal and vertical alignment
Method Detail

getBackgroundTexture

public final Texture2D getBackgroundTexture()
Returns:
the background texture of this label

setBackgroundTexture

public void setBackgroundTexture(Texture2D texture)
Sets the background texture of this label

Parameters:
texture - the texture to use

setBackgroundColor

public void setBackgroundColor(org.openmali.vecmath2.Colorf color)
Sets the background color of this label

Parameters:
color - the color to use

getBackgroundColor

public org.openmali.vecmath2.Colorf getBackgroundColor()
Returns:
the background color of this label

setBackgroundTexture

public void setBackgroundTexture(java.lang.String texture)
Sets the background texture of this label

Parameters:
texture - the texture resource to use

setAlignment

public void setAlignment(TextAlignment alignment)
Sets the horizontal and vertical alignment of the text


getAlignment

public TextAlignment getAlignment()
Returns:
the horizontal and vertical alignment of the text

setFont

public void setFont(HUDFont font,
                    boolean disabled)
Sets the new Font to be used

Parameters:
font - the new Font
disabled -

getFont

public HUDFont getFont(boolean disabled)
Returns:
the used Font

setFontColor

public void setFontColor(org.openmali.vecmath2.Colorf color,
                         boolean disabled)
Sets the new color to be used

Parameters:
color - the new color
disabled -

getFontColor

public org.openmali.vecmath2.Colorf getFontColor(boolean disabled)
Returns:
the used color

deriveDisabledFont

public static HUDFont deriveDisabledFont(HUDFont enabledFont)

set

public void set(Label.Description desc)
Clon-Constructor

Parameters:
desc - the original to clone

clone

public Label.Description clone()
Overrides:
clone in class java.lang.Object
Returns:
a clone of this instance