com.ge.research.acuity.ui
Class TableColumnInfo

java.lang.Object
  extended bycom.ge.research.acuity.ui.PresentationObject
      extended bycom.ge.research.acuity.ui.TableColumnInfo

public class TableColumnInfo
extends PresentationObject

TableColumnInfo contains information about the display name for the column, as well as information regarding how this column should be sorted within a TablePO, and a mapping of this meta information to a column in the TablePO data list, so that the meta-information is correctly applied to the proper information. TableColumnInfo are not renderable PresentationObjects. They only provide useful display information for the TablePO in which they are contained.

Version:
$Revision: 1.1 $ $Date: 2006/08/11 00:17:24 $
Author:
garbiras

Constructor Summary
TableColumnInfo()
          The default constructor.
 
Method Summary
 void addCellLevelIAO(java.lang.String key, InteractionObject iao)
          Adds a new interaction object to the list of available IAOs for the column values.
 void addDecorator(java.lang.String key, CellDecorator decorator)
          Adds a new decorator to the list of available decorators for the column values.
 void addHighlightInformation(HighlightRegionColumnInfo hlrci)
          Adds highlight region information associated with this column of a table.
 boolean copyValueOnRowDuplication()
          Returns the value of the cell value copy flag indicating whether or not the cell value within this column should be copied to a dynamically inserted row in the table.
 boolean descendingSort()
          Returns the value of the sort flag indicating whether or not this column should be sorted in DESCending fashion or not.
protected  void finalize()
          Makes sure to dereference any parent Table it might be linked to
 InteractionObject getCellLevelIAO(java.lang.String key)
          Returns the interaction object identifed by the key value
 java.util.Set getCellLevelIAOs()
          Returns the set of IAOs that apply to this column's values, along with their identifying keys.
 CellDecorator getDecorator(java.lang.String key)
          Returns the decorator identifed by the key value
 java.util.Set getDecorators()
          Returns the set of decorators that apply to this column's values, along with their identifying keys.
 int getDisplayOrder()
          Returns the display order for this column, from left to right, 1-n.
 java.lang.String getFormatPattern()
          Returns the formatting pattern to apply to column values during the rendering process.
 java.text.Format getFormatter(java.lang.Class datatype)
          Returns the formatter object to use to format a column value.
 HighlightRegionColumnInfo[] getHighlightInformation()
          Gets the highlight region information associated with this column of a table.
 java.lang.String getHorizontalAlignment()
          Returns the horizontal alignment associated with the column, if one exists.
 InteractionObject getInteractionObject()
          Returns the interaction object associated with the column, if one exists.
protected  TablePO getParent()
          Returns the reference to the parent table of this column
 int getRowsetColumn()
          Returns the column index of the TablePO data to which this meta-information applies.
 int getRowSpanGroupingRowsetColumn()
          Returns the column identifier of the rowspan flag indicating whether or not sequential rows with duplicate values should be rendered individually or as a spanning cell.
 int getSortPriority()
          Returns the sort position of this column.
 java.lang.String getTitle()
          Returns the label to be used as the column heading
 java.lang.String getValueName()
          Returns the external reference identifier for this column
 java.lang.String getVerticalAlignment()
          Returns the vertical alignment associated with the column, if one exists.
 void removeCellLevelIAO(InteractionObject iao)
          Removes the argument IAO from the list of available IAOs for the column.
 void removeCellLevelIAO(java.lang.String key)
          Removes the IAO identified by the argument key from the list of available IAOs for the column.
 void removeCellLevelIAOs()
          Removes all IAOs from the column
 void removeDecorator(CellDecorator decorator)
          Removes the argument decorator from the list of available decorators for the column.
 void removeDecorator(java.lang.String key)
          Removes the decorator identified by the argument key from the list of available decorators for the column.
 void removeDecorators()
          Removes all decorators from the column
protected  void removeHighlightInformation(HighlightRegionColumnInfo hlrci)
          Removes highlight region information associated with this column of a table.
protected  void removeParentReference()
          Removes the reference to the parent table that this column info object belongs to.
 void setCopyValueOnRowDuplication(boolean copyValueOnRowDuplication)
          Sets the value of the cell value copy flag indicating whether or not the cell value within this column should be copied to a dynamically inserted row in the table.
 void setDescendingSort(boolean descendingSort)
          Sets the value of the sort flag indicating whether or not this column should be sorted in DESCending fashion or not.
 void setDisplayOrder(int index)
          Sets the display order for this column, from left to right, 1-n.
 void setFormatPattern(java.lang.String pattern)
          Sets the formatting pattern to apply to column values during the rendering process.
 void setHasPresentationNature(java.lang.String string)
          Overrides setHasPresentationNature in PresentationObject.
 void setHorizontalAlignment(java.lang.String horizontalAlignment)
          Sets the horizontal alignment for this column
 void setInteractionObject(InteractionObject iao)
          Sets the interaction object associated with the column.
 void setIsDisplayed(boolean b)
          Sets the state of the isDisplayed flag.
protected  void setParentReference(TablePO parent)
          Sets the reference to the parent table that this column info object belongs to.
 void setRowsetColumn(int i)
          Sets the column index of the TablePO data to which this meta-information should be applied.
 void setRowSpanGroupingRowsetColumn(int rowSpanGroupingRowsetColumn)
          Sets the column identifier of the rowspan flag indicating whether or not sequential rows with duplicate values should be rendered individually or as a spanning cell.
 void setSortPriority(int sortPriority)
          Sets the sort position of this column.
 void setTitle(java.lang.String title)
          Sets the label to be used as the column heading
 void setValueName(java.lang.String string)
          Sets the external reference identifier for this column
 void setVerticalAlignment(java.lang.String verticalAlignment)
          Sets the vertical alignment for this column
 
Methods inherited from class com.ge.research.acuity.ui.PresentationObject
addLookupInfo, getHasPresentationNature, getIdentifier, getLookupInfo, getSubject, hasSubject, isDisplayed, isEditable, setEditability, setIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableColumnInfo

public TableColumnInfo()
The default constructor. Calls super(). Sets the presentation nature to PresentationNatureConstants.TABLECOL Sets the editability of the presentation nature to false

See Also:
PresentationObject.PresentationObject(), PresentationObject.setHasPresentationNature(java.lang.String), PresentationObject.setEditability(java.lang.String, boolean)
Method Detail

addCellLevelIAO

public void addCellLevelIAO(java.lang.String key,
                            InteractionObject iao)
Adds a new interaction object to the list of available IAOs for the column values. The key is the unique identifier for this IAO.

Parameters:
key - the unique identifier for this decorator
iao - the InteractionObject to be applied to cells referencing the key value

addDecorator

public void addDecorator(java.lang.String key,
                         CellDecorator decorator)
Adds a new decorator to the list of available decorators for the column values. The key is the unique identifier for this decorator.

Parameters:
key - the unique identifier for this decorator
decorator - the set of decoration attributes to be applied to cells referencing the key value

addHighlightInformation

public void addHighlightInformation(HighlightRegionColumnInfo hlrci)
Adds highlight region information associated with this column of a table.

Parameters:
hlrci - the highlight region information for this column of a table

copyValueOnRowDuplication

public boolean copyValueOnRowDuplication()
Returns the value of the cell value copy flag indicating whether or not the cell value within this column should be copied to a dynamically inserted row in the table.

Returns:
true if the cell value of the column should be copied on insertion; false if the newly inserted cell should be blank.

descendingSort

public boolean descendingSort()
Returns the value of the sort flag indicating whether or not this column should be sorted in DESCending fashion or not.

Returns:
true if this column is marked for sorting in DESCending fashion; false if this column is marked for sorting in ASCending fashion.

getCellLevelIAO

public InteractionObject getCellLevelIAO(java.lang.String key)
Returns the interaction object identifed by the key value

Parameters:
key - the IAO identifier
Returns:
The IAO identified by the key

getCellLevelIAOs

public java.util.Set getCellLevelIAOs()
Returns the set of IAOs that apply to this column's values, along with their identifying keys.

Returns:
The set of IAOs that apply to this column

getDecorator

public CellDecorator getDecorator(java.lang.String key)
Returns the decorator identifed by the key value

Parameters:
key - the decorator identifier
Returns:
The decorator identified by the key

getDecorators

public java.util.Set getDecorators()
Returns the set of decorators that apply to this column's values, along with their identifying keys.

Returns:
The set of decorators that apply to this column

getDisplayOrder

public int getDisplayOrder()
Returns the display order for this column, from left to right, 1-n. This tells the TablePO the order in which to display its column data.

Returns:
The order within the list of columns for the TablePO, to display this column

getFormatter

public java.text.Format getFormatter(java.lang.Class datatype)
Returns the formatter object to use to format a column value. The datatype of the column value must be passed in, so that a type specific formatter can be constructed.

Parameters:
datatype - the class representing the type of data to format
Returns:
The formatter object to use to format a column value, or null if a formatter could not be created from the supplied information

getFormatPattern

public java.lang.String getFormatPattern()
Returns the formatting pattern to apply to column values during the rendering process.

Returns:
The formatting pattern to apply to column values during the rendering process

getHighlightInformation

public HighlightRegionColumnInfo[] getHighlightInformation()
Gets the highlight region information associated with this column of a table.

Returns:
The highlight region information for this column of a table

getHorizontalAlignment

public java.lang.String getHorizontalAlignment()
Returns the horizontal alignment associated with the column, if one exists.

Returns:
A string representing the horizontal alignment associated with the column

getInteractionObject

public final InteractionObject getInteractionObject()
Returns the interaction object associated with the column, if one exists.

Returns:
The interaction object associated with the column

getRowsetColumn

public int getRowsetColumn()
Returns the column index of the TablePO data to which this meta-information applies.

Returns:
The TablePO data column to which this table column info applies

getRowSpanGroupingRowsetColumn

public int getRowSpanGroupingRowsetColumn()
Returns the column identifier of the rowspan flag indicating whether or not sequential rows with duplicate values should be rendered individually or as a spanning cell.

Returns:
The column identifier that controls row span grouping for this column.

getSortPriority

public int getSortPriority()
Returns the sort position of this column. This allows a TablePO to be sorted on multiple columns. Tells the TablePO when to apply table data sorting based upon values of this column. A sortPriority of 1 means the first column by which to be sorted, 2 is for the second, and so on. Values smaller than 1 are ignored.

Returns:
The ordered sort priority of this column

getTitle

public java.lang.String getTitle()
Returns the label to be used as the column heading

Returns:
The label for the column heading

getValueName

public java.lang.String getValueName()
Returns the external reference identifier for this column

Returns:
The external reference identifier for this column

getVerticalAlignment

public java.lang.String getVerticalAlignment()
Returns the vertical alignment associated with the column, if one exists.

Returns:
A string representing the vertical alignment associated with the column

removeCellLevelIAO

public void removeCellLevelIAO(java.lang.String key)
Removes the IAO identified by the argument key from the list of available IAOs for the column.

Parameters:
key - the IAO identifier to remove

removeCellLevelIAO

public void removeCellLevelIAO(InteractionObject iao)
Removes the argument IAO from the list of available IAOs for the column.

Parameters:
iao - the IAO to remove from the available list

removeCellLevelIAOs

public void removeCellLevelIAOs()
Removes all IAOs from the column


removeDecorator

public void removeDecorator(java.lang.String key)
Removes the decorator identified by the argument key from the list of available decorators for the column.

Parameters:
key - the decorator identifier to remove

removeDecorator

public void removeDecorator(CellDecorator decorator)
Removes the argument decorator from the list of available decorators for the column.

Parameters:
decorator - the decorator to remove from the available list

removeDecorators

public void removeDecorators()
Removes all decorators from the column


setCopyValueOnRowDuplication

public void setCopyValueOnRowDuplication(boolean copyValueOnRowDuplication)
Sets the value of the cell value copy flag indicating whether or not the cell value within this column should be copied to a dynamically inserted row in the table.

Parameters:
copyValueOnRowDuplication - true if the cell value of the column should be copied on insertion; false if the newly inserted cell should be blank.

setDescendingSort

public void setDescendingSort(boolean descendingSort)
Sets the value of the sort flag indicating whether or not this column should be sorted in DESCending fashion or not.

Parameters:
descendingSort - true if this column should be marked for sorting in DESCending fashion; false if this column should be marked for sorting in ASCending fashion.

setDisplayOrder

public void setDisplayOrder(int index)
Sets the display order for this column, from left to right, 1-n. This tells the TablePO the order in which to display its column data.

Parameters:
index - the order within the list of columns for the TablePO, to display this column

setFormatPattern

public void setFormatPattern(java.lang.String pattern)
Sets the formatting pattern to apply to column values during the rendering process.

Parameters:
pattern - the formatting pattern to apply to column values during the rendering process

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.TABLECOL

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

setHorizontalAlignment

public void setHorizontalAlignment(java.lang.String horizontalAlignment)
Sets the horizontal alignment for this column

Parameters:
horizontalAlignment - the external reference identifier for this column

setInteractionObject

public final void setInteractionObject(InteractionObject iao)
Sets the interaction object associated with the column. If the interaction object is a type associated with an input table, sets the input flag on the parent table.

Parameters:
iao - The interaction object to associate with the column
See Also:
TablePO.setIsInputTable()

setIsDisplayed

public void setIsDisplayed(boolean b)
Description copied from class: PresentationObject
Sets the state of the isDisplayed flag.

Overrides:
setIsDisplayed in class PresentationObject
Parameters:
b - true if this presentation object should be rendered by a client application; false if this presentation object should not be made visible in a client application.

setRowsetColumn

public void setRowsetColumn(int i)
Sets the column index of the TablePO data to which this meta-information should be applied.

Parameters:
i - the TablePO data column to which this table column info should be applied

setRowSpanGroupingRowsetColumn

public void setRowSpanGroupingRowsetColumn(int rowSpanGroupingRowsetColumn)
Sets the column identifier of the rowspan flag indicating whether or not sequential rows with duplicate values should be rendered individually or as a spanning cell.

Parameters:
rowSpanGroupingRowsetColumn - the column identifier that controls row span grouping for this column.

setSortPriority

public void setSortPriority(int sortPriority)
Sets the sort position of this column. This allows a TablePO to be sorted on multiple columns. Tells the TablePO when to apply table data sorting based upon values of this column. A sortPriority of 1 means the first column by which to be sorted, 2 is for the second, and so on. Values smaller than 1 are ignored.

Parameters:
sortPriority - the ordered sort priority of this column

setTitle

public void setTitle(java.lang.String title)
Sets the label to be used as the column heading

Parameters:
title - the label for the column heading

setValueName

public void setValueName(java.lang.String string)
Sets the external reference identifier for this column

Parameters:
string - the external reference identifier for this column

setVerticalAlignment

public void setVerticalAlignment(java.lang.String verticalAlignment)
Sets the vertical alignment for this column

Parameters:
verticalAlignment - the external reference identifier for this column

finalize

protected void finalize()
                 throws java.lang.Throwable
Makes sure to dereference any parent Table it might be linked to

Throws:
java.lang.Throwable

getParent

protected final TablePO getParent()
Returns the reference to the parent table of this column

Returns:
The reference to the parent table of this column

removeHighlightInformation

protected final void removeHighlightInformation(HighlightRegionColumnInfo hlrci)
Removes highlight region information associated with this column of a table.


removeParentReference

protected final void removeParentReference()
Removes the reference to the parent table that this column info object belongs to.


setParentReference

protected final void setParentReference(TablePO parent)
Sets the reference to the parent table that this column info object belongs to.

Parameters:
parent - the table that this series belongs to