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:
NumberLabel.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()
          Creates a new Label.Description.
Label.Description(org.openmali.vecmath2.Colorf color)
          Creates a new Label.Description.
Label.Description(org.openmali.vecmath2.Colorf color, TextAlignment alignment)
          Creates a new Label.Description.
Label.Description(java.awt.Font font)
          Creates a new Label.Description.
Label.Description(java.awt.Font font, org.openmali.vecmath2.Colorf color)
          Creates a new Label.Description.
Label.Description(java.awt.Font font, org.openmali.vecmath2.Colorf color, TextAlignment alignment)
          Creates a new Label.Description.
Label.Description(java.awt.Font font, org.openmali.vecmath2.Colorf color, TextAlignment alignment, Texture bgTex)
          Creates a new Label.Description.
Label.Description(java.awt.Font font, TextAlignment alignment)
          Creates a new Label.Description.
Label.Description(Label.Description desc)
          Clon-Constructor
Label.Description(TextAlignment alignment)
          Creates a new Label.Description.
 
Method Summary
 Label.Description clone()
           
static java.awt.Font deriveDisabledFont(java.awt.Font enabledFont)
           
 TextAlignment getAlignment()
           
 org.openmali.vecmath2.Colorf getBackgroundColor()
           
 Texture getBackgroundTexture()
           
 java.awt.Font 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(Texture texture)
          Sets the background texture of this label
 void setFont(java.awt.Font 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

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

Parameters:
desc - the original to clone

Label.Description

public Label.Description(java.awt.Font font,
                         org.openmali.vecmath2.Colorf color,
                         TextAlignment alignment,
                         Texture bgTex)
Creates a new Label.Description.

Parameters:
font - the Font to be used for the text
color - the color to be used
alignment - the horizontal and vertical alignment
bgTex - the background texture

Label.Description

public Label.Description(java.awt.Font font,
                         org.openmali.vecmath2.Colorf color,
                         TextAlignment alignment)
Creates a new Label.Description.

Parameters:
font - the Font to be used for the text
color - the color to be used
alignment - the horizontal and vertical alignment

Label.Description

public Label.Description(TextAlignment alignment)
Creates a new Label.Description.

Parameters:
alignment - the horizontal and vertical alignment

Label.Description

public Label.Description(org.openmali.vecmath2.Colorf color,
                         TextAlignment alignment)
Creates a new Label.Description.

Parameters:
color - the color to be used
alignment - the horizontal and vertical alignment

Label.Description

public Label.Description(java.awt.Font font,
                         org.openmali.vecmath2.Colorf color)
Creates a new Label.Description.

Parameters:
font - the Font to be used for the text
color - the color to be used

Label.Description

public Label.Description(org.openmali.vecmath2.Colorf color)
Creates a new Label.Description.

Parameters:
color - the color to be used

Label.Description

public Label.Description(java.awt.Font font)
Creates a new Label.Description.

Parameters:
font - the Font to be used for the text

Label.Description

public Label.Description(java.awt.Font font,
                         TextAlignment alignment)
Creates a new Label.Description.

Parameters:
font - the Font to be used for the text
alignment - the horizontal and vertical alignment

Label.Description

public Label.Description()
Creates a new Label.Description.

Parameters:
disabled -
Method Detail

getBackgroundTexture

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

setBackgroundTexture

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

Parameters:
texture - the texture to use

setBackgroundTexture

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

Parameters:
texture - the texture resource to use

getBackgroundColor

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

setBackgroundColor

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

Parameters:
color - the color 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(java.awt.Font font,
                    boolean disabled)
Sets the new Font to be used

Parameters:
font - the new Font
disabled -

getFont

public java.awt.Font 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 java.awt.Font deriveDisabledFont(java.awt.Font 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