com.ibm.as400.util.html
Class TextAreaFormElement

java.lang.Object
  extended by com.ibm.as400.util.html.HTMLTagAttributes
      extended by com.ibm.as400.util.html.TextAreaFormElement
All Implemented Interfaces:
HTMLTagElement, Serializable

public class TextAreaFormElement
extends HTMLTagAttributes
implements 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:

See Also:
Serialized Form

Constructor Summary
TextAreaFormElement()
          Constructs a default TextAreaFormElement object.
TextAreaFormElement(String name)
          Constructs a TextAreaFormElement object with the specified control name.
TextAreaFormElement(String name, int rows, int cols)
          Constructs a TextAreaFormElement object with the specified control name, number of rows, and columns.
 
Method Summary
 void addVetoableChangeListener(VetoableChangeListener listener)
          Adds the VetoableChangeListener.
 int getColumns()
          Returns the number of visible columns in the text area.
 String getDirection()
          Returns the direction of the text interpretation.
 String getFOTag()
          Returns a comment tag.
 String getLanguage()
          Returns the language of the input element.
 String getName()
          Returns the control name of the text area.
 int getRows()
          Returns the number of visible rows in the text area.
 String getTag()
          Returns the text area tag.
 String getText()
          Returns the initial text of the text area.
 void removeVetoableChangeListener(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(String dir)
          Sets the direction of the text interpretation.
 void setLanguage(String lang)
          Sets the language of the input tag.
 void setName(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(String text)
          Sets the initial text of the text area.
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextAreaFormElement

public TextAreaFormElement()
Constructs a default TextAreaFormElement object.


TextAreaFormElement

public TextAreaFormElement(String name)
Constructs a TextAreaFormElement object with the specified control name.

Parameters:
name - The control name of the text area.

TextAreaFormElement

public TextAreaFormElement(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(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 String getDirection()
Returns the direction of the text interpretation.

Returns:
The direction of the text.

getLanguage

public String getLanguage()
Returns the language of the input element.

Returns:
The language of the input element.

getName

public 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 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 interface HTMLTagElement
Returns:
The comment tag.

getTag

public String getTag()
Returns the text area tag.

Specified by:
getTag in interface HTMLTagElement
Returns:
The tag.

getText

public String getText()
Returns the initial text of the text area.

Returns:
The initial text.

removeVetoableChangeListener

public void removeVetoableChangeListener(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 PropertyVetoException
Sets the number of visible columns in the text area.

Parameters:
cols - The number of columns.
Throws:
PropertyVetoException - If a change is vetoed.

setDirection

public void setDirection(String dir)
                  throws PropertyVetoException
Sets the direction of the text interpretation.

Parameters:
dir - The direction. One of the following constants defined in HTMLConstants: LTR or RTL.
Throws:
PropertyVetoException - If a change is vetoed.
See Also:
HTMLConstants

setLanguage

public void setLanguage(String lang)
                 throws PropertyVetoException
Sets the language of the input tag.

Parameters:
lang - The language. Example language tags include: en and en-US.
Throws:
PropertyVetoException - If a change is vetoed.

setName

public void setName(String name)
             throws PropertyVetoException
Sets the control name of the text area.

Parameters:
name - The control name.
Throws:
PropertyVetoException - If a change is vetoed.

setRows

public void setRows(int rows)
             throws PropertyVetoException
Sets the number of visible rows in the text area.

Parameters:
rows - The number of rows.
Throws:
PropertyVetoException - If a change is vetoed.

setText

public void setText(String text)
             throws PropertyVetoException
Sets the initial text of the text area.

Parameters:
text - The initial text.
Throws:
PropertyVetoException - If a change is vetoed.

toString

public String toString()
Returns a String representation of the text area tag.

Overrides:
toString in class Object
Returns:
The tag.