atg.service.util
Class TableInfo.Column

java.lang.Object
  extended by atg.service.util.TableInfo.Column
Enclosing class:
TableInfo

public class TableInfo.Column
extends java.lang.Object

Inner class that represents all the information about a table column -- its name, column heading, the corresponding sort property, the current sort direction, and the position of this column's property relative to others when doing multi-column sorting.


Method Summary
protected  int direction()
          Get the direction code for this entry, but in a way that is not accessible as a Java bean getter since only the enclosing class should ever be dealing with integer direction codes, which exist only for efficiency of the implementation.
 java.lang.String getHeading()
          Return the display name (column heading) for this column entry.
 java.lang.String getName()
          Return the name for this column entry.
 java.lang.String getProperty()
          Return the property used to sort on this column
 java.lang.String getSortDirection()
          Return the direction string for this entry, which will be "ascending", "descending", or "none".
 int getSortIndex()
          Return the relative index for this column.
 int getSortPosition()
          Return the relative position for this entry.
 java.lang.String getSortString()
          Return a string of the form [+/-]propertyName
 void setSortDirection(java.lang.String pDirectionType)
          Set the direction for this entry.
protected  void useDirection(int pDirection)
          Set the direction code for this entry, but in a way that is not accessible as a Java bean setter since only the enclosing class should ever be dealing with integer direction codes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public java.lang.String getName()
Return the name for this column entry.


getHeading

public java.lang.String getHeading()
Return the display name (column heading) for this column entry.


getProperty

public java.lang.String getProperty()
Return the property used to sort on this column


getSortIndex

public int getSortIndex()
Return the relative index for this column. Indices are zero-based and are relative to other columns that are being sorted. Columns that are not being sorted return an index of -1.

For example, if a TableColumns object has three columns called "Name", "Age", and "Salary", and the table is being sorted first on salary and then on age, the index for Name would be -1 (no sort), the index for Salary would be 0 (indicating that it is the primary sort key), and the index for Salary would be 1 (indicating that it is the secondary sort key after Salary. Note that the index values are completely independent of the order in which Columns appear in the TableColumns object, and of the order in which they are rendered on the page.


getSortPosition

public int getSortPosition()
Return the relative position for this entry. Positions are 1-based and are relative to other columns that are being sorted. An entry's position is always one greater than its index, so columns that are not being sorted return a position of 0.


getSortDirection

public java.lang.String getSortDirection()
Return the direction string for this entry, which will be "ascending", "descending", or "none".


setSortDirection

public void setSortDirection(java.lang.String pDirectionType)
Set the direction for this entry.


direction

protected int direction()
Get the direction code for this entry, but in a way that is not accessible as a Java bean getter since only the enclosing class should ever be dealing with integer direction codes, which exist only for efficiency of the implementation.


useDirection

protected void useDirection(int pDirection)
Set the direction code for this entry, but in a way that is not accessible as a Java bean setter since only the enclosing class should ever be dealing with integer direction codes.


getSortString

public java.lang.String getSortString()
Return a string of the form [+/-]propertyName