|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractField<java.lang.String>
com.vaadin.ui.RichTextArea
public class RichTextArea
A simple RichTextArea to edit HTML format text.
Note, that using AbstractTextField.setMaxLength(int)
method in
RichTextArea
may produce unexpected results as formatting is counted
into length of field.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractField |
---|
AbstractField.FocusShortcut, AbstractField.ReadOnlyStatusChangeEvent |
Nested classes/interfaces inherited from interface com.vaadin.ui.Component |
---|
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener |
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector |
---|
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener |
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable |
---|
Sizeable.Unit |
Nested classes/interfaces inherited from interface com.vaadin.ui.Field |
---|
Field.ValueChangeEvent |
Nested classes/interfaces inherited from interface com.vaadin.data.Buffered |
---|
Buffered.SourceException |
Nested classes/interfaces inherited from interface com.vaadin.data.Property |
---|
Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer |
Field Summary |
---|
Fields inherited from interface com.vaadin.server.Sizeable |
---|
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS |
Constructor Summary | |
---|---|
RichTextArea()
Constructs an empty RichTextArea with no caption. |
|
RichTextArea(Property dataSource)
Constructs a new RichTextArea that's bound to the specified
Property and has no caption. |
|
RichTextArea(java.lang.String caption)
Constructs an empty RichTextArea with the given caption. |
|
RichTextArea(java.lang.String caption,
Property dataSource)
Constructs a new RichTextArea that's bound to the specified
Property and has the given caption. |
|
RichTextArea(java.lang.String caption,
java.lang.String value)
Constructs a new RichTextArea with the given caption and
initial text contents. |
Method Summary | |
---|---|
void |
changeVariables(java.lang.Object source,
java.util.Map<java.lang.String,java.lang.Object> variables)
Called when one or more variables handled by the implementing class are changed. |
java.lang.String |
getNullRepresentation()
Gets the null-string representation. |
java.lang.Class<java.lang.String> |
getType()
Returns the type of the Field. |
protected boolean |
isEmpty()
Is the field empty? In general, "empty" state is same as null. |
boolean |
isNullSettingAllowed()
Is setting nulls with null-string representation allowed. |
void |
paintContent(PaintTarget target)
Paints the Paintable into a UIDL stream. |
void |
selectAll()
Selects all text in the rich text area. |
void |
setNullRepresentation(java.lang.String nullRepresentation)
Sets the null-string representation. |
void |
setNullSettingAllowed(boolean nullSettingAllowed)
Sets the null conversion mode. |
void |
setReadOnly(boolean readOnly)
Changes the readonly state and throw read-only status change events. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.vaadin.ui.LegacyComponent |
---|
markAsDirty |
Methods inherited from interface com.vaadin.server.VariableOwner |
---|
isEnabled, isImmediate |
Methods inherited from interface com.vaadin.ui.Component |
---|
addListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setVisible |
Methods inherited from interface com.vaadin.server.ClientConnector |
---|
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler |
Methods inherited from interface com.vaadin.shared.Connector |
---|
getConnectorId |
Methods inherited from interface com.vaadin.server.Sizeable |
---|
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined |
Methods inherited from interface com.vaadin.event.Action.ShortcutNotifier |
---|
addShortcutListener, removeShortcutListener |
Constructor Detail |
---|
public RichTextArea()
RichTextArea
with no caption.
public RichTextArea(java.lang.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(java.lang.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 RichTextArea(java.lang.String caption, java.lang.String value)
RichTextArea
with the given caption and
initial text contents.
caption
- the caption for the editor.value
- the initial text content of the editor.Method Detail |
---|
public void paintContent(PaintTarget target) throws PaintException
LegacyComponent
Paints the Paintable into a UIDL stream. This method creates the UIDL sequence describing it and outputs it to the given UIDL stream.
It is called when the contents of the component should be painted in response to the component first being shown or having been altered so that its visual representation is changed.
paintContent
in interface LegacyComponent
target
- the target UIDL stream where the component should paint itself
to.
PaintException
- if the paint operation failed.public void setReadOnly(boolean readOnly)
AbstractField
setReadOnly
in interface Property<java.lang.String>
setReadOnly
in interface Component
setReadOnly
in class AbstractField<java.lang.String>
readOnly
- a boolean value specifying whether the component is put
read-only mode or notComponent.setReadOnly(boolean)
public void selectAll()
public void changeVariables(java.lang.Object source, java.util.Map<java.lang.String,java.lang.Object> variables)
VariableOwner
changeVariables
in interface VariableOwner
source
- the Source of the variable change. This is the origin of the
event. For example in Web Adapter this is the request.variables
- the Mapping from variable names to new variable values.public java.lang.Class<java.lang.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
.
getType
in interface Property<java.lang.String>
getType
in class AbstractField<java.lang.String>
public java.lang.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(java.lang.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()
protected boolean isEmpty()
AbstractField
isEmpty
in class AbstractField<java.lang.String>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |