|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.globalmentor.beans.BoundPropertyObject
com.guiseframework.event.GuiseBoundPropertyObject
com.guiseframework.model.ui.AbstractPresentationModel
com.guiseframework.component.AbstractComponent
com.guiseframework.component.AbstractControl
com.guiseframework.component.AbstractValueControl<V>
com.guiseframework.component.AbstractEditValueControl<V>
com.guiseframework.component.AbstractTextControl<V>
com.guiseframework.component.TextControl<V>
V - The type of value the input text is to represent.public class TextControl<V>
Control to accept text input from the user representing a particular value type.
This control keeps track of literal text entered by the user, distinct from the value stored in the model.
If line wrap is not specified in the constructor, it defaults to true.
If multiline is not specified in the constructor, it defaults to true only when there is more than one row and line wrap is turned off.
Default converters are available for the following types:
char[]java.lang.Booleanjava.lang.Floatjava.lang.Integerjava.lang.Stringtext/plaintext/*
| Nested Class Summary | |
|---|---|
protected static class |
TextControl.DefaultTransferable
The default transferable object for a text control. |
| Nested classes/interfaces inherited from class com.guiseframework.component.AbstractComponent |
|---|
AbstractComponent.AbstractFlyoverFrameStrategy<S extends Component>, AbstractComponent.AbstractFlyoverStrategy<S extends Component>, AbstractComponent.DefaultFlyoverStrategy<S extends Component> |
| Nested classes/interfaces inherited from interface com.guiseframework.component.Component |
|---|
Component.FlyoverStrategy<S extends Component> |
| Nested classes/interfaces inherited from interface com.guiseframework.component.Control |
|---|
Control.Status |
| Field Summary | |
|---|---|
protected static ExportStrategy<TextControl<?>> |
DEFAULT_EXPORT_STRATEGY
The default export strategy for this component type. |
protected static ImportStrategy<TextControl<?>> |
DEFAULT_IMPORT_STRATEGY
The default import strategy for this component type. |
static java.lang.String |
LINE_WRAP_PROPERTY
The line wrap bound property. |
static java.lang.String |
MASKED_PROPERTY
The masked bound property. |
static java.lang.String |
MAXIMUM_LENGTH_PROPERTY
The maximum length bound property. |
static java.lang.String |
MULTILINE_PROPERTY
The multiline bound property. |
static java.lang.String |
ROW_COUNT_PROPERTY
The row count bound property. |
| Fields inherited from class com.guiseframework.component.AbstractTextControl |
|---|
AUTO_COMMIT_PATTERN_PROPERTY, COLUMN_COUNT_PROPERTY, PROVISIONAL_TEXT_PROPERTY, TEXT_PROPERTY, VALUE_CONTENT_TYPE_PROPERTY |
| Fields inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS |
| Fields inherited from interface com.guiseframework.component.EditComponent |
|---|
EDITABLE_PROPERTY |
| Fields inherited from interface com.guiseframework.component.Component |
|---|
BOOKMARK_ENABLED_PROPERTY, CONSTRAINTS_PROPERTY, DRAG_ENABLED_PROPERTY, DROP_ENABLED_PROPERTY, FLYOVER_ENABLED_PROPERTY, FLYOVER_STRATEGY_PROPERTY, INPUT_STRATEGY_PROPERTY, NAME_PROPERTY, NOTIFICATION_PROPERTY, ORIENTATION_PROPERTY, THEME_APPLIED_PROPERTY, VALID_PROPERTY |
| Fields inherited from interface com.guiseframework.model.Displayable |
|---|
DISPLAYED_PROPERTY |
| Fields inherited from interface com.guiseframework.model.InfoModel |
|---|
DESCRIPTION_CONTENT_TYPE_PROPERTY, DESCRIPTION_PROPERTY, INFO_CONTENT_TYPE_PROPERTY, INFO_PROPERTY |
| Fields inherited from interface com.guiseframework.model.LabelModel |
|---|
GLYPH_URI_PROPERTY, LABEL_CONTENT_TYPE_PROPERTY, LABEL_PROPERTY |
| Fields inherited from interface com.guiseframework.model.Model |
|---|
PLAIN_TEXT_CONTENT_TYPE, XHTML_CONTENT_TYPE, XHTML_FRAGMENT_CONTENT_TYPE |
| Fields inherited from interface com.guiseframework.component.ValueControl |
|---|
CONVERTER_PROPERTY |
| Fields inherited from interface com.guiseframework.component.Control |
|---|
STATUS_PROPERTY |
| Fields inherited from interface com.guiseframework.model.Enableable |
|---|
ENABLED_PROPERTY |
| Fields inherited from interface com.guiseframework.model.ValueModel |
|---|
VALIDATOR_PROPERTY, VALUE_PROPERTY |
| Constructor Summary | |
|---|---|
TextControl(java.lang.Class<V> valueClass)
Value class constructor with a default data model to represent a given type and a default converter. |
|
TextControl(java.lang.Class<V> valueClass,
int columnCount)
Value class and column count constructor with one row and a default converter. |
|
TextControl(java.lang.Class<V> valueClass,
int rowCount,
int columnCount)
Value class, row count, and column count constructor with a default converter. |
|
TextControl(java.lang.Class<V> valueClass,
int rowCount,
int columnCount,
boolean lineWrap)
Value class, row count, column count, and line wrap constructor with a default converter. |
|
TextControl(java.lang.Class<V> valueClass,
V defaultValue)
Value class and default value constructor with a default data model to represent a given type and a default converter. |
|
TextControl(java.lang.Class<V> valueClass,
V defaultValue,
int columnCount)
Value class, defaultValue, and column count constructor with one row a default converter. |
|
TextControl(java.lang.Class<V> valueClass,
V defaultValue,
int rowCount,
int columnCount)
Value class, defaultValue, row count, and column count constructor with a default converter. |
|
TextControl(java.lang.Class<V> valueClass,
V defaultValue,
int rowCount,
int columnCount,
boolean lineWrap)
Value class, default value, row count, column count, and line wrap constructor with a default converter. |
|
TextControl(ValueModel<V> valueModel)
Value model constructor with a default converter. |
|
TextControl(ValueModel<V> valueModel,
Converter<V,java.lang.String> converter)
Value model and converter constructor. |
|
TextControl(ValueModel<V> valueModel,
Converter<V,java.lang.String> converter,
int rowCount,
int columnCount,
boolean lineWrap)
Value model, converter, row count, column count, and line wrap constructor. |
|
TextControl(ValueModel<V> valueModel,
Converter<V,java.lang.String> converter,
int rowCount,
int columnCount,
boolean lineWrap,
boolean multiline)
Value model, converter, row count, column count, and line wrap constructor. |
|
TextControl(ValueModel<V> valueModel,
int rowCount,
int columnCount)
Value model, row count, and column count constructor with a default converter. |
|
TextControl(ValueModel<V> valueModel,
int rowCount,
int columnCount,
boolean lineWrap)
Value model, row count, column count, and line wrap constructor with a default converter. |
|
| Method Summary | |
|---|---|
int |
getMaximumLength()
|
int |
getRowCount()
|
boolean |
isLineWrap()
|
boolean |
isMasked()
|
boolean |
isMultiline()
|
void |
setLineWrap(boolean newLineWrap)
Sets whether lines will be logically wrapped in the view if needed. |
void |
setMasked(boolean newMasked)
Sets whether the user input text is masked to prevent viewing of the literal entered value. |
void |
setMaximumLength(int newMaximumLength)
Sets the maximum number of input characters to allow. |
void |
setMultiline(boolean newMultiline)
Sets whether the user is allowed to enter multiple physical lines if the control has multiple rows. |
void |
setRowCount(int newRowCount)
Sets the estimated number of rows requested to be visible. |
| Methods inherited from class com.guiseframework.component.AbstractTextControl |
|---|
determineStatus, determineValid, getAutoCommitPattern, getColumnCount, getConverter, getProvisionalText, getText, getValueContentType, reset, setAutoCommitPattern, setColumnCount, setConverter, setProvisionalText, setText, setTextValue, setValueContentType, updateText, validate |
| Methods inherited from class com.guiseframework.component.AbstractEditValueControl |
|---|
addEditListener, fireEdited, fireEdited, isEditable, removeEditListener, setEditable |
| Methods inherited from class com.guiseframework.component.AbstractValueControl |
|---|
clearValue, getDefaultValue, getValidator, getValue, getValueClass, getValueModel, isValidValue, resetValue, setValidator, setValue, validateValue |
| Methods inherited from class com.guiseframework.component.AbstractControl |
|---|
getEnableable, getStatus, isEnabled, setEnabled, setNotification, setStatus, updateStatus, updateValid |
| Methods inherited from class com.guiseframework.event.GuiseBoundPropertyObject |
|---|
getSession |
| Methods inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.guiseframework.platform.DepictedObject |
|---|
depict, getDepictID, getSession, processEvent |
| Methods inherited from interface com.guiseframework.model.InfoModel |
|---|
getDescription, getDescriptionContentType, getInfo, getInfoContentType, setDescription, setDescriptionContentType, setInfo, setInfoContentType |
| Methods inherited from interface com.guiseframework.model.LabelModel |
|---|
getGlyphURI, getLabel, getLabelContentType, setGlyphURI, setLabel, setLabelContentType |
| 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 |
| Methods inherited from interface com.guiseframework.component.Control |
|---|
getStatus |
| Methods inherited from interface com.guiseframework.model.Enableable |
|---|
isEnabled, setEnabled |
| Field Detail |
|---|
public static final java.lang.String LINE_WRAP_PROPERTY
public static final java.lang.String MASKED_PROPERTY
public static final java.lang.String MAXIMUM_LENGTH_PROPERTY
public static final java.lang.String MULTILINE_PROPERTY
public static final java.lang.String ROW_COUNT_PROPERTY
protected static final ExportStrategy<TextControl<?>> DEFAULT_EXPORT_STRATEGY
protected static final ImportStrategy<TextControl<?>> DEFAULT_IMPORT_STRATEGY
| Constructor Detail |
|---|
public TextControl(java.lang.Class<V> valueClass)
valueClass - The class indicating the type of value held in the model.
java.lang.NullPointerException - if the given value class is null.
public TextControl(java.lang.Class<V> valueClass,
V defaultValue)
valueClass - The class indicating the type of value held in the model.defaultValue - The default value, which will not be validated.
java.lang.NullPointerException - if the given value class is null.
public TextControl(java.lang.Class<V> valueClass,
int columnCount)
valueClass - The class indicating the type of value held in the model.columnCount - The requested number of visible columns, or -1 if no column count is specified.
java.lang.NullPointerException - if the given value class is null.
public TextControl(java.lang.Class<V> valueClass,
int rowCount,
int columnCount)
valueClass - The class indicating the type of value held in the model.rowCount - The requested number of visible rows, or -1 if no row count is specified.columnCount - The requested number of visible columns, or -1 if no column count is specified.
java.lang.NullPointerException - if the given value class is null.
public TextControl(java.lang.Class<V> valueClass,
V defaultValue,
int columnCount)
valueClass - The class indicating the type of value held in the model.defaultValue - The default value, which will not be validated.columnCount - The requested number of visible columns, or -1 if no column count is specified.
java.lang.NullPointerException - if the given value class is null.
public TextControl(java.lang.Class<V> valueClass,
V defaultValue,
int rowCount,
int columnCount)
valueClass - The class indicating the type of value held in the model.defaultValue - The default value, which will not be validated.rowCount - The requested number of visible rows, or -1 if no row count is specified.columnCount - The requested number of visible columns, or -1 if no column count is specified.
java.lang.NullPointerException - if the given value class is null.
public TextControl(java.lang.Class<V> valueClass,
int rowCount,
int columnCount,
boolean lineWrap)
valueClass - The class indicating the type of value held in the model.rowCount - The requested number of visible rows, or -1 if no row count is specified.columnCount - The requested number of visible columns, or -1 if no column count is specified.lineWrap - Whether lines should be wrapped in the view if needed.
java.lang.NullPointerException - if the given value class is null.
public TextControl(java.lang.Class<V> valueClass,
V defaultValue,
int rowCount,
int columnCount,
boolean lineWrap)
valueClass - The class indicating the type of value held in the model.defaultValue - The default value, which will not be validated.rowCount - The requested number of visible rows, or -1 if no row count is specified.columnCount - The requested number of visible columns, or -1 if no column count is specified.lineWrap - Whether lines should be wrapped in the view if needed.
java.lang.NullPointerException - if the given value class is null.
public TextControl(ValueModel<V> valueModel,
int rowCount,
int columnCount)
valueModel - The component value model.rowCount - The requested number of visible rows, or -1 if no row count is specified.columnCount - The requested number of visible columns, or -1 if no column count is specified.
java.lang.NullPointerException - if the given value model is null.
public TextControl(ValueModel<V> valueModel,
int rowCount,
int columnCount,
boolean lineWrap)
valueModel - The component value model.rowCount - The requested number of visible rows, or -1 if no row count is specified.columnCount - The requested number of visible columns, or -1 if no column count is specified.lineWrap - Whether lines should be wrapped in the view if needed.
java.lang.NullPointerException - if the given value model is null.public TextControl(ValueModel<V> valueModel)
valueModel - The component value model.
java.lang.NullPointerException - if the given value model is null.
public TextControl(ValueModel<V> valueModel,
Converter<V,java.lang.String> converter)
valueModel - The component value model.converter - The converter for this component.
java.lang.NullPointerException - if the given value model and/or converter is null.
public TextControl(ValueModel<V> valueModel,
Converter<V,java.lang.String> converter,
int rowCount,
int columnCount,
boolean lineWrap)
valueModel - The component value model.converter - The converter for this component.rowCount - The requested number of visible rows, or -1 if no row count is specified.columnCount - The requested number of visible columns, or -1 if no column count is specified.lineWrap - Whether lines should be wrapped in the view if needed.
java.lang.NullPointerException - if the given value model and/or converter is null.
public TextControl(ValueModel<V> valueModel,
Converter<V,java.lang.String> converter,
int rowCount,
int columnCount,
boolean lineWrap,
boolean multiline)
valueModel - The component value model.converter - The converter for this component.rowCount - The requested number of visible rows, or -1 if no row count is specified.columnCount - The requested number of visible columns, or -1 if no column count is specified.lineWrap - Whether lines should be wrapped in the view if needed.multiline - Whether the user should be allowed to enter multiple physical lines if the control has multiple rows.
java.lang.NullPointerException - if the given value model and/or converter is null.| Method Detail |
|---|
public boolean isMasked()
public void setMasked(boolean newMasked)
Boolean.
newMasked - true if the user input text should be masked.MASKED_PROPERTYpublic int getMaximumLength()
public void setMaximumLength(int newMaximumLength)
Integer.
newMaximumLength - The new maximum number of input characters to allow, or -1 if there is no maximum length.MAXIMUM_LENGTH_PROPERTYpublic boolean isLineWrap()
public void setLineWrap(boolean newLineWrap)
Boolean.
newLineWrap - Whether lines should be logically wrapped in the view if needed.LINE_WRAP_PROPERTYpublic boolean isMultiline()
public void setMultiline(boolean newMultiline)
Boolean.
newMultiline - Whether the user should be allowed to enter multiple physical lines if the control has multiple rows.MULTILINE_PROPERTYpublic int getRowCount()
public void setRowCount(int newRowCount)
Integer.
newRowCount - The new requested number of visible rows, or -1 if no row count is specified.ROW_COUNT_PROPERTY
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||