An encapsulation of the knowledge of presenting and (optionally) editing a certain class of values using text.
Although in most common cases, the text shown in an editor is the same text used to present the value, there are cases
where the text to install in a text editor is different from the displayed text. One example is a floating point
number that is rounded when presented, but shown at full precision when editied. Another example is a floating point
number that is shown using decimal notation when presented, but is converted to integer notation for editing when the
value is an integer. These examples demonstrate that the text to edit can be either more specific or less specific
than the display representation.
Attempt to convert text obtained from a text editor to the appropriate value.
Parameters:
text - The text to be parsed.
Returns:
the value.
Throws:
InvalidTextException - if the text is not a valid representation.
UnsupportedOperationException - if this model does not support editing.
isEditable
abstract boolean isEditable()
Indicate whether this presentation model supports editing.
boolean isEditable()
Indicate whether this presentation model supports editing.
Returns:
true if and only if editing is supported.
isValidating
abstract boolean isValidating()
Indicate whether this presentation model validates supplied editor text.
boolean isValidating()
Indicate whether this presentation model validates supplied editor text.
If supplied editor text is not validated, then all possible texts must be accepted.
Returns:
true if and only if supplied editor text is validated.