public class ExpandingTextArea
extends com.vaadin.v7.ui.TextArea
TextArea
that adapts its height to the
textual content.Modifier and Type | Class and Description |
---|---|
class |
ExpandingTextArea.RowsChangeEvent |
static interface |
ExpandingTextArea.RowsChangeListener
Listener for row count changes.
|
com.vaadin.v7.ui.AbstractTextField.TextChangeEventImpl, com.vaadin.v7.ui.AbstractTextField.TextChangeEventMode
com.vaadin.v7.ui.AbstractField.FocusShortcut, com.vaadin.v7.ui.AbstractField.ReadOnlyStatusChangeEvent
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
com.vaadin.server.Sizeable.Unit
com.vaadin.v7.ui.Field.ValueChangeEvent
com.vaadin.v7.data.Buffered.SourceException
com.vaadin.v7.data.Property.Editor, com.vaadin.v7.data.Property.ReadOnlyException, com.vaadin.v7.data.Property.ReadOnlyStatusChangeListener, com.vaadin.v7.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.v7.data.Property.Transactional<T>, com.vaadin.v7.data.Property.ValueChangeListener, com.vaadin.v7.data.Property.ValueChangeNotifier, com.vaadin.v7.data.Property.Viewer
Constructor and Description |
---|
ExpandingTextArea()
Constructs an empty
ExpandingTextArea with no caption. |
ExpandingTextArea(com.vaadin.v7.data.Property dataSource)
Constructs a new
ExpandingTextArea that's bound to the
specified Property and has no caption. |
ExpandingTextArea(String caption)
Constructs an empty
ExpandingTextArea with given caption. |
ExpandingTextArea(String caption,
com.vaadin.v7.data.Property dataSource)
Constructs a new
ExpandingTextArea that's bound to the
specified Property and has the given caption
String . |
ExpandingTextArea(String caption,
String value)
Constructs a new
ExpandingTextArea with the given caption
and initial text contents. |
Modifier and Type | Method and Description |
---|---|
void |
addRowsChangeListener(ExpandingTextArea.RowsChangeListener listener)
Adds a
ExpandingTextArea.RowsChangeListener to the component. |
int |
getMaxRows()
Returns the maximum allowed number of rows that the
ExpandingTextArea will grow to,
default is null that means that there is no limit for growing. |
int |
getRows() |
void |
paintContent(com.vaadin.server.PaintTarget target) |
void |
removeRowsChangeListener(ExpandingTextArea.RowsChangeListener listener)
Removes a
ExpandingTextArea.RowsChangeListener from the component. |
void |
setHeight(float height,
com.vaadin.server.Sizeable.Unit unit) |
void |
setMaxRows(Integer maxRows)
Sets the maximum allowed number of rows that the
ExpandingTextArea will grow to,
default is null that means that there is no limit for growing. |
void |
setRows(int rows) |
clear, getState, getState, isWordwrap, readDesign, setWordwrap, writeDesign
addBlurListener, addFocusListener, addListener, addListener, addListener, addTextChangeListener, beforeClientResponse, changeVariables, getColumns, getCursorPosition, getCustomAttributes, getInputPrompt, getMaxLength, getNullRepresentation, getTextChangeEventMode, getTextChangeTimeout, getType, isEmpty, isNullSettingAllowed, removeBlurListener, removeFocusListener, removeListener, removeListener, removeListener, removeTextChangeListener, selectAll, setColumns, setCursorPosition, setInputPrompt, setInternalValue, setMaxLength, setNullRepresentation, setNullSettingAllowed, setSelectionRange, setTextChangeEventMode, setTextChangeTimeout, setValue
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, attach, commit, detach, discard, fireReadOnlyStatusChange, fireValueChange, focus, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getErrorMessage, getInternalValue, getModelType, getPropertyDataSource, getRequiredError, getTabIndex, getValidators, getValue, isBuffered, 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, setValue, setValue, shouldHideErrors, validate, validate, valueChange
getExplicitImmediateValue, isImmediate, setImmediate
addContextClickListener, addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeightUndefined, setIcon, setId, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidth, setWidthUndefined
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setVisible
addAttachListener, addDetachListener, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
public ExpandingTextArea()
ExpandingTextArea
with no caption.public ExpandingTextArea(String caption)
ExpandingTextArea
with given caption.caption
- the caption String
for the editor.public ExpandingTextArea(com.vaadin.v7.data.Property dataSource)
ExpandingTextArea
that's bound to the
specified Property
and has no caption.dataSource
- the Property to be edited with this editor.public ExpandingTextArea(String caption, com.vaadin.v7.data.Property dataSource)
ExpandingTextArea
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 ExpandingTextArea(String caption, String value)
ExpandingTextArea
with the given caption
and initial text contents. The editor constructed this way will not be
bound to a Property unless
com.vaadin.data.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 void paintContent(com.vaadin.server.PaintTarget target) throws com.vaadin.server.PaintException
paintContent
in interface com.vaadin.ui.LegacyComponent
paintContent
in class com.vaadin.v7.ui.AbstractTextField
com.vaadin.server.PaintException
public void setRows(int rows)
setRows
in class com.vaadin.v7.ui.TextArea
public int getRows()
getRows
in class com.vaadin.v7.ui.TextArea
public void setHeight(float height, com.vaadin.server.Sizeable.Unit unit)
setHeight
in interface com.vaadin.server.Sizeable
setHeight
in class com.vaadin.ui.AbstractComponent
public void setMaxRows(Integer maxRows)
ExpandingTextArea
will grow to,
default is null that means that there is no limit for growing.
Please note that max rows doesn't work very well with IE8.maxRows
- null or >= 2.public int getMaxRows()
ExpandingTextArea
will grow to,
default is null that means that there is no limit for growing.
Please note that max rows doesn't work very well with IE8.public void addRowsChangeListener(ExpandingTextArea.RowsChangeListener listener)
ExpandingTextArea.RowsChangeListener
to the component.public void removeRowsChangeListener(ExpandingTextArea.RowsChangeListener listener)
ExpandingTextArea.RowsChangeListener
from the component.Copyright © 2017 Magnolia International Ltd.. All rights reserved.