|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.beanfabrics.AbstractBean
org.beanfabrics.ValidatableBean
org.beanfabrics.model.AbstractPM
org.beanfabrics.model.AbstractValuePM
org.beanfabrics.model.TextPM
public class TextPM
The TextPM is a presentation model for a text value.
The default value is a empty string.
| Nested Class Summary | |
|---|---|
class |
TextPM.DefaultOptionsValidationRule
|
protected class |
TextPM.TextComparable
|
| Nested classes/interfaces inherited from class org.beanfabrics.model.AbstractValuePM |
|---|
AbstractValuePM.DefaultValidationRule |
| Nested classes/interfaces inherited from class org.beanfabrics.model.AbstractPM |
|---|
AbstractPM.PropertiesValidationRule |
| Field Summary | |
|---|---|
protected static java.lang.String |
KEY_MESSAGE_VALUE_NOT_AN_OPTION
|
| Constructor Summary | |
|---|---|
TextPM()
Constructs a new TextPM |
|
TextPM(java.lang.String initialText)
Constructs a new TextPM |
|
| Method Summary | |
|---|---|
java.lang.Comparable |
getComparable()
|
protected java.lang.String |
getDefaultText()
Get the default text value of this model. |
Options |
getOptions()
|
java.lang.String |
getText()
Returns the text value of this model. |
java.lang.String |
getText(boolean convertWhitespaceStringToNull)
|
boolean |
isEmpty()
Return true if the content of this model is interpreted as
empty. |
boolean |
isModified()
Returns if this object was modified (means: if the text value equals the default text). |
boolean |
isRestrictedToOptions()
|
void |
preset()
Sets the text value as default text. |
void |
reformat()
Parses the content and formats it. |
void |
reset()
Sets the default text as text value. |
protected void |
setDefaultText(java.lang.String aText)
Sets the default text value of this model. |
void |
setOptions(Options newOptions)
|
void |
setRestrictedToOptions(boolean restrictedToOptions)
If set to true this TextPM is only valid if
it's text content is contained in it's options. |
void |
setText(java.lang.String aText)
Set the text to be stored in this model. |
java.lang.String |
toString()
|
| Methods inherited from class org.beanfabrics.model.AbstractValuePM |
|---|
getDescription, getTitle, isEditable, isMandatory, revalidate, setDescription, setEditable, setMandatory, setTitle |
| Methods inherited from class org.beanfabrics.model.AbstractPM |
|---|
createPropertiesValidationRule, getContext, getSupportMap, revalidateProperties |
| Methods inherited from class org.beanfabrics.ValidatableBean |
|---|
getValidationState, getValidator, isValid, setValidationState |
| Methods inherited from class org.beanfabrics.AbstractBean |
|---|
addPropertyChangeListener, addPropertyChangeListener, equals, getPropertyChangeSupport, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.beanfabrics.model.IValuePM |
|---|
getDescription, getTitle, isEditable, isMandatory, setDescription, setEditable, setMandatory, setTitle |
| Methods inherited from interface org.beanfabrics.Bean |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeSupport, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface org.beanfabrics.validation.Validatable |
|---|
getValidationState, getValidator, isValid, revalidate |
| Methods inherited from interface org.beanfabrics.support.Supportable |
|---|
getSupportMap |
| Methods inherited from interface org.beanfabrics.context.ContextOwner |
|---|
getContext |
| Field Detail |
|---|
protected static final java.lang.String KEY_MESSAGE_VALUE_NOT_AN_OPTION
| Constructor Detail |
|---|
public TextPM(java.lang.String initialText)
TextPM.
public TextPM()
TextPM.
| Method Detail |
|---|
public java.lang.String getText()
getText in interface ITextPMpublic java.lang.String getText(boolean convertWhitespaceStringToNull)
public void setText(java.lang.String aText)
null, it will be changed into the empty string
"".
setText in interface ITextPMaText - the text to setprotected java.lang.String getDefaultText()
protected void setDefaultText(java.lang.String aText)
Use reset() to set the model's value to it's default value or
preset() to set the model's default value to it's current value.
aText - the text to set as default valuepublic boolean isRestrictedToOptions()
public void setRestrictedToOptions(boolean restrictedToOptions)
true this TextPM is only valid if
it's text content is contained in it's options.
restrictedToOptions - public boolean isEmpty()
true if the content of this model is interpreted as
empty.
isEmpty in interface IValuePMtrue if content is empty, else falsepublic boolean isModified()
isModified in interface ITextPMpublic void reset()
reset in interface ITextPMpublic void preset()
preset in interface ITextPMpublic void reformat()
reformat in interface ITextPMpublic Options getOptions()
getOptions in interface ITextPMpublic void setOptions(Options newOptions)
setOptions in interface ITextPMpublic java.lang.Comparable getComparable()
getComparable in interface IValuePMpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||