com.vaadin.ui
Class RichTextArea

java.lang.Object
  extended by com.vaadin.ui.AbstractComponent
      extended by com.vaadin.ui.AbstractField
          extended by com.vaadin.ui.TextField
              extended by com.vaadin.ui.RichTextArea
All Implemented Interfaces:
Buffered, BufferedValidatable, Property, Property.Editor, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer, Validatable, Action.ShortcutNotifier, FieldEvents.BlurNotifier, FieldEvents.FocusNotifier, MethodEventSource, Paintable, Sizeable, VariableOwner, Component, Component.Focusable, Field, Serializable, EventListener

public class RichTextArea
extends TextField

A simple RichTextArea to edit HTML format text. Note, that using TextField.setMaxLength(int) method in RichTextArea may produce unexpected results as formatting is counted into length of field.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractField
AbstractField.FocusShortcut, AbstractField.ReadOnlyStatusChangeEvent
 
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractComponent
AbstractComponent.ComponentErrorEvent, AbstractComponent.ComponentErrorHandler
 
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.ConversionException, Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer
 
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(String caption)
          Constructs an empty RichTextArea with the given caption.
RichTextArea(String caption, Property dataSource)
          Constructs a new RichTextArea that's bound to the specified Property and has the given caption.
RichTextArea(String caption, String value)
          Constructs a new RichTextArea with the given caption and initial text contents.
 
Method Summary
 void paintContent(PaintTarget target)
          Paints any needed component-specific things to the given UIDL stream.
 void setInputPrompt(String inputPrompt)
          RichTextArea does not support input prompt.
 void setReadOnly(boolean readOnly)
          Changes the readonly state and throw read-only status change events.
 
Methods inherited from class com.vaadin.ui.TextField
addListener, addListener, changeVariables, getColumns, getFormat, getFormattedValue, getInputPrompt, getMaxLength, getNullRepresentation, getRows, getType, getValue, isEmpty, isNullSettingAllowed, isSecret, isWordwrap, removeListener, removeListener, selectAll, setColumns, setCursorPosition, setFormat, setHeight, setHeight, setMaxLength, setNullRepresentation, setNullSettingAllowed, setRows, setSecret, setSelectionRange, setWordwrap
 
Methods inherited from class com.vaadin.ui.AbstractField
addListener, addListener, addShortcutListener, addValidator, attach, commit, constructField, detach, discard, fireReadOnlyStatusChange, fireValueChange, focus, getActionManager, getErrorMessage, getPropertyDataSource, getRequiredError, getTabIndex, getValidators, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isReadThrough, isRequired, isValid, isValidationVisible, isWriteThrough, readOnlyStatusChange, removeListener, removeListener, removeShortcutListener, removeValidator, setCurrentBufferedSourceException, setInternalValue, setInvalidAllowed, setInvalidCommitted, setPropertyDataSource, setReadThrough, setRequired, setRequiredError, setTabIndex, setValidationVisible, setValue, setValue, setWriteThrough, toString, validate, valueChange
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addListener, addListener, addListener, addListener, addListener, addStyleName, childRequestedRepaint, fireComponentErrorEvent, fireComponentEvent, fireEvent, getApplication, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getHeight, getHeightUnits, getIcon, getLocale, getParent, getStyle, getStyleName, getTag, getWidth, getWidthUnits, getWindow, handleError, isEnabled, isImmediate, isVisible, paint, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeStyleName, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setErrorHandler, setHeight, setHeightUnits, setIcon, setImmediate, setLocale, setParent, setSizeFull, setSizeUndefined, setStyle, setStyleName, setVisible, setWidth, setWidth, setWidth, setWidthUnits
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.vaadin.ui.Field
getDescription, setCaption, setDescription
 

Constructor Detail

RichTextArea

public RichTextArea()
Constructs an empty RichTextArea with no caption.


RichTextArea

public RichTextArea(String caption)
Constructs an empty RichTextArea with the given caption.

Parameters:
caption - the caption for the editor.

RichTextArea

public RichTextArea(Property dataSource)
Constructs a new RichTextArea that's bound to the specified Property and has no caption.

Parameters:
dataSource - the data source for the editor value

RichTextArea

public RichTextArea(String caption,
                    Property dataSource)
Constructs a new RichTextArea that's bound to the specified Property and has the given caption.

Parameters:
caption - the caption for the editor.
dataSource - the data source for the editor value

RichTextArea

public RichTextArea(String caption,
                    String value)
Constructs a new RichTextArea with the given caption and initial text contents.

Parameters:
caption - the caption for the editor.
value - the initial text content of the editor.
Method Detail

paintContent

public void paintContent(PaintTarget target)
                  throws PaintException
Description copied from class: AbstractComponent
Paints any needed component-specific things to the given UIDL stream. The more general AbstractComponent.paint(PaintTarget) method handles all general attributes common to all components, and it calls this method to paint any component-specific attributes to the UIDL stream.

Overrides:
paintContent in class TextField
Parameters:
target - the target UIDL stream where the component should paint itself to
Throws:
PaintException - if the paint operation failed.

setInputPrompt

public void setInputPrompt(String inputPrompt)
RichTextArea does not support input prompt.

Overrides:
setInputPrompt in class TextField

setReadOnly

public void setReadOnly(boolean readOnly)
Description copied from class: AbstractField
Changes the readonly state and throw read-only status change events.

Specified by:
setReadOnly in interface Property
Specified by:
setReadOnly in interface Component
Overrides:
setReadOnly in class AbstractField
Parameters:
readOnly - a boolean value specifying whether the component is put read-only mode or not
See Also:
Component.setReadOnly(boolean)


Copyright © 2000-2010 IT Mill Ltd. All Rights Reserved.