org.jaffa.presentation.portlet.widgets.model
Class GridModel

java.lang.Object
  extended byorg.jaffa.presentation.portlet.widgets.model.WidgetModel
      extended byorg.jaffa.presentation.portlet.widgets.model.GridModel

public class GridModel
extends WidgetModel

Model for the Grid widget.


Constructor Summary
GridModel()
           
 
Method Summary
 void clearRows()
          Empty out all the rows in the Grid
 Object getElement(String columnName, int rowNum)
          Returns a field value from a given row.
 boolean getErrorInSavingUserSettings()
          getter for the attribute errorInSavingUserSettings
 GridModelRow getRow(int rowNum)
          Returns a Row object based on the position or the row in the List.
 GridModelRow getRowById(int rowId)
          Returns a Row object based on the rowId.
 Collection getRows()
          Returns a Collection of GridModelRow objects.
 GridModelRow newRow()
          Creates and returns a new GridModelRow.
 GridModelRow newRow(int rowNum)
          Create a new Row at the specfied position in the Grid.
 void removeRow(GridModelRow row)
          Removes the row from the grid.
 void setErrorInSavingUserSettings(boolean value)
          setter for the attribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridModel

public GridModel()
Method Detail

newRow

public GridModelRow newRow()
Creates and returns a new GridModelRow. This object will be added to the end of the the Grid.

Returns:
a new GridModelRow object.

newRow

public GridModelRow newRow(int rowNum)
Create a new Row at the specfied position in the Grid. rowNum can be from 0 to GridModel.size(). if rowNum = GridModel.size(), then this function is the same as newRow();

Parameters:
rowNum - The position at which the row is to be added.
Returns:
a new GridModelRow object.

clearRows

public void clearRows()
Empty out all the rows in the Grid


removeRow

public void removeRow(GridModelRow row)
Removes the row from the grid.

Parameters:
row - The row to be removed.

getRows

public Collection getRows()
Returns a Collection of GridModelRow objects.

Returns:
a Collection of GridModelRow objects.

getRow

public GridModelRow getRow(int rowNum)
Returns a Row object based on the position or the row in the List.

Parameters:
rowNum - The position of the row.
Returns:
a Row object based on the position or the row in the List.

getRowById

public GridModelRow getRowById(int rowId)
Returns a Row object based on the rowId.

Parameters:
rowId - The id of the row.
Returns:
Row object based on the rowId.

getElement

public Object getElement(String columnName,
                         int rowNum)
Returns a field value from a given row.

Parameters:
columnName - The name of the field.
rowNum - The position of the row.
Returns:
a field value from a given row.

getErrorInSavingUserSettings

public boolean getErrorInSavingUserSettings()
getter for the attribute errorInSavingUserSettings


setErrorInSavingUserSettings

public void setErrorInSavingUserSettings(boolean value)
setter for the attribute



Copyright © 2002-2004 JAFFA Project.