|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.gui.LabelRenderer
public class LabelRenderer
Handles the underlying layout and rendering for Label and Button.
| Field Summary |
|---|
| 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 | |
|---|---|
LabelRenderer(TextComponent container)
|
|
| Method Summary | |
|---|---|
Dimension |
computePreferredSize(int whint,
int hhint)
Computes the preferred size of the label. |
Icon |
getIcon()
Returns the icon being displayed by this label. |
int |
getIconTextGap()
Returns the gap between the icon and the text. |
int |
getIconX()
Returns the x coordinate of the icon. |
int |
getIconY()
Returns the y coordinate of the icon. |
String |
getText()
Returns the text currently being displayed by this label. |
void |
layout(Insets insets,
int contWidth,
int contHeight)
Lays out the label text and icon. |
void |
render(Renderer renderer,
int x,
int y,
int contWidth,
int contHeight,
float alpha)
Renders the label text and icon. |
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 label. |
void |
setTextRotation(int rotation)
Sets the rotation for the text (in ninety degree increments). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LabelRenderer(TextComponent container)
| Method Detail |
|---|
public void setText(String text)
public String getText()
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 void setPreferredWidth(int width)
public Dimension computePreferredSize(int whint,
int hhint)
public void layout(Insets insets,
int contWidth,
int contHeight)
public int getIconX()
public int getIconY()
public void render(Renderer renderer,
int x,
int y,
int contWidth,
int contHeight,
float alpha)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||