|
NextApp Echo2 v2.1.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nextapp.echo2.app.Component nextapp.echo2.app.Label
public class Label
A component which displays a text string, an icon, or both.
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_ICON
|
static java.lang.String |
PROPERTY_ICON_TEXT_MARGIN
|
static java.lang.String |
PROPERTY_LINE_WRAP
|
static java.lang.String |
PROPERTY_TEXT
|
static java.lang.String |
PROPERTY_TEXT_ALIGNMENT
|
static java.lang.String |
PROPERTY_TEXT_POSITION
|
static java.lang.String |
PROPERTY_TOOL_TIP_TEXT
|
Constructor Summary | |
---|---|
Label()
Creates a label with no text or icon. |
|
Label(ImageReference icon)
Creates a label with an icon. |
|
Label(java.lang.String text)
Creates a label with text. |
|
Label(java.lang.String text,
ImageReference icon)
Creates a label with text and an icon. |
Method Summary | |
---|---|
ImageReference |
getIcon()
Returns the icon of the label. |
Extent |
getIconTextMargin()
Returns the margin size between the icon and the text. |
java.lang.String |
getText()
Returns the text of the label. |
Alignment |
getTextAlignment()
Returns the alignment of the text relative to the icon. |
Alignment |
getTextPosition()
Returns the position of the text relative to the icon. |
java.lang.String |
getToolTipText()
Returns the tool tip text (displayed when the mouse cursor is hovered over the component). |
boolean |
isLineWrap()
Determines if the text of the label should wrap in the event that horizontal space is limited. |
boolean |
isValidChild(Component component)
This component does not support children. |
void |
setIcon(ImageReference newValue)
Sets the icon to be displayed. |
void |
setIconTextMargin(Extent newValue)
Sets the margin size between the icon and the text. |
void |
setLineWrap(boolean newValue)
Sets whether the text of the label should wrap in the event that horizontal space is limited. |
void |
setText(java.lang.String newValue)
Sets the text to be displayed. |
void |
setTextAlignment(Alignment newValue)
Sets the alignment of the text relative to the icon. |
void |
setTextPosition(Alignment newValue)
Sets the position of the text relative to the icon. |
void |
setToolTipText(java.lang.String newValue)
Sets the tool tip text (displayed when the mouse cursor is hovered over the component). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_ICON
public static final java.lang.String PROPERTY_ICON_TEXT_MARGIN
public static final java.lang.String PROPERTY_LINE_WRAP
public static final java.lang.String PROPERTY_TEXT
public static final java.lang.String PROPERTY_TEXT_ALIGNMENT
public static final java.lang.String PROPERTY_TEXT_POSITION
public static final java.lang.String PROPERTY_TOOL_TIP_TEXT
Constructor Detail |
---|
public Label()
public Label(java.lang.String text)
text
- the text to be displayedpublic Label(ImageReference icon)
icon
- the icon to be displayedpublic Label(java.lang.String text, ImageReference icon)
text
- the text to be displayedicon
- the icon to be displayedMethod Detail |
---|
public ImageReference getIcon()
public Extent getIconTextMargin()
public java.lang.String getText()
public Alignment getTextAlignment()
public Alignment getTextPosition()
public java.lang.String getToolTipText()
public boolean isLineWrap()
public boolean isValidChild(Component component)
isValidChild
in class Component
component
- the Component
to evaluate as a child
Component
is a valid childComponent.isValidChild(nextapp.echo2.app.Component)
public void setIcon(ImageReference newValue)
newValue
- the icon to be displayedpublic void setIconTextMargin(Extent newValue)
newValue
- the margin sizepublic void setLineWrap(boolean newValue)
newValue
- the new line wrap statepublic void setText(java.lang.String newValue)
newValue
- the text to be displayedpublic void setTextAlignment(Alignment newValue)
Alignment
's
settings should be non-default.
newValue
- the new text positionpublic void setTextPosition(Alignment newValue)
Alignment
's
settings should be non-default.
newValue
- the new text positionpublic void setToolTipText(java.lang.String newValue)
newValue
- the new tool tip text
|
NextApp Echo2 v2.1.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |