com.ibm.as400.util.html
Class GridLayoutFormPanel

java.lang.Object
  |
  +--com.ibm.as400.util.html.LayoutFormPanel
        |
        +--com.ibm.as400.util.html.GridLayoutFormPanel
All Implemented Interfaces:
HTMLTagElement, java.io.Serializable

public class GridLayoutFormPanel
extends LayoutFormPanel

The GridLayoutFormPanel class represents a grid layout of HTML form elements.

GridLayoutFormPanel objects generate the following events:

This examples creates a GridLayoutFormPanel object with two columns.

  

// Create a text form input element for the system. LabelFormElement sysPrompt = new LabelFormElement("System:"); TextFormInput system = new TextFormInput("System");

// Create a text form input element for the userId. LabelFormElement userPrompt = new LabelFormElement("User:"); TextFormInput user = new TextFormInput("User");

// Create a password form input element for the password. LabelFormElement passwordPrompt = new LabelFormElement("Password:"); PasswordFormInput password = new PasswordFormInput("Password");

// Create the GridLayoutFormPanel object with two columns and add the form elements. GridLayoutFormPanel panel = new GridLayoutFormPanel(2); panel.addElement(sysPrompt); panel.addElement(system); panel.addElement(userPrompt); panel.addElement(user); panel.addElement(passwordPrompt); panel.addElement(password);

// Create the submit button to the form. SubmitFormInput logonButton = new SubmitFormInput("logon", "Logon");

// Create HTMLForm object and add the panel to it. HTMLForm form = new HTMLForm(servletURI); form.addElement(panel); form.addElement(logonButton);

See Also:
Serialized Form

Constructor Summary
GridLayoutFormPanel()
          Constructs a default GridLayoutFormPanel with one column.
GridLayoutFormPanel(int columns)
          Constructs a GridLayoutFormPanel with the specified number of columns.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Adds a PropertyChangeListener.
 void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
          Adds the VetoableChangeListener.
 int getColumns()
          Returns the number of columns in the layout.
 java.lang.String getDirection()
          Returns the direction of the text interpretation.
 java.lang.String getLanguage()
          Returns the language of the input element.
 java.lang.String getTag()
          Returns the grid layout panel tag.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Removes the PropertyChangeListener from the internal list.
 void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
          Removes the VetoableChangeListener from the internal list.
 void setColumns(int columns)
          Sets the number of columns in the layout.
 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.
 
Methods inherited from class com.ibm.as400.util.html.LayoutFormPanel
addElement, addElementListener, getSize, removeElement, removeElementListener, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GridLayoutFormPanel

public GridLayoutFormPanel()
Constructs a default GridLayoutFormPanel with one column.

GridLayoutFormPanel

public GridLayoutFormPanel(int columns)
Constructs a GridLayoutFormPanel with the specified number of columns.
Parameters:
columns - The number of columns.
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener. The specified PropertyChangeListener's propertyChange method will be called each time the value of any bound property is changed.
Parameters:
listener - The PropertyChangeListener.
See Also:
removePropertyChangeListener(java.beans.PropertyChangeListener)

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 columns in the layout.
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.

getTag

public java.lang.String getTag()
Returns the grid layout panel tag.
Returns:
The tag.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes the PropertyChangeListener from the internal list. If the PropertyChangeListener is not on the list, nothing is done.
Parameters:
listener - The PropertyChangeListener.
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener)

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 columns)
                throws java.beans.PropertyVetoException
Sets the number of columns in the layout.
Parameters:
columns - 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.