com.ibm.as400.util.html
Class TextAreaFormElement
- java.lang.Object
-
- com.ibm.as400.util.html.HTMLTagAttributes
-
- com.ibm.as400.util.html.TextAreaFormElement
-
- All Implemented Interfaces:
- HTMLTagElement, java.io.Serializable
public class TextAreaFormElement extends HTMLTagAttributes implements java.io.Serializable
The TextAreaFormElement class represents a text area element, which can be used in an HTML form.Here is an example of a TextAreaFormElement tag: <form> <textarea name="foo" rows="3" cols="40"> Default TEXTAREA value goes here </textarea> </form>
TextAreaFormElement objects generate the following events:
- PropertyChangeEvent
- VetoableChangeEvent
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description TextAreaFormElement()
Constructs a default TextAreaFormElement object.TextAreaFormElement(java.lang.String name)
Constructs a TextAreaFormElement object with the specified control name.TextAreaFormElement(java.lang.String name, int rows, int cols)
Constructs a TextAreaFormElement object with the specified control name, number of rows, and columns.
-
Method Summary
Methods Modifier and Type Method and Description void
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Adds the VetoableChangeListener.int
getColumns()
Returns the number of visible columns in the text area.java.lang.String
getDirection()
Returns the direction of the text interpretation.java.lang.String
getFOTag()
Returns a comment tag.java.lang.String
getLanguage()
Returns the language of the input element.java.lang.String
getName()
Returns the control name of the text area.int
getRows()
Returns the number of visible rows in the text area.java.lang.String
getTag()
Returns the text area tag.java.lang.String
getText()
Returns the initial text of the text area.void
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes the VetoableChangeListener from the internal list.void
setColumns(int cols)
Sets the number of visible columns in the text area.void
setDirection(java.lang.String dir)
Sets the direction of the text interpretation.void
setLanguage(java.lang.String lang)
Sets the language of the input tag.void
setName(java.lang.String name)
Sets the control name of the text area.void
setRows(int rows)
Sets the number of visible rows in the text area.void
setText(java.lang.String text)
Sets the initial text of the text area.java.lang.String
toString()
Returns a String representation of the text area tag.-
Methods inherited from class com.ibm.as400.util.html.HTMLTagAttributes
addPropertyChangeListener, getAttributes, getAttributeString, removePropertyChangeListener, setAttributes
-
-
-
-
Constructor Detail
-
TextAreaFormElement
public TextAreaFormElement()
Constructs a default TextAreaFormElement object.
-
TextAreaFormElement
public TextAreaFormElement(java.lang.String name)
Constructs a TextAreaFormElement object with the specified control name.- Parameters:
name
- The control name of the text area.
-
TextAreaFormElement
public TextAreaFormElement(java.lang.String name, int rows, int cols)
Constructs a TextAreaFormElement object with the specified control name, number of rows, and columns.- Parameters:
name
- The control name of the text area.rows
- The number of rows.cols
- The number of columns.
-
-
Method Detail
-
addVetoableChangeListener
public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Adds the VetoableChangeListener. The specified VetoableChangeListener's vetoableChange method will be called each time the value of any constrained property is changed.- Parameters:
listener
- The VetoableChangeListener.- See Also:
removeVetoableChangeListener(java.beans.VetoableChangeListener)
-
getColumns
public int getColumns()
Returns the number of visible columns in the text area.- Returns:
- The number of columns.
-
getDirection
public java.lang.String getDirection()
Returns the direction of the text interpretation.- Returns:
- The direction of the text.
-
getLanguage
public java.lang.String getLanguage()
Returns the language of the input element.- Returns:
- The language of the input element.
-
getName
public java.lang.String getName()
Returns the control name of the text area.- Returns:
- The control name.
-
getRows
public int getRows()
Returns the number of visible rows in the text area.- Returns:
- The number of rows.
-
getFOTag
public java.lang.String getFOTag()
Returns a comment tag. This method should not be called. There is no XSL-FO support for this class.- Specified by:
getFOTag
in interfaceHTMLTagElement
- Returns:
- The comment tag.
-
getTag
public java.lang.String getTag()
Returns the text area tag.- Specified by:
getTag
in interfaceHTMLTagElement
- Returns:
- The tag.
-
getText
public java.lang.String getText()
Returns the initial text of the text area.- Returns:
- The initial text.
-
removeVetoableChangeListener
public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes the VetoableChangeListener from the internal list. If the VetoableChangeListener is not on the list, nothing is done.- Parameters:
listener
- The VetoableChangeListener.- See Also:
addVetoableChangeListener(java.beans.VetoableChangeListener)
-
setColumns
public void setColumns(int cols) throws java.beans.PropertyVetoException
Sets the number of visible columns in the text area.- Parameters:
cols
- The number of columns.- Throws:
java.beans.PropertyVetoException
- If a change is vetoed.
-
setDirection
public void setDirection(java.lang.String dir) throws java.beans.PropertyVetoException
Sets the direction of the text interpretation.- Parameters:
dir
- The direction. One of the following constants defined in HTMLConstants: LTR or RTL.- Throws:
java.beans.PropertyVetoException
- If a change is vetoed.- See Also:
HTMLConstants
-
setLanguage
public void setLanguage(java.lang.String lang) throws java.beans.PropertyVetoException
Sets the language of the input tag.- Parameters:
lang
- The language. Example language tags include: en and en-US.- Throws:
java.beans.PropertyVetoException
- If a change is vetoed.
-
setName
public void setName(java.lang.String name) throws java.beans.PropertyVetoException
Sets the control name of the text area.- Parameters:
name
- The control name.- Throws:
java.beans.PropertyVetoException
- If a change is vetoed.
-
setRows
public void setRows(int rows) throws java.beans.PropertyVetoException
Sets the number of visible rows in the text area.- Parameters:
rows
- The number of rows.- Throws:
java.beans.PropertyVetoException
- If a change is vetoed.
-
setText
public void setText(java.lang.String text) throws java.beans.PropertyVetoException
Sets the initial text of the text area.- Parameters:
text
- The initial text.- Throws:
java.beans.PropertyVetoException
- If a change is vetoed.
-
toString
public java.lang.String toString()
Returns a String representation of the text area tag.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The tag.
-
-