Package io.guise.framework.model
Interface TextModel
-
- All Superinterfaces:
Model
,com.globalmentor.beans.PropertyBindable
,com.globalmentor.beans.PropertyConstrainable
- All Known Implementing Classes:
DefaultTextModel
,TextBox
public interface TextModel extends Model
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
Fields Modifier and Type Field Description static java.lang.String
TEXT_CONTENT_TYPE_PROPERTY
The text content type bound property.static java.lang.String
TEXT_PROPERTY
The text bound property.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getText()
com.globalmentor.net.MediaType
getTextContentType()
void
setText(java.lang.String newText)
Sets the text.void
setTextContentType(com.globalmentor.net.MediaType newTextContentType)
Sets the content type of the text.
-
-
-
Method Detail
-
getText
java.lang.String getText()
- Returns:
- The text, which may include a resource reference, or
null
if there is no text.
-
setText
void setText(java.lang.String newText)
Sets the text. This is a bound property.- Parameters:
newText
- The new text, which may include a resource reference.- See Also:
TEXT_PROPERTY
-
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:
java.lang.NullPointerException
- if the given content type isnull
.java.lang.IllegalArgumentException
- if the given content type is not a text content type.- See Also:
TEXT_CONTENT_TYPE_PROPERTY
-
-