wt.templateutil.table
Class SortedTableModel

java.lang.Object
  extended bywt.templateutil.table.SortedTableModel
All Implemented Interfaces:
AddColumn, ApplicationContextChild, ColumnIdentifier, TableHeaderSetter, TableModel, TableModelStub

public class SortedTableModel
extends Object
implements TableModelStub, AddColumn, TableHeaderSetter, ApplicationContextChild

Deprecation Notice: This class is still valid for this release, however this serves as advance notice that it will be removed in the future. All user interfaces built using the Windchill HTML Template Processing client architecture will be rewritten using a different framework in an upcoming release.

This class is a wrapper for an instance of the javax.swing.table.TableModel class that performs sorting of the table data. It is used for PDMLink tables when sorting by column is enabled.

Supported API: true

Extendable: false


Field Summary
private static String ACTION
          Deprecated.  
private  ApplicationContext applicationContext
          Deprecated.  
(package private)  boolean ascending
          Deprecated.  
private  HashMap comparatorMapping
          Deprecated.  
(package private)  int compares
          Deprecated.  
(package private)  int[] indexes
          Deprecated.  
(package private)  TableModel model
          Deprecated.  
private static String SERVICE_NAME
          Deprecated.  
(package private)  int sortingColumn
          Deprecated.  
private static boolean VERBOSE
          Deprecated.  
 
Fields inherited from interface wt.services.applicationcontext.ApplicationContextChild
APPLICATION_CONTEXT
 
Constructor Summary
SortedTableModel()
          Deprecated.  
 
Method Summary
 void addColumn(Properties props)
          Deprecated. Adds a new Column to the TableModel.
 void addTableModelListener(TableModelListener l)
          Deprecated. 

Supported API: true
 void checkModel()
          Deprecated.  
 int compare(int row1, int row2)
          Deprecated.  
 int compareRowsByColumn(int row1, int row2, int column)
          Deprecated.  
 ApplicationContextServices getApplContextServices()
          Deprecated.  
 ApplicationContext getApplicationContext()
          Deprecated. Gets the object for the association that plays role: APPLICATION_CONTEXT.
 Class getColumnClass(int columnIndex)
          Deprecated. 

Supported API: true
 int getColumnCount()
          Deprecated. 

Supported API: true
 String getColumnName(int columnIndex)
          Deprecated. Returns name of the HTML table column for the column index passed in as input parameter.
protected  Comparator getComparator(Object key)
          Deprecated.  
 Comparator getComparatorFromApplicationContext(Object target)
          Deprecated.  
 Object getIdentifier(int columnIndex)
          Deprecated. Returns the name/handle of the column at columnIndex.
 int getRowCount()
          Deprecated. 

Supported API: true
 TableModel getTableModel()
          Deprecated.  
 Object getValueAt(int rowIndex, int columnIndex)
          Deprecated. 

Supported API: true
 boolean isCellEditable(int rowIndex, int columnIndex)
          Deprecated. 

Supported API: true
(package private)  void merge(int[] a, int f, int mid, int l)
          Deprecated.  
(package private)  void mergeSort(int[] a, int f, int l)
          Deprecated.  
 void reallocateIndexes()
          Deprecated.  
 void removeTableModelListener(TableModelListener l)
          Deprecated. 

Supported API: true
 void setApplicationContext(ApplicationContext a_ApplicationContext)
          Deprecated. Sets the object for the association that plays role: APPLICATION_CONTEXT.
 void setHeaderFromResource(String resourceBundleName, String resourceBundleKey, Object columnId)
          Deprecated. Sets the value returned from the getColumnName method for the column with name/handle columnId to be the localized String returned for the resource key, resourceBundleKey, from the resource bundle, resourceBundleName.
 void setHeaderFromTargetClass(String targetClassName, Object columnId)
          Deprecated. Sets the class that introspection is done on when the name/handle of the column is used to define the Column Name.
 void setModel(TableModel model)
          Deprecated.  
 void setValueAt(Object value, int rowIndex, int columnIndex)
          Deprecated. 

Supported API: true
 void sort(int[] target)
          Deprecated.  
 void sort(Object sender)
          Deprecated.  
 void sortByColumn(int column)
          Deprecated.  
 void sortByColumn(int column, boolean ascending)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERBOSE

private static final boolean VERBOSE
Deprecated. 

indexes

int[] indexes
Deprecated. 

sortingColumn

int sortingColumn
Deprecated. 

ascending

boolean ascending
Deprecated. 

compares

int compares
Deprecated. 

model

TableModel model
Deprecated. 

comparatorMapping

private HashMap comparatorMapping
Deprecated. 

applicationContext

private ApplicationContext applicationContext
Deprecated. 

SERVICE_NAME

private static final String SERVICE_NAME
Deprecated. 
See Also:
Constant Field Values

ACTION

private static final String ACTION
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

SortedTableModel

public SortedTableModel()
Deprecated. 
Method Detail

setModel

public void setModel(TableModel model)
Deprecated.  

Sets the TableModel to be sorted

Supported API: true


compareRowsByColumn

public int compareRowsByColumn(int row1,
                               int row2,
                               int column)
Deprecated. 

compare

public int compare(int row1,
                   int row2)
Deprecated. 

reallocateIndexes

public void reallocateIndexes()
Deprecated. 

checkModel

public void checkModel()
Deprecated. 

sort

public void sort(Object sender)
Deprecated. 

sortByColumn

public void sortByColumn(int column)
Deprecated. 

sortByColumn

public void sortByColumn(int column,
                         boolean ascending)
Deprecated.  

Sorts the rows of the associated TableModel by a given column. If objects in column are instances of java.util.Comparator they will be sorted using the Comparator.compare() method. Otherwise, the objects will be converted to Strings and sorted alphanumerically.

Parameters:
column - number of the column to sort by
ascending - true if rows should be sorted in ascending order; false if in descending order

Supported API: true

addTableModelListener

public void addTableModelListener(TableModelListener l)
Deprecated. 
Description copied from interface: TableModelStub


Supported API: true

Specified by:
addTableModelListener in interface TableModelStub
Parameters:
l -

getColumnClass

public Class getColumnClass(int columnIndex)
Deprecated. 
Description copied from interface: TableModelStub


Supported API: true

Specified by:
getColumnClass in interface TableModelStub
Parameters:
columnIndex -
Returns:
Class

getColumnCount

public int getColumnCount()
Deprecated. 
Description copied from interface: TableModelStub


Supported API: true

Specified by:
getColumnCount in interface TableModelStub
Returns:
int

getColumnName

public String getColumnName(int columnIndex)
Deprecated. 
Description copied from interface: TableModelStub
Returns name of the HTML table column for the column index passed in as input parameter.

Supported API: true

Specified by:
getColumnName in interface TableModelStub
Parameters:
columnIndex -
Returns:
String

getRowCount

public int getRowCount()
Deprecated. 
Description copied from interface: TableModelStub


Supported API: true

Specified by:
getRowCount in interface TableModelStub
Returns:
int

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)
Deprecated. 
Description copied from interface: TableModelStub


Supported API: true

Specified by:
getValueAt in interface TableModelStub
Parameters:
rowIndex -
columnIndex -
Returns:
Object

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Deprecated. 
Description copied from interface: TableModelStub


Supported API: true

Specified by:
isCellEditable in interface TableModelStub
Parameters:
rowIndex -
columnIndex -
Returns:
boolean

removeTableModelListener

public void removeTableModelListener(TableModelListener l)
Deprecated. 
Description copied from interface: TableModelStub


Supported API: true

Specified by:
removeTableModelListener in interface TableModelStub
Parameters:
l -

setValueAt

public void setValueAt(Object value,
                       int rowIndex,
                       int columnIndex)
Deprecated. 
Description copied from interface: TableModelStub


Supported API: true

Specified by:
setValueAt in interface TableModelStub
Parameters:
value -
rowIndex -
columnIndex -

setHeaderFromResource

public void setHeaderFromResource(String resourceBundleName,
                                  String resourceBundleKey,
                                  Object columnId)
Deprecated. 
Description copied from interface: TableHeaderSetter
Sets the value returned from the getColumnName method for the column with name/handle columnId to be the localized String returned for the resource key, resourceBundleKey, from the resource bundle, resourceBundleName.

This is a convenience method to allow overriding the either the display name for an attribute or to allow setting the title on a column when the name/handle of the column is not an attribute of the BinaryLink or OtherSide object.

Supported API: true

Specified by:
setHeaderFromResource in interface TableHeaderSetter
Parameters:
resourceBundleName -
resourceBundleKey -
columnId -

setHeaderFromTargetClass

public void setHeaderFromTargetClass(String targetClassName,
                                     Object columnId)
Deprecated. 
Description copied from interface: TableHeaderSetter
Sets the class that introspection is done on when the name/handle of the column is used to define the Column Name.

Supported API: true

Specified by:
setHeaderFromTargetClass in interface TableHeaderSetter
Parameters:
targetClassName -
columnId -

addColumn

public void addColumn(Properties props)
               throws WTException
Deprecated. 
Description copied from interface: AddColumn
Adds a new Column to the TableModel. The Properties object can be used to pass in information regarding adding the new column to the TableModel. In the case of the addColumn method in the BasicTableService, the Properties are the name/value pairs that were passed in the Windchill script call.

Supported API: true

Specified by:
addColumn in interface AddColumn
Parameters:
props -
Throws:
WTException

getIdentifier

public Object getIdentifier(int columnIndex)
Deprecated. 
Description copied from interface: ColumnIdentifier
Returns the name/handle of the column at columnIndex.

Supported API: true

Specified by:
getIdentifier in interface ColumnIdentifier
Parameters:
columnIndex -
Returns:
Object

getTableModel

public TableModel getTableModel()
Deprecated. 

getComparator

protected Comparator getComparator(Object key)
Deprecated. 

setApplicationContext

public void setApplicationContext(ApplicationContext a_ApplicationContext)
                           throws WTPropertyVetoException
Deprecated. 
Description copied from interface: ApplicationContextChild
Sets the object for the association that plays role: APPLICATION_CONTEXT.

Supported API: false

Specified by:
setApplicationContext in interface ApplicationContextChild
Parameters:
a_ApplicationContext -
Throws:
WTPropertyVetoException

getComparatorFromApplicationContext

public Comparator getComparatorFromApplicationContext(Object target)
Deprecated. 

getApplicationContext

public ApplicationContext getApplicationContext()
Deprecated. 
Description copied from interface: ApplicationContextChild
Gets the object for the association that plays role: APPLICATION_CONTEXT.

Supported API: false

Specified by:
getApplicationContext in interface ApplicationContextChild
Returns:
ApplicationContext

getApplContextServices

public ApplicationContextServices getApplContextServices()
Deprecated. 

sort

public void sort(int[] target)
Deprecated. 

mergeSort

void mergeSort(int[] a,
               int f,
               int l)
Deprecated. 

merge

void merge(int[] a,
           int f,
           int mid,
           int l)
Deprecated.