|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.raj.htmlForms.HtmlFormElement
|
+--com.raj.htmlForms.HtmlTextArea
This class represents the <textarea> tag of a form. It will display a multi-line text box ready for typing in, optionally populated from a String or a Reader. Note: these two display methods are mutually exclusive -- you cannot use both a String and a reader simultaneously.
This class (HtmlTextArea.java) is part of the com.raj.htmlForms package that
automatically generates HTML forms programmatically.
CREATED 26-FEB-2002, Copyright (c) Rajnish Bhaskar 2002
| Field Summary |
| Fields inherited from class com.raj.htmlForms.HtmlFormElement |
isXHTML, out |
| Constructor Summary | |
HtmlTextArea(java.io.Writer w)
Minimal constructor for any form element. |
|
HtmlTextArea(java.io.Writer w,
boolean x)
Constructor that sets the writer and a boolean which determines whether or not XHTML will be written |
|
HtmlTextArea(java.io.Writer w,
java.lang.String n)
Constructor that just sets the name of the element |
|
HtmlTextArea(java.io.Writer w,
java.lang.String n,
int row,
int col)
Constructor that just sets the name of the element |
|
HtmlTextArea(java.io.Writer w,
java.lang.String n,
java.io.Reader r,
int row,
int col)
Constructor that sets the name of the element and populates it from a Reader object |
|
HtmlTextArea(java.io.Writer w,
java.lang.String n,
java.lang.String t,
int row,
int col)
Constructor that sets the name of the element and populates it from a String |
|
| Method Summary | |
java.lang.String |
getCols()
gets the number of cols for this textarea |
java.io.Reader |
getReader()
returns the reader being used to populate this textarea (or null if a string is being used) |
java.lang.String |
getRows()
gets the number of rows for this textarea |
java.lang.String |
getText()
return the String from which the textarea will be populated |
void |
reset()
resets all attributes of the element back to a blank state |
void |
setCols(int x)
sets the number of cols for this textarea |
void |
setReader(java.io.Reader r)
This is an alternative way of populating a textarea. |
void |
setRows(int x)
sets the number of rows for this textarea |
void |
setText(java.lang.String x)
set the text that you want to use to populate the textarea with |
java.lang.String |
toString()
Writes the attributes of this object to a string and returns them. |
void |
write()
writes an HTML textarea to the given writer |
| Methods inherited from class com.raj.htmlForms.HtmlFormElement |
getDir, getId, getLang, getName, getOnBlur, getOnClick, getOnDblClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnSelect, getStyle, getTabIndex, getTheClass, getTitle, getXhtml, setDir, setId, setLang, setName, setOnBlur, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnSelect, setStyle, setStyle, setTabIndex, setTheClass, setTitle, setXhtml |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public HtmlTextArea(java.io.Writer w)
foo becomes setFoo(). The attribute names can be
found at the W3C HTML reference or many other places on the web.
w - the Writer to which all the data will be written out
public HtmlTextArea(java.io.Writer w,
boolean x)
w - the Writer to which all the data will be written outx - if true, XHTML will be written, else false
public HtmlTextArea(java.io.Writer w,
java.lang.String n)
w - the Writer to which all the data will be written outn - the name of this element
public HtmlTextArea(java.io.Writer w,
java.lang.String n,
int row,
int col)
w - the Writer to which all the data will be written outn - the name of this elementrow - the number of rowscol - the number of cols
public HtmlTextArea(java.io.Writer w,
java.lang.String n,
java.lang.String t,
int row,
int col)
w - the Writer to which all the data will be written outn - the name of this elementt - the String from which the textarea will be populatedrow - the number of rowscol - the number of cols
public HtmlTextArea(java.io.Writer w,
java.lang.String n,
java.io.Reader r,
int row,
int col)
w - the Writer to which all the data will be written outn - the name of this elementr - the Reader which will be used to populate this elementrow - the number of rowscol - the number of cols| Method Detail |
public void setRows(int x)
public java.lang.String getRows()
public void setCols(int x)
public java.lang.String getCols()
public void setText(java.lang.String x)
public java.lang.String getText()
public void setReader(java.io.Reader r)
public java.io.Reader getReader()
public void reset()
HtmlFormElement
reset in class HtmlFormElementpublic java.lang.String toString()
HtmlFormElement
The toString() method should logically return a string representing the attributes
of the HTML element, eg if you set the name, title and style of the element then you should return a
string containing:
name="myName" title="some title" style="foo: xxx; bar: yyy;"
The responsibility for turning this into a form deliverable to a user agent belongs to
the write() method.
toString in class HtmlFormElementHtmlFormElement.write()public void write()
write in class HtmlFormElement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||