Package com.groiss.gui.component
Class Textarea
java.lang.Object
com.groiss.gui.AbstractComponent
com.groiss.gui.component.Textarea
- All Implemented Interfaces:
Component
,Serializable
,Cloneable
Textarea component
is used to enter more than one line of text. it should be used in conjunction
with the ROWS and COLS attributes to set the size of the textarea.
- See Also:
-
Field Summary
Fields inherited from class com.groiss.gui.AbstractComponent
ACTIVE, browserMode, DEFAULT, ID, IE, INVISIBLE, isSensitive, label, NS, ON_BLUR, ON_CHANGE, ON_CLICK, ON_DBLCLICK, ON_FOCUS, ON_KEY_DOWN, ON_KEY_PRESS, ON_KEY_UP, ON_LOAD, ON_MOUSE_DOWN, ON_MOUSE_MOVE, ON_MOUSE_OUT, ON_MOUSE_UP, ON_RESET, ON_SELECT, ON_SUBMIT, ON_UNLOAD, parent, parentElem, READONLY, root, viewMode
Fields inherited from interface com.groiss.gui.Component
LABELLEDBY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getCols()
int
getRows()
getText()
void
setCols
(int cols) sets the number of columnsvoid
setContent
(Object o) Set the text of the textarea.void
setRows
(int rows) sets the number of rowsvoid
setSize
(int rows, int cols) sets the size of the textarea - rows and columnsvoid
sets the textvoid
setWrapMode
(String wrap) sets how to handle word-wrapping display in the textareaMethods inherited from class com.groiss.gui.AbstractComponent
addClass, clone, create, getAttribute, getBrowserMode, getId, getLabel, getName, getParent, getParentElement, getRoot, getRootName, getStyle, getViewMode, init, init, init, removeAttribute, removeClass, setActionListener, setAttribute, setBrowserMode, setClass, setEncoding, setExpandEmptyElements, setId, setIndenting, setLabel, setName, setNewLines, setParent, setParentElement, setRootName, setStyle, setViewMode, show, show, toggleClass, toString
-
Constructor Details
-
Textarea
public Textarea()constructs a new empty textarea -
Textarea
standard constructor- Parameters:
rows
- - number of rows (height of the textarea)cols
- - number of columns (width of the textarea)
-
Textarea
constructor- Parameters:
name
- the name and idrows
- number of rowscols
- number of columnsvalue
- the initial set text
-
Textarea
constructor- Parameters:
rows
- number of rowscols
- number of columnstext
- the initial set textstyleClass
- the name of a CSS class
-
-
Method Details
-
setSize
public void setSize(int rows, int cols) sets the size of the textarea - rows and columns- Parameters:
rows
- - the number of rowscols
- - the number of columns
-
setRows
public void setRows(int rows) sets the number of rows- Parameters:
rows
- - the number of rows
-
getRows
public int getRows() -
setCols
public void setCols(int cols) sets the number of columns- Parameters:
cols
- - the number of columns
-
getCols
public int getCols() -
setWrapMode
sets how to handle word-wrapping display in the textarea- Parameters:
wrap
- - the wrap mode; must be "virtual", "off" or "physical"
-
getWrapMode
-
setText
sets the text- Parameters:
text
- - the text String
-
getText
-
setContent
Set the text of the textarea.- Specified by:
setContent
in interfaceComponent
- Overrides:
setContent
in classAbstractComponent
- Parameters:
o
- any object where the string representation is used for rendering
-
getContent
- Specified by:
getContent
in interfaceComponent
- Overrides:
getContent
in classAbstractComponent
- Returns:
- the content object of the component
-