|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pivot.wtk.Component
org.apache.pivot.wtk.Label
public class Label
Component that displays a string of text.
Nested Class Summary | |
---|---|
static interface |
Label.TextBindMapping
Translates between text and context data during data binding. |
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component |
---|
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary |
Constructor Summary | |
---|---|
Label()
|
|
Label(String text)
|
Method Summary | |
---|---|
void |
clear()
Clears any bound values in the component. |
ListenerList<LabelBindingListener> |
getLabelBindingListeners()
|
ListenerList<LabelListener> |
getLabelListeners()
|
int |
getMaximumLength()
Returns the maximum length of the label text. |
String |
getText()
Returns the label's text. |
Label.TextBindMapping |
getTextBindMapping()
|
BindType |
getTextBindType()
|
String |
getTextKey()
Returns the label's text key. |
void |
load(Object context)
Copies bound values from the bind context to the component. |
void |
setMaximumLength(int maximumLength)
Sets the maximum length of the label text. |
void |
setText(String text)
Set the text of the Label. |
void |
setTextBindMapping(Label.TextBindMapping textBindMapping)
|
void |
setTextBindType(BindType textBindType)
|
void |
setTextKey(String textKey)
Sets the label's text key. |
void |
setTextOrEmpty(String text)
Utility method to set text to the given value, or to an empty string if null (to avoid the setText throw an IllegalArgumentException). |
void |
store(Object context)
Copies bound values from the component to the bind context. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Label()
public Label(String text)
Method Detail |
---|
public String getText()
public void setText(String text)
text
- The text to set, must be not null.public void setTextOrEmpty(String text)
text
- The text to setsetText(java.lang.String)
public String getTextKey()
public int getMaximumLength()
public void setMaximumLength(int maximumLength)
maximumLength
- The maximum length of the label text.public void setTextKey(String textKey)
textKey
- The text key, or null to clear the binding.public BindType getTextBindType()
public void setTextBindType(BindType textBindType)
public Label.TextBindMapping getTextBindMapping()
public void setTextBindMapping(Label.TextBindMapping textBindMapping)
public void load(Object context)
Component
load
in class Component
public void store(Object context)
Component
store
in class Component
public void clear()
Component
clear
in class Component
public ListenerList<LabelListener> getLabelListeners()
public ListenerList<LabelBindingListener> getLabelBindingListeners()
public String toString()
toString
in class Component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |