Package io.guise.framework.model
Interface TextModel
- All Superinterfaces:
Model
,com.globalmentor.beans.PropertyBindable
,com.globalmentor.beans.PropertyConstrainable
- All Known Implementing Classes:
DefaultTextModel
,TextBox
A model for text and an associated label. This model only supports text content types, including:
text/*
application/xml
application/*+xml
The model defaults to a content type of text/plain
.
- Author:
- Garret Wilson
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetText()
com.globalmentor.net.MediaType
void
Sets the text.void
setTextContentType
(com.globalmentor.net.MediaType newTextContentType) Sets the content type of the text.Methods inherited from interface com.globalmentor.beans.PropertyBindable
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
Methods inherited from interface com.globalmentor.beans.PropertyConstrainable
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, hasVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener
-
Field Details
-
TEXT_CONTENT_TYPE_PROPERTY
The text content type bound property. -
TEXT_PROPERTY
The text bound property.
-
-
Method Details
-
getText
String getText()- Returns:
- The text, which may include a resource reference, or
null
if there is no text.
-
setText
Sets the text. This is a bound property.- Parameters:
newText
- The new text, which may include a resource reference.- See Also:
-
getTextContentType
com.globalmentor.net.MediaType getTextContentType()- Returns:
- The content type of the text.
-
setTextContentType
void setTextContentType(com.globalmentor.net.MediaType newTextContentType) Sets the content type of the text. This is a bound property.- Parameters:
newTextContentType
- The new text content type.- Throws:
NullPointerException
- if the given content type isnull
.IllegalArgumentException
- if the given content type is not a text content type.- See Also:
-