|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.gui.Component
com.threerings.opengl.gui.TextComponent
com.threerings.opengl.gui.Label
public class Label
A simple component for displaying a textual label.
| Nested Class Summary | |
|---|---|
static class |
Label.Fit
Configures the label's strategy when it does not fit into its allocated space. |
| Field Summary |
|---|
| Fields inherited from class com.threerings.opengl.gui.Component |
|---|
DEFAULT, DISABLED, HOVER |
| Fields inherited from interface com.threerings.opengl.gui.UIConstants |
|---|
BOTTOM, CENTER, DEFAULT_SIZE, DEFAULT_SPACING, GLOW, HORIZONTAL, LEFT, NORMAL, OUTLINE, OVERLAPPING, PLAIN, RIGHT, SHADOW, TOP, VERTICAL |
| Constructor Summary | |
|---|---|
Label(GlContext ctx,
Icon icon)
Creates a label that will display the supplied icon. |
|
Label(GlContext ctx,
Icon icon,
String text)
Creates a label that will display the supplied text and icon using the specified style config. |
|
Label(GlContext ctx,
String text)
Creates a label that will display the supplied text. |
|
| Method Summary | |
|---|---|
Label.Fit |
getFit()
Returns the current fit mode for this label. |
Icon |
getIcon()
Returns the icon being displayed by this label. |
int |
getIconTextGap()
Returns the gap between the icon and the text. |
LabelRenderer |
getLabelRenderer()
Returns a reference to teh label's renderer. |
String |
getText()
Returns the text currently being displayed by this component. |
void |
setFit(Label.Fit mode)
Configures whether this label will wrap, truncate or scale if it cannot fit text into its allotted width. |
void |
setIcon(Icon icon)
Configures the label to display the specified icon. |
void |
setIconTextGap(int gap)
Configures the gap between the icon and the text. |
void |
setOrientation(int orient)
Sets the orientation of this label with respect to its icon. |
void |
setPreferredWidth(int width)
Configures the preferred width of this label (the preferred height will be calculated from the font). |
void |
setText(String text)
Updates the text displayed by this component. |
void |
setTextRotation(int rotation)
Sets the rotation for the text (in ninety degree increments). |
| Methods inherited from class com.threerings.opengl.gui.TextComponent |
|---|
getEffectColor, getEffectSize, getHorizontalAlignment, getLineSpacing, getTextEffect, getTextFactory, getVerticalAlignment |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Label(GlContext ctx,
String text)
public Label(GlContext ctx,
Icon icon)
public Label(GlContext ctx,
Icon icon,
String text)
| Method Detail |
|---|
public void setIcon(Icon icon)
public Icon getIcon()
public void setIconTextGap(int gap)
public int getIconTextGap()
public void setTextRotation(int rotation)
public void setOrientation(int orient)
public void setFit(Label.Fit mode)
public Label.Fit getFit()
public void setPreferredWidth(int width)
public LabelRenderer getLabelRenderer()
public void setText(String text)
TextComponent
setText in class TextComponentpublic String getText()
TextComponent
getText in class TextComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||