public class XdevTextField extends TextField implements XdevField
A text editor component that can be bound to any bindable Property. The text editor supports both multiline and single line modes, default is one-line mode.
Since TextField
extends AbstractField
it implements
the Buffered
interface. A TextField
is
in write-through mode by default, so
com.vaadin.ui.AbstractField#setWriteThrough(boolean)
must be called
to enable buffering.
AbstractTextField.TextChangeEventImpl, AbstractTextField.TextChangeEventMode
AbstractField.FocusShortcut, AbstractField.ReadOnlyStatusChangeEvent
ExtendableObject.Extensions
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
Sizeable.Unit
Field.ValueChangeEvent
Buffered.SourceException
Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer
PERSIST_VALUE_DEFAULT
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
Constructor and Description |
---|
XdevTextField()
Constructs an empty
TextField with no caption. |
XdevTextField(Property<?> dataSource)
Constructs a new
TextField that's bound to the specified
Property and has no caption. |
XdevTextField(String caption)
Constructs an empty
TextField with given caption. |
XdevTextField(String caption,
Property<?> dataSource)
Constructs a new
TextField that's bound to the specified
Property and has the given caption String . |
XdevTextField(String caption,
String value)
Constructs a new
TextField with the given caption and
initial text contents. |
Modifier and Type | Method and Description |
---|---|
<E> E |
addExtension(Class<? super E> type,
E extension)
Adds an extension to this component.
|
<E> E |
getExtension(Class<E> type)
Gets the registered extension for the specified type.
|
boolean |
isPersistValue() |
void |
setPersistValue(boolean persistValue) |
clear, readDesign, writeDesign
addBlurListener, addFocusListener, addListener, addListener, addListener, addTextChangeListener, beforeClientResponse, changeVariables, getColumns, getCursorPosition, getInputPrompt, getMaxLength, getNullRepresentation, getTextChangeEventMode, getTextChangeTimeout, getType, isEmpty, isNullSettingAllowed, paintContent, removeBlurListener, removeFocusListener, removeListener, removeListener, removeListener, removeTextChangeListener, selectAll, setColumns, setCursorPosition, setInputPrompt, setMaxLength, setNullRepresentation, setNullSettingAllowed, setSelectionRange, setTextChangeEventMode, setTextChangeTimeout, setValue
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, attach, commit, detach, discard, focus, getConversionError, getConvertedValue, getConverter, getErrorMessage, getPropertyDataSource, getRequiredError, getTabIndex, getValidators, getValue, isBuffered, isImmediate, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isRequired, isValid, isValidationVisible, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValidator, removeValueChangeListener, setBuffered, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInvalidAllowed, setInvalidCommitted, setLocale, setPropertyDataSource, setReadOnly, setRequired, setRequiredError, setTabIndex, setValidationVisible, toString, validate, valueChange
addContextClickListener, addListener, addShortcutListener, addStyleName, findAncestor, getCaption, getComponentError, getData, getDebugId, getDescription, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setParent, setPrimaryStyleName, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidth, setWidthUndefined
addAttachListener, addDetachListener, addListener, addListener, encodeState, equals, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getRpcManager, getStateType, getUI, handleConnectorRequest, hashCode, isAttached, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
isEnabled, isReadOnly, isVisible, setEnabled, setReadOnly, setVisible
markAsDirty
isEnabled, isImmediate
addListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible
addAttachListener, addDetachListener, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
getConnectorId
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined
addShortcutListener, removeShortcutListener
public XdevTextField()
TextField
with no caption.public XdevTextField(Property<?> dataSource)
TextField
that's bound to the specified
Property
and has no caption.dataSource
- the Property to be edited with this editor.public XdevTextField(String caption, Property<?> dataSource)
TextField
that's bound to the specified
Property
and has the given caption String
.caption
- the caption String
for the editor.dataSource
- the Property to be edited with this editor.public XdevTextField(String caption, String value)
TextField
with the given caption and
initial text contents. The editor constructed this way will not be bound
to a Property unless
Property.Viewer.setPropertyDataSource(Property)
is called to bind it.caption
- the caption String
for the editor.value
- the initial text content of the editor.public XdevTextField(String caption)
TextField
with given caption.caption
- the caption String
for the editor.public <E> E addExtension(Class<? super E> type, E extension)
addExtension
in interface ExtendableObject
type
- the type to register the extension forextension
- the extensionnull
ExtendableObject.getExtension(Class)
public <E> E getExtension(Class<E> type)
getExtension
in interface ExtendableObject
type
- the type the extension was registered withnull
if none was added before for
this typeExtendableObject.addExtension(Class, Object)
public boolean isPersistValue()
isPersistValue
in interface XdevField
public void setPersistValue(boolean persistValue)
setPersistValue
in interface XdevField