com.ge.research.acuity.ui
Class TablePO

java.lang.Object
  extended bycom.ge.research.acuity.ui.PresentationObject
      extended bycom.ge.research.acuity.ui.IndependentDisplayPO
          extended bycom.ge.research.acuity.ui.TablePO

public class TablePO
extends IndependentDisplayPO

An independent display object representing a Table of information

Version:
$Revision: 1.2 $ $Date: 2006/11/27 22:54:45 $
Author:
garbiras

Constructor Summary
TablePO()
          Calls the default constructor with argument null.
TablePO(java.lang.String title)
          Default constructor.
 
Method Summary
 void addColumnInfo(TableColumnInfo column)
          Adds a TableColumnInfo object to the list of columns in the table, ordered by the value fo the TableColumnInfo's displayOrder.
 boolean alternateRowShading()
          Returns the row shading setting.
 TableColumnInfo getColumn(int index)
          Returns the TableColumnInfo object from the list of contained columns, at the specified index
 java.util.List getColumns()
          Returns the list of TableColumnInfo objects containing the meta-information for each column within the table
 java.util.List getData()
          Returns the contents of the table
 java.lang.String getTitle()
          Returns the label to be used as the title of the table
 boolean isInputTable()
          Returns the value of the flag indicating whether or not the table is an editable table.
protected  void needsSort()
          Method used by this class and its TableColumnInfo objects to set the sorting flag, when there is a change to the data or column sort parameters, requiring the data to be re-examined for sorting.
 boolean processAsSingleEvent()
          Returns the value of the flag indicating whether or not the entire set of table data is set to be processed on update, or if each row is sent individually to be processed on update.
 boolean processUnmodifiedData()
          Returns the value of the flag indicating whether or not only modified row data is processed on update, or the entire table daa is processed on update.
 boolean processWithOldValues()
          Returns the value of the flag indicating whether or not table updates need the original row data along with the modified row data, when doing an update.
 void removeColumn(int index)
          Removes the TableColumnInfo, at the specified index, from the list of contained columns
 void removeColumn(TableColumnInfo column)
          Removes the specified column information from the list of contained columns
 void removeColumns()
          Removes all TableColumnInfo from the list of columns in this table
 void removeData()
          Removes the table contents
 void setAlternateRowShading(boolean value)
          Sets the row shading setting.
 void setData(java.util.List data)
          Sets the contents of the table.
 void setHasPresentationNature(java.lang.String string)
          Overrides setHasPresentationNature in PresentationObject.
 void setIsInputTable()
          Sets the value of the flag indicating whether or not the table is an editable table to true, meaning the table is editable and should be treated as an input table.
 void setProcessAsSingleEvent(boolean processAsSingleEvent)
          Sets the value of the flag indicating whether or not the entire set of table data is set to be processed on update, or if each row is sent individually to be processed on update.
 void setProcessUnmodifiedData(boolean processUnmodifiedData)
          Sets the value of the flag indicating whether or not only modified row data is processed on update, or the entire table daa is processed on update.
 void setProcessWithOldValues(boolean processWithOldValues)
          Sets the value of the flag indicating whether or not table updates need the original row data along with the modified row data, when doing an update.
 void setTitle(java.lang.String title)
          Sets the title for the table
 void sortTheTable()
          Sorts the contents of the table based upon the meta information contained within the TableColumnInfo objects, using the TableSortComparator
 
Methods inherited from class com.ge.research.acuity.ui.IndependentDisplayPO
canBeRemoved, displayBanner, getHeight, getIdentifierTitle, getWidth, getXPos, getYPos, getZOrder, setCanBeRemoved, setDisplayBanner, setHeight, setIdentifier, setIdentifierTitle, setPos, setPos, setPos, setPos, setWidth, setXPos, setYPos, setZOrder
 
Methods inherited from class com.ge.research.acuity.ui.PresentationObject
addLookupInfo, getHasPresentationNature, getIdentifier, getLookupInfo, getSubject, hasSubject, isDisplayed, isEditable, setEditability, setIsDisplayed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TablePO

public TablePO()
Calls the default constructor with argument null.


TablePO

public TablePO(java.lang.String title)
Default constructor. Calls super() Sets the presentation nature of this presentation object to PresentationNatureConstants.TABLE Sets the editability of the presentation nature to false Sets the title of the table

Parameters:
title - the title for the table
See Also:
PresentationObject.PresentationObject(), PresentationObject.setHasPresentationNature(java.lang.String), PresentationObject.setEditability(java.lang.String, boolean), setTitle(java.lang.String)
Method Detail

addColumnInfo

public void addColumnInfo(TableColumnInfo column)
Adds a TableColumnInfo object to the list of columns in the table, ordered by the value fo the TableColumnInfo's displayOrder.

Parameters:
column - the column information to add to the table

alternateRowShading

public boolean alternateRowShading()
Returns the row shading setting.

Returns:
true if alternate rows of the table are to be shaded; false otherwise.

getColumn

public TableColumnInfo getColumn(int index)
                          throws java.lang.IndexOutOfBoundsException
Returns the TableColumnInfo object from the list of contained columns, at the specified index

Parameters:
index - index of the columns list to extract (zero based)
Returns:
The table column info object, from the list of contained columns, at the specified index
Throws:
java.lang.IndexOutOfBoundsException - If the index argument is negative or greater than or equal to the number of columns in this table

getColumns

public java.util.List getColumns()
Returns the list of TableColumnInfo objects containing the meta-information for each column within the table

Returns:
The list of TableColumnInfo objects contained in this table

getData

public java.util.List getData()
Returns the contents of the table

Returns:
A list, each element of which represents a row of data in the table. Each list element is itself a List, each element of which represents the column value for that row.

getTitle

public java.lang.String getTitle()
Returns the label to be used as the title of the table

Returns:
The label for the table title

isInputTable

public final boolean isInputTable()
Returns the value of the flag indicating whether or not the table is an editable table.

Returns:
true if the table is an editable table; false otherwise.

processAsSingleEvent

public final boolean processAsSingleEvent()
Returns the value of the flag indicating whether or not the entire set of table data is set to be processed on update, or if each row is sent individually to be processed on update.

Returns:
true if the entire table data is sent once to be processed on update; false if each row's data is sent individually to be processed on update.

processUnmodifiedData

public final boolean processUnmodifiedData()
Returns the value of the flag indicating whether or not only modified row data is processed on update, or the entire table daa is processed on update.

Returns:
true if all table data is sent to be processed on update; false if only modified row data is sent to be processed on update.

processWithOldValues

public final boolean processWithOldValues()
Returns the value of the flag indicating whether or not table updates need the original row data along with the modified row data, when doing an update.

Returns:
true true if the original row values are required along with the modified row values when processing an update; false if only modified row data is sent to be processed on update.

removeColumn

public void removeColumn(int index)
                  throws java.lang.IndexOutOfBoundsException
Removes the TableColumnInfo, at the specified index, from the list of contained columns

Parameters:
index - index of the column info list to remove (zero based)
Throws:
java.lang.IndexOutOfBoundsException - If the index argument is negative or greater than or equal to the number of columns contained by this table

removeColumn

public void removeColumn(TableColumnInfo column)
Removes the specified column information from the list of contained columns

Parameters:
column - the column information to remove from the list of columns in the table

removeColumns

public void removeColumns()
Removes all TableColumnInfo from the list of columns in this table


removeData

public void removeData()
Removes the table contents


setAlternateRowShading

public void setAlternateRowShading(boolean value)
Sets the row shading setting.

Parameters:
value - true if alternate rows of the table are to be shaded; false otherwise.

setData

public void setData(java.util.List data)
Sets the contents of the table. Each element of the argument list should represent a row of the table. Each element of the list should be another List, representing the column values for that row. Also sets an internal flag, indicating that the table data should be inspected for needing to be sorted.

Parameters:
data - a list, each element of which represents a row of data in the table. Each list element is itself a List, each element of which represents the column value for that row.

setHasPresentationNature

public void setHasPresentationNature(java.lang.String string)
Overrides setHasPresentationNature in PresentationObject. This method does nothing since this class MUST be of presentation nature PresentationNatureConstants.TABLE

Overrides:
setHasPresentationNature in class PresentationObject
Parameters:
string - IGNORED. The presentation nature is not editable for a TablePO
See Also:
PresentationNatureConstants.isPresentationNature(java.lang.String)

setProcessAsSingleEvent

public final void setProcessAsSingleEvent(boolean processAsSingleEvent)
Sets the value of the flag indicating whether or not the entire set of table data is set to be processed on update, or if each row is sent individually to be processed on update. Calls com.ge.research.acuity.ui.TablePO#isTableInput().

Parameters:
processAsSingleEvent - true if the entire table data is sent once to be processed on update; false if each row's data is sent individually to be processed on update.
See Also:
setIsInputTable()

setProcessUnmodifiedData

public final void setProcessUnmodifiedData(boolean processUnmodifiedData)
Sets the value of the flag indicating whether or not only modified row data is processed on update, or the entire table daa is processed on update. Calls com.ge.research.acuity.ui.TablePO#isTableInput().

Parameters:
processUnmodifiedData - true if all table data is sent to be processed on update; false if only modified row data is sent to be processed on update.
See Also:
setIsInputTable()

setProcessWithOldValues

public final void setProcessWithOldValues(boolean processWithOldValues)
Sets the value of the flag indicating whether or not table updates need the original row data along with the modified row data, when doing an update. Calls com.ge.research.acuity.ui.TablePO#isTableInput().

Parameters:
processWithOldValues - true if the original row values are required along with the modified row values when processing an update; false if only modified row data is sent to be processed on update.
See Also:
setIsInputTable()

setTitle

public void setTitle(java.lang.String title)
Sets the title for the table

Parameters:
title - the new label for the table title

sortTheTable

public void sortTheTable()
Sorts the contents of the table based upon the meta information contained within the TableColumnInfo objects, using the TableSortComparator


needsSort

protected final void needsSort()
Method used by this class and its TableColumnInfo objects to set the sorting flag, when there is a change to the data or column sort parameters, requiring the data to be re-examined for sorting.


setIsInputTable

public final void setIsInputTable()
Sets the value of the flag indicating whether or not the table is an editable table to true, meaning the table is editable and should be treated as an input table.