|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.glaivestone.mv.AbstractValueHolder | +--com.glaivestone.mv.ValueHolder | +--com.glaivestone.mv.StringHolder
A value holder which contains an observed String
value.
The value in the holder is guaranteed to always be a String
instance (possibly empty). Setting the value to null
is equivalent to setting the value to an empty string.
A string holder should generally be used for relatively small string values.
Large or complex text values should use a Swing Document
model to hold the value.
Field Summary |
Fields inherited from class com.glaivestone.mv.AbstractValueHolder |
DEFAULT_NOTIFICATION_ORDER, NOTIFY_FIRST_TO_LAST, NOTIFY_LAST_TO_FIRST |
Constructor Summary | |
StringHolder()
Creates a new string value holder which contains an empty string. |
|
StringHolder(java.lang.String aString)
Creates a new string value holder which contains the specified string. |
Method Summary | |
java.lang.String |
getText()
Returns the String value held by this model. |
void |
setText(java.lang.String newValue)
Sets the String value held by this model. |
void |
setValueAttribute(java.lang.Object newValue)
Set the current value. |
Methods inherited from class com.glaivestone.mv.ValueHolder |
getValue, setValue |
Methods inherited from class com.glaivestone.mv.AbstractValueHolder |
addChangeListener, removeChangeListener, setNotificationOrder |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StringHolder()
public StringHolder(java.lang.String aString)
Method Detail |
public java.lang.String getText()
String
value held by this model.
Always returns a String
instance (never null
).
Supported for protocol consistency with the Swing Document
model.
public void setValueAttribute(java.lang.Object newValue)
setValueAttribute
in class ValueHolder
public void setText(java.lang.String newValue)
String
value held by this model.
Triggers the changed event if the value is different.
Supported for protocol consistency with the Swing Document
model.
|
GFL 1.1 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |