Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.treetable.db
Class DatabaseTreeTableReorder

java.lang.Object
  extended by com.citra.table.TableReorder
      extended by com.citra.treetable.DefaultTreeTableReorder
          extended by com.citra.treetable.db.DatabaseTreeTableReorder
All Implemented Interfaces:
ReorderListener, EventListener

public class DatabaseTreeTableReorder
extends DefaultTreeTableReorder

DatabaseTreeTableReorder is suitable for expanding and selecting the nodes of a DatabaseTreeTableModel.


Field Summary
protected  boolean selectRows
          true, to scan the table to restore selections, false otherwise.
 
Fields inherited from class com.citra.treetable.DefaultTreeTableReorder
shouldProcess
 
Fields inherited from class com.citra.table.TableReorder
changedIndices, scrollToSelection, selectedColumns, selectedRows, table
 
Constructor Summary
DatabaseTreeTableReorder()
          Creates a DatabaseTreeTableReorder.
DatabaseTreeTableReorder(TreeTable table)
          Creates a DatabaseTreeTableReorder.
 
Method Summary
protected  Set createExpansionSet()
          Returns a new instance of the set that will be used to store the tree's expanded nodes.
 boolean getSelectRows()
          Determines whether or not the reorder will scan the whole tree to select previously selected rows.
 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 setSelectRows(boolean selectRows)
          Determines whether or not the reorder will scan the whole tree to select previously selected rows.
 void setTable(JTable newTable)
          Sets the table to newTable
 
Methods inherited from class com.citra.treetable.DefaultTreeTableReorder
getNewEditRow, reselectTableRows
 
Methods inherited from class com.citra.table.TableReorder
getScrollToSelection, restoreRowHeights, setScrollToSelection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

selectRows

protected boolean selectRows
true, to scan the table to restore selections, false otherwise.

Constructor Detail

DatabaseTreeTableReorder

public DatabaseTreeTableReorder()
Creates a DatabaseTreeTableReorder.


DatabaseTreeTableReorder

public DatabaseTreeTableReorder(TreeTable table)
Creates a DatabaseTreeTableReorder.

Method Detail

createExpansionSet

protected Set createExpansionSet()
Returns a new instance of the set that will be used to store the tree's expanded nodes.

Overrides:
createExpansionSet in class DefaultTreeTableReorder
Returns:
the expansion set.

getSelectRows

public boolean getSelectRows()
Determines whether or not the reorder will scan the whole tree to select previously selected rows.

Returns:
true, to scan the table to restore selections, false otherwise.

reselectTableRows

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

Overrides:
reselectTableRows in class DefaultTreeTableReorder
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 DefaultTreeTableReorder
Parameters:
e - the ReorderEvent object

setSelectRows

public void setSelectRows(boolean selectRows)
Determines whether or not the reorder will scan the whole tree to select previously selected rows.

Parameters:
selectRows - true, to scan the table to restore selections, false otherwise.

setTable

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

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

Copyright © 2011 Citra Technologies. All Rights Reserved.