RichTextArea
based on
the new data binding API@Deprecated public class RichTextArea extends AbstractField<String> implements LegacyComponent
AbstractTextField.setMaxLength(int)
method in
RichTextArea
may produce unexpected results as formatting is counted
into length of field.AbstractField.FocusShortcut, AbstractField.ReadOnlyStatusChangeEvent
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
DESIGN_ATTR_PLAIN_TEXT
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
Constructor and Description |
---|
RichTextArea()
Deprecated.
Constructs an empty
RichTextArea with no caption. |
RichTextArea(Property dataSource)
Deprecated.
Constructs a new
RichTextArea that's bound to the specified
Property and has no caption. |
RichTextArea(String caption)
Deprecated.
Constructs an empty
RichTextArea with the given caption. |
RichTextArea(String caption,
Property dataSource)
Deprecated.
Constructs a new
RichTextArea that's bound to the specified
Property and has the given caption. |
RichTextArea(String caption,
String value)
Deprecated.
Constructs a new
RichTextArea with the given caption and
initial text contents. |
Modifier and Type | Method and Description |
---|---|
void |
changeVariables(Object source,
Map<String,Object> variables)
Deprecated.
|
void |
clear()
Deprecated.
Clears the value of the field.
|
String |
getNullRepresentation()
Deprecated.
Gets the null-string representation.
|
protected RichTextAreaState |
getState()
Deprecated.
|
Class<String> |
getType()
Deprecated.
Returns the type of the Field.
|
boolean |
isEmpty()
Deprecated.
Is the field empty?
In general, "empty" state is same as null.
|
boolean |
isNullSettingAllowed()
Deprecated.
Is setting nulls with null-string representation allowed.
|
void |
paintContent(PaintTarget target)
Deprecated.
|
void |
readDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
Deprecated.
|
void |
selectAll()
Deprecated.
Selects all text in the rich text area.
|
void |
setNullRepresentation(String nullRepresentation)
Deprecated.
Sets the null-string representation.
|
void |
setNullSettingAllowed(boolean nullSettingAllowed)
Deprecated.
Sets the null conversion mode.
|
void |
setReadOnly(boolean readOnly)
Deprecated.
Changes the readonly state and throw read-only status change events.
|
void |
writeDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
Deprecated.
|
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, attach, beforeClientResponse, commit, detach, discard, fireReadOnlyStatusChange, fireValueChange, focus, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getCustomAttributes, getErrorMessage, getInternalValue, getModelType, getPropertyDataSource, getRequiredError, getState, getTabIndex, getValidators, getValue, isBuffered, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isRequired, isValid, isValidationVisible, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValidator, removeValueChangeListener, setBuffered, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInternalValue, setInvalidAllowed, setInvalidCommitted, setLocale, setPropertyDataSource, setRequired, setRequiredError, setTabIndex, setValidationVisible, setValue, 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, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthFull, 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
markAsDirty
isEnabled
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, setStyleName, setVisible
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefined
addShortcutListener, removeShortcutListener
public RichTextArea()
RichTextArea
with no caption.public RichTextArea(String caption)
RichTextArea
with the given caption.caption
- the caption for the editor.public RichTextArea(Property dataSource)
RichTextArea
that's bound to the specified
Property
and has no caption.dataSource
- the data source for the editor valuepublic RichTextArea(String caption, Property dataSource)
RichTextArea
that's bound to the specified
Property
and has the given caption.caption
- the caption for the editor.dataSource
- the data source for the editor valuepublic void paintContent(PaintTarget target) throws PaintException
paintContent
in interface LegacyComponent
PaintException
public void setReadOnly(boolean readOnly)
AbstractField
setReadOnly
in interface Property<String>
setReadOnly
in class AbstractField<String>
readOnly
- a boolean value specifying whether the component is put
read-only mode or notcom.vaadin.ui.Component#setReadOnly(boolean)
public void selectAll()
public void changeVariables(Object source, Map<String,Object> variables)
changeVariables
in interface VariableOwner
public Class<String> getType()
AbstractField
getValue
and
setValue
must be compatible with this type: one must be able
to safely cast the value returned from getValue
to the given
type and pass any variable assignable to this type as an argument to
setValue
.public String getNullRepresentation()
The null-valued strings are represented on the user interface by replacing the null value with this string. If the null representation is set null (not 'null' string), painting null value throws exception.
The default value is string 'null'.
AbstractTextField.isNullSettingAllowed()
public boolean isNullSettingAllowed()
If this property is true, writing null-representation string to text field always sets the field value to real null. If this property is false, null setting is not made, but the null values are maintained. Maintenance of null-values is made by only converting the textfield contents to real null, if the text field matches the null-string representation and the current value of the field is null.
By default this setting is false
AbstractTextField.getNullRepresentation()
public void setNullRepresentation(String nullRepresentation)
The null-valued strings are represented on the user interface by replacing the null value with this string. If the null representation is set null (not 'null' string), painting null value throws exception.
The default value is string 'null'
nullRepresentation
- Textual representation for null strings.AbstractTextField.setNullSettingAllowed(boolean)
public void setNullSettingAllowed(boolean nullSettingAllowed)
If this property is true, writing null-representation string to text field always sets the field value to real null. If this property is false, null setting is not made, but the null values are maintained. Maintenance of null-values is made by only converting the textfield contents to real null, if the text field matches the null-string representation and the current value of the field is null.
By default this setting is false.
nullSettingAllowed
- Should the null-string represenation be always converted to
null-values.AbstractTextField.getNullRepresentation()
public boolean isEmpty()
Field
public void clear()
Field
The field value is typically reset to the initial value of the field.
Calling Field.isEmpty()
on a cleared field must always returns true.
public void readDesign(org.jsoup.nodes.Element design, DesignContext designContext)
readDesign
in interface Component
readDesign
in class AbstractField<String>
public void writeDesign(org.jsoup.nodes.Element design, DesignContext designContext)
writeDesign
in interface Component
writeDesign
in class AbstractField<String>
protected RichTextAreaState getState()
getState
in class AbstractField<String>
Copyright © 2020 Vaadin Ltd. All rights reserved.