nextapp.echo
Class TextArea

java.lang.Object
  extended by nextapp.echo.AbstractComponent
      extended by nextapp.echo.text.TextComponent
          extended by nextapp.echo.TextArea
All Implemented Interfaces:
java.io.Serializable, Component, ToolTipSupport

public class TextArea
extends TextComponent

A multiple line text-entry field.

See Also:
Serialized Form

Field Summary
static java.lang.String COLUMN_UNITS_CHANGED_PROPERTY
           
static java.lang.String COLUMNS_CHANGED_PROPERTY
           
static java.lang.String LINE_WRAP_CHANGED_PROPERTY
           
static java.lang.String ROW_UNITS_CHANGED_PROPERTY
           
static java.lang.String ROWS_CHANGED_PROPERTY
           
 
Fields inherited from class nextapp.echo.text.TextComponent
BORDER_COLOR_CHANGED_PROPERTY, BORDER_DEFAULT, BORDER_INSET, BORDER_NONE, BORDER_OUTSET, BORDER_SIZE_CHANGED_PROPERTY, BORDER_SOLID, BORDER_STYLE_CHANGED_PROPERTY, CHARACTER_UNITS, CSS_CLASS_CHANGED_PROPERTY, DOCUMENT_CHANGED_PROPERTY, EDITABLE_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, PERCENT_UNITS, PIXEL_UNITS, STYLE_BORDER_COLOR, STYLE_BORDER_SIZE, STYLE_BORDER_STYLE, STYLE_COLUMNS, STYLE_HORIZONTAL_ALIGNMENT, STYLE_LINE_WRAP, STYLE_ROWS, TEXT_CHANGED_PROPERTY
 
Fields inherited from interface nextapp.echo.ToolTipSupport
TOOL_TIP_TEXT_CHANGED_PROPERTY
 
Fields inherited from interface nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, SELECTABLE_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
TextArea()
          Creates a new TextArea.
TextArea(Document document)
          Creates a new TextArea with the given text and size.
TextArea(Document document, java.lang.String text, int columns, int rows)
          Creates a new TextArea with the given text and size.
TextArea(int columns, int rows)
          Creates a new TextArea of the given size.
TextArea(java.lang.String text)
          Creates a new TextArea with the given text.
TextArea(java.lang.String text, int columns, int rows)
          Creates a new TextArea with the given text and size.
 
Method Summary
 void applyStyle(Style style)
          Sets stylistic properties of this component based on a Style object.
 int getColumns()
          Returns the number of columns in the TextArea.
 int getColumnUnits()
          Returns the units of the columns property.
 boolean getLineWrap()
          Returns whether lines should wrap in the text area.
 int getRows()
          Returns the number of rows in the TextArea.
 int getRowUnits()
          Returns the units of the rows property.
 boolean isConvertToLowerCase()
           
 boolean isConvertToUpperCase()
           
 void setColumns(int newValue)
          Sets the number of columns in the TextArea.
 void setColumnUnits(int newValue)
          Sets the units for the columns property.
 void setConvertToLowerCase(boolean convertToLowerCase)
           
 void setConvertToUpperCase(boolean convertToUpperCase)
           
 void setLineWrap(boolean newValue)
          Sets whether lines should wrap in the text area.
 void setRows(int newValue)
          Sets the number of rows in the TextArea.
 void setRowUnits(int newValue)
          Sets the units for the rows property.
 
Methods inherited from class nextapp.echo.text.TextComponent
getBorderColor, getBorderSize, getBorderStyle, getCssClass, getDocument, getHorizontalAlignment, getText, getToolTipText, isEditable, setBorderColor, setBorderSize, setBorderStyle, setCssClass, setDocument, setEditable, setHorizontalAlignment, setText, setToolTipText
 
Methods inherited from class nextapp.echo.AbstractComponent
add, add, addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getClientId, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getListenerList, getLocale, getParent, indexOf, init, isAncestorOf, isDifferent, isEnabled, isFocused, isRecursivelyVisible, isRegistered, isSelectableForScriptRecorder, isShowing, isVisible, processHierarchyEvent, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setClientId, setEnabled, setFocused, setFont, setForeground, setIdentifier, setLocale, setParent, setRegistered, setSelectableForScriptRecorder, setVisible, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLUMNS_CHANGED_PROPERTY

public static final java.lang.String COLUMNS_CHANGED_PROPERTY
See Also:
Constant Field Values

COLUMN_UNITS_CHANGED_PROPERTY

public static final java.lang.String COLUMN_UNITS_CHANGED_PROPERTY
See Also:
Constant Field Values

LINE_WRAP_CHANGED_PROPERTY

public static final java.lang.String LINE_WRAP_CHANGED_PROPERTY
See Also:
Constant Field Values

ROWS_CHANGED_PROPERTY

public static final java.lang.String ROWS_CHANGED_PROPERTY
See Also:
Constant Field Values

ROW_UNITS_CHANGED_PROPERTY

public static final java.lang.String ROW_UNITS_CHANGED_PROPERTY
See Also:
Constant Field Values
Constructor Detail

TextArea

public TextArea()
Creates a new TextArea.


TextArea

public TextArea(java.lang.String text)
Creates a new TextArea with the given text.

Parameters:
text - The initial text in the text field.

TextArea

public TextArea(int columns,
                int rows)
Creates a new TextArea of the given size.

Parameters:
columns - The number of columns to display.
rows - The number of rows to display.

TextArea

public TextArea(java.lang.String text,
                int columns,
                int rows)
Creates a new TextArea with the given text and size.

Parameters:
text - The initial text in the text field.
columns - The number of columns to display.
rows - The number of rows to display.

TextArea

public TextArea(Document document)
Creates a new TextArea with the given text and size.

Parameters:
document - The model for this text field.

TextArea

public TextArea(Document document,
                java.lang.String text,
                int columns,
                int rows)
Creates a new TextArea with the given text and size.

Parameters:
document - The model for this text field.
text - The initial text in the text field.
columns - The number of columns to display.
rows - The number of rows to display.
Method Detail

applyStyle

public void applyStyle(Style style)
Description copied from interface: Component
Sets stylistic properties of this component based on a Style object. The version of this method in Component will set foreground and background colors and the font from the style if they are present. Components should override this method if they allow more properties to be set from a style object, and should call super.applyStyle() if necessary.

Specified by:
applyStyle in interface Component
Overrides:
applyStyle in class TextComponent
Parameters:
style - The style object from which to retrieve properties for this Component.
See Also:
Component.applyStyle(Style)

getColumns

public int getColumns()
Returns the number of columns in the TextArea.

Returns:
The number of columns to display.

getColumnUnits

public int getColumnUnits()
Returns the units of the columns property.

Returns:
The units of the columns property, one of the following values:
  • TextArea.CHARACTER_UNITS (the default)
  • TextArea.PIXEL_UNITS
  • TextArea.PERCENT_UNITS

getLineWrap

public boolean getLineWrap()
Returns whether lines should wrap in the text area.

Returns:
True if lines should wrap in the text area.

getRows

public int getRows()
Returns the number of rows in the TextArea.

Returns:
The number of rows to display.

getRowUnits

public int getRowUnits()
Returns the units of the rows property.

Returns:
The units of the rows property, one of the following values:
  • TextArea.CHARACTER_UNITS (the default)
  • TextArea.PIXEL_UNITS
  • TextArea.PERCENT_UNITS

setColumns

public void setColumns(int newValue)
Sets the number of columns in the TextArea.

Parameters:
newValue - The number of columns to display.

setColumnUnits

public void setColumnUnits(int newValue)
Sets the units for the columns property.

Parameters:
newValue - The new units for the columns property, one of the following values:
  • TextArea.CHARACTER_UNITS (the default)
  • TextArea.PIXEL_UNITS
  • TextArea.PERCENT_UNITS

setLineWrap

public void setLineWrap(boolean newValue)
Sets whether lines should wrap in the text area.

Parameters:
newValue - True if lines should wrap in the text area.

setRows

public void setRows(int newValue)
Sets the number of rows in the TextArea.

Parameters:
newValue - The number of rows to display.

setRowUnits

public void setRowUnits(int newValue)
Sets the units for the rows property.

Parameters:
newValue - The new units for the rows property, one of the following values:
  • TextArea.CHARACTER_UNITS (the default)
  • TextArea.PIXEL_UNITS
  • TextArea.PERCENT_UNITS

isConvertToLowerCase

public boolean isConvertToLowerCase()

setConvertToLowerCase

public void setConvertToLowerCase(boolean convertToLowerCase)

isConvertToUpperCase

public boolean isConvertToUpperCase()

setConvertToUpperCase

public void setConvertToUpperCase(boolean convertToUpperCase)