|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jmex.bui.BComponent
com.jmex.bui.BTextComponent
com.jmex.bui.BLabel
public class BLabel
A simple component for displaying a textual label.
| Nested Class Summary | |
|---|---|
static class |
BLabel.Fit
Configures the label's strategy when it does not fit into its allocated space. |
| Field Summary | |
|---|---|
protected Label |
_label
|
| Fields inherited from class com.jmex.bui.BTextComponent |
|---|
_effcols, _effsizes, _haligns, _lineSpacings, _teffects, _textfacts, _valigns |
| Fields inherited from class com.jmex.bui.BComponent |
|---|
_alpha, _backgrounds, _bbuf, _borders, _colors, _cursor, _enabled, _height, _hover, _insets, _listeners, _parent, _preferredSize, _properties, _styleClass, _tipmouse, _tipStyle, _tiptext, _valid, _visible, _width, _x, _y, DEFAULT, DISABLED, HOVER, STATE_COUNT, STATE_PCLASSES |
| Fields inherited from interface com.jmex.bui.BConstants |
|---|
BOTTOM, CENTER, DEFAULT_SIZE, DEFAULT_SPACING, GLOW, HORIZONTAL, LEFT, NORMAL, OUTLINE, OVERLAPPING, PLAIN, RIGHT, SHADOW, TOP, VERTICAL |
| Constructor Summary | |
|---|---|
BLabel(BIcon icon)
Creates a label that will display the supplied icon. |
|
BLabel(BIcon icon,
String styleClass)
Creates a label that will display the supplied icon using the specified style class. |
|
BLabel(BIcon icon,
String text,
String styleClass)
Creates a label that will display the supplied text and icon using the specified style class. |
|
BLabel(String text)
Creates a label that will display the supplied text. |
|
BLabel(String text,
String styleClass)
Creates a label that will display the supplied text using the specified style class. |
|
| Method Summary | |
|---|---|
protected Dimension |
computePreferredSize(int whint,
int hhint)
Computes and returns a preferred size for this component. |
protected String |
getDefaultStyleClass()
Returns the default stylesheet class to be used for all instances of this component. |
BLabel.Fit |
getFit()
Returns the current fit mode for this label. |
BIcon |
getIcon()
Returns the icon being displayed by this label. |
int |
getIconTextGap()
Returns the gap between the icon and the text. |
String |
getText()
Returns the text currently being displayed by this component. |
protected void |
layout()
Instructs this component to lay itself out. |
protected void |
renderComponent(Renderer renderer)
Renders any custom bits for this component. |
void |
setFit(BLabel.Fit mode)
Configures whether this label will wrap, truncate or scale if it cannot fit text into its allotted width. |
void |
setIcon(BIcon 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 |
setText(String text)
Updates the text displayed by this component. |
protected void |
wasAdded()
This method is called when we are added to a hierarchy that is connected to a top-level window (at which point we can rely on having a look and feel and can set ourselves up). |
protected void |
wasRemoved()
This method is called when we are removed from a hierarchy that is connected to a top-level window. |
| Methods inherited from class com.jmex.bui.BTextComponent |
|---|
checkNonDefault, checkNonDefaultInt, checkNonDefaultVal, configureStyle, getEffectColor, getEffectSize, getHorizontalAlignment, getLabelConfig, getLineSpacing, getTextEffect, getTextFactory, getTextFactory, getVerticalAlignment |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Label _label
| Constructor Detail |
|---|
public BLabel(String text)
public BLabel(String text,
String styleClass)
public BLabel(BIcon icon)
public BLabel(BIcon icon,
String styleClass)
public BLabel(BIcon icon,
String text,
String styleClass)
| Method Detail |
|---|
public void setIcon(BIcon icon)
public BIcon getIcon()
public void setIconTextGap(int gap)
public int getIconTextGap()
public void setOrientation(int orient)
public void setFit(BLabel.Fit mode)
public BLabel.Fit getFit()
public void setText(String text)
BTextComponent
setText in class BTextComponentpublic String getText()
BTextComponent
getText in class BTextComponentprotected String getDefaultStyleClass()
BComponent
getDefaultStyleClass in class BComponentprotected void wasAdded()
BComponent
wasAdded in class BComponentprotected void wasRemoved()
BComponentBComponent.wasAdded(), this is a fine place
to do so.
wasRemoved in class BComponentprotected void layout()
BComponent
layout in class BComponentprotected void renderComponent(Renderer renderer)
BComponent
renderComponent in class BComponent
protected Dimension computePreferredSize(int whint,
int hhint)
BComponent
computePreferredSize in class BComponent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||