com.guiseframework.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:

The model defaults to a content type of text/plain.

Author:
Garret Wilson

Field Summary
static java.lang.String TEXT_CONTENT_TYPE_PROPERTY
          The text content type bound property.
static java.lang.String TEXT_PROPERTY
          The text bound property.
 
Fields inherited from interface com.guiseframework.model.Model
PLAIN_TEXT_CONTENT_TYPE, XHTML_CONTENT_TYPE, XHTML_FRAGMENT_CONTENT_TYPE
 
Method Summary
 java.lang.String getText()
           
 com.globalmentor.net.ContentType getTextContentType()
           
 void setText(java.lang.String newText)
          Sets the text.
 void setTextContentType(com.globalmentor.net.ContentType 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 Detail

TEXT_CONTENT_TYPE_PROPERTY

static final java.lang.String TEXT_CONTENT_TYPE_PROPERTY
The text content type bound property.


TEXT_PROPERTY

static final java.lang.String TEXT_PROPERTY
The text bound property.

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.ContentType getTextContentType()
Returns:
The content type of the text.

setTextContentType

void setTextContentType(com.globalmentor.net.ContentType 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 is null.
java.lang.IllegalArgumentException - if the given content type is not a text content type.
See Also:
TEXT_CONTENT_TYPE_PROPERTY


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.