|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sciapp.table.TableReorder
public class TableReorder
TableReorder acts on a JTable in order to ensure that the same rows are selected after the ReorderEvent is generated.
Field Summary | |
---|---|
protected int[] |
changedIndices
an int array showing how the rows have changed place |
protected boolean |
scrollToSelection
boolean flag indicating whether the table should scroll to the last selection after the cell selection has been restored. |
protected int[] |
selectedColumns
the selected columns of the table |
protected int[] |
selectedRows
the selected rows of the table |
protected JTable |
table
the table |
Constructor Summary | |
---|---|
TableReorder()
Constructs a TableReorder object with a null JTable. |
|
TableReorder(JTable table)
Constructs a TableReorder object acting on table . |
Method Summary | |
---|---|
int |
getNewEditRow()
Determines the displaced row index of the table's editing row, after a model update. |
boolean |
getScrollToSelection()
Determines whether the table should scroll to the last selection after the cell selection has been restored. |
void |
reselectTableRows()
Uses the values stored when the rowsReordered method was called in order to update the table selection. |
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 |
setScrollToSelection(boolean scrollToSelection)
Determines whether the table should scroll to the last selection after the cell selection has been restored. |
void |
setTable(JTable newTable)
Sets the table to newTable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected JTable table
protected int[] selectedRows
protected int[] changedIndices
protected int[] selectedColumns
protected boolean scrollToSelection
Constructor Detail |
---|
public TableReorder()
public TableReorder(JTable table)
table
.
Method Detail |
---|
public int getNewEditRow()
public boolean getScrollToSelection()
public void reselectTableRows()
public void reselectTableRows(int[] selRows, int[] mapIndex)
selRows
- the table's selected rows before an update to the table data was mademapIndex
- an int array showing how the rows have changed placepublic void rowsReordered(ReorderEvent e)
rowsReordered
in interface ReorderListener
e
- the ReorderEvent objectpublic void setScrollToSelection(boolean scrollToSelection)
scrollToSelection
- true if the table should scroll to the last selection, false otherwise.public void setTable(JTable newTable)
newTable
newTable
- the JTable to set
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |