All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.util.html.GridLayoutFormPanel

java.lang.Object
   |
   +----com.ibm.as400.util.html.LayoutFormPanel
           |
           +----com.ibm.as400.util.html.GridLayoutFormPanel

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);


Constructor Index

 o GridLayoutFormPanel()
Constructs a default GridLayoutFormPanel with one column.
 o GridLayoutFormPanel(int)
Constructs a GridLayoutFormPanel with the specified number of columns.

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
Adds a PropertyChangeListener.
 o addVetoableChangeListener(VetoableChangeListener)
Adds the VetoableChangeListener.
 o getColumns()
Returns the number of columns in the layout.
 o getTag()
Returns the grid layout panel tag.
 o removePropertyChangeListener(PropertyChangeListener)
Removes the PropertyChangeListener from the internal list.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes the VetoableChangeListener from the internal list.
 o setColumns(int)
Sets the number of columns in the layout.

Constructors

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

 o GridLayoutFormPanel
 public GridLayoutFormPanel(int columns)
Constructs a GridLayoutFormPanel with the specified number of columns.

Parameters:
columns - The number of columns.

Methods

 o addPropertyChangeListener
 public void addPropertyChangeListener(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
 o 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
 o getColumns
 public int getColumns()
Returns the number of columns in the layout.

Returns:
The number of columns.
 o getTag
 public String getTag()
Returns the grid layout panel tag.

Returns:
The tag.
Overrides:
getTag in class LayoutFormPanel
 o removePropertyChangeListener
 public void removePropertyChangeListener(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
 o 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
 o setColumns
 public void setColumns(int columns) throws PropertyVetoException
Sets the number of columns in the layout.

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

All Packages  Class Hierarchy  This Package  Previous  Next  Index