Copyright © 2005 Scientific Applications. All Rights Reserved.

com.sciapp.treetable
Class TreeTableReorder

java.lang.Object
  extended by com.sciapp.table.TableReorder
      extended by com.sciapp.treetable.TreeTableReorder
All Implemented Interfaces:
ReorderListener, EventListener

public class TreeTableReorder
extends TableReorder

TreeTableReorder acts on a TreeTable object in order to ensure that the same rows are selected after a ReorderEvent is generated.


Field Summary
 
Fields inherited from class com.sciapp.table.TableReorder
changedIndices, scrollToSelection, selectedColumns, selectedRows, table
 
Constructor Summary
TreeTableReorder()
          Constructs a TreeTableReorder with a null JTable.
TreeTableReorder(TreeTable table)
          Constructs a TreeTableReorder.
 
Method Summary
 void reselectTableRows(int[] selRows, int[] mapIndex)
          Updates the table selection.
 void rowsReordered(ReorderEvent e)
          Called whenever the rows of a JTable have been restructured.
 void setTable(JTable newTable)
          Sets the table to newTable
 
Methods inherited from class com.sciapp.table.TableReorder
getNewEditRow, getScrollToSelection, reselectTableRows, setScrollToSelection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeTableReorder

public TreeTableReorder()
Constructs a TreeTableReorder with a null JTable.


TreeTableReorder

public TreeTableReorder(TreeTable table)
Constructs a TreeTableReorder.

Method Detail

reselectTableRows

public void reselectTableRows(int[] selRows,
                              int[] mapIndex)
Updates the table selection.

Overrides:
reselectTableRows in class TableReorder
Parameters:
selRows - the table's selected rows before an update to the table data was made
mapIndex - an int array showing how the rows have changed place

rowsReordered

public void rowsReordered(ReorderEvent e)
Called whenever the rows of a JTable have been restructured.

Specified by:
rowsReordered in interface ReorderListener
Overrides:
rowsReordered in class TableReorder
Parameters:
e - the ReorderEvent object

setTable

public void setTable(JTable newTable)
Sets the table to newTable

Overrides:
setTable in class TableReorder
Parameters:
newTable - the JTable to set

Copyright © 2005 Scientific Applications. All Rights Reserved.