public class TextComponent extends AbstractGuiComponent implements ColoredComponent
| Constructor and Description |
|---|
TextComponent(java.lang.String text,
com.jme3.font.BitmapFont font) |
| Modifier and Type | Method and Description |
|---|---|
void |
attach(GuiControl parent) |
void |
calculatePreferredSize(com.jme3.math.Vector3f size) |
TextComponent |
clone() |
TextComponent |
color(com.jme3.math.ColorRGBA color) |
void |
detach(GuiControl parent) |
float |
getAlpha()
Returns the current alpha multiplier that is applied
to the color when set to the actual visuals.
|
com.jme3.math.ColorRGBA |
getColor()
Returns the current color of this component.
|
com.jme3.font.BitmapFont |
getFont() |
float |
getFontSize() |
HAlignment |
getHAlignment() |
int |
getLayer() |
float |
getMaxWidth() |
com.jme3.math.Vector3f |
getOffset() |
java.lang.String |
getText() |
float |
getTextSize() |
VAlignment |
getVAlignment() |
TextComponent |
offset(float x,
float y,
float z) |
protected void |
resetAlignment() |
protected void |
resetLayer() |
void |
reshape(com.jme3.math.Vector3f pos,
com.jme3.math.Vector3f size) |
void |
setAlpha(float f)
Sets an alpha multiplier that will be applied to the
color when set to the actual visuals.
|
void |
setColor(com.jme3.math.ColorRGBA color)
Sets the color for this component.
|
void |
setFont(com.jme3.font.BitmapFont font) |
void |
setFontSize(float size) |
void |
setHAlignment(HAlignment a) |
void |
setLayer(int layer) |
void |
setMaxWidth(float f)
For values greater than 0, this will constrain the maximum
width of the text box.
|
void |
setOffset(float x,
float y,
float z) |
void |
setOffset(com.jme3.math.Vector3f offset) |
void |
setText(java.lang.String text) |
void |
setTextSize(float f) |
void |
setVAlignment(VAlignment a) |
getGuiControl, getNode, invalidate, isAttachedpublic TextComponent(java.lang.String text,
com.jme3.font.BitmapFont font)
public TextComponent clone()
clone in interface GuiComponentclone in class AbstractGuiComponentpublic void attach(GuiControl parent)
attach in interface GuiComponentattach in class AbstractGuiComponentpublic void detach(GuiControl parent)
detach in interface GuiComponentdetach in class AbstractGuiComponentpublic void setText(java.lang.String text)
public java.lang.String getText()
public void setLayer(int layer)
public int getLayer()
public void setHAlignment(HAlignment a)
public HAlignment getHAlignment()
public void setVAlignment(VAlignment a)
public VAlignment getVAlignment()
public void setMaxWidth(float f)
public float getMaxWidth()
public void setFont(com.jme3.font.BitmapFont font)
public com.jme3.font.BitmapFont getFont()
public void setFontSize(float size)
public float getFontSize()
public void setColor(com.jme3.math.ColorRGBA color)
ColoredComponentsetColor in interface ColoredComponentpublic com.jme3.math.ColorRGBA getColor()
ColoredComponentgetColor in interface ColoredComponentpublic void setAlpha(float f)
ColoredComponentsetAlpha in interface ColoredComponentpublic float getAlpha()
ColoredComponentgetAlpha in interface ColoredComponentpublic TextComponent color(com.jme3.math.ColorRGBA color)
public TextComponent offset(float x, float y, float z)
public void setOffset(float x,
float y,
float z)
public void setOffset(com.jme3.math.Vector3f offset)
public com.jme3.math.Vector3f getOffset()
public void setTextSize(float f)
public float getTextSize()
public void reshape(com.jme3.math.Vector3f pos,
com.jme3.math.Vector3f size)
reshape in interface GuiComponentpublic void calculatePreferredSize(com.jme3.math.Vector3f size)
calculatePreferredSize in interface GuiComponentprotected void resetAlignment()
protected void resetLayer()