|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
schmitzm.swing.SelectableJTable
public class SelectableJTable
Extends the JTable
by redefining the changeSelection(int, int, boolean, boolean)
method. If a SelectionTableModel
is used, a click on the selection column must not
clear an existing selection.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JTable |
---|
JTable.AccessibleJTable, JTable.DropLocation, JTable.PrintMode |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
SelectableJTable()
Creates an empty table. |
|
SelectableJTable(int numRows,
int numColumns)
Creates an empty table. |
|
SelectableJTable(Object[][] rowData,
Object[] columnNames)
Creates a new table. |
|
SelectableJTable(TableModel dm)
Creates a new table. |
|
SelectableJTable(TableModel dm,
TableColumnModel cm)
Creates a new table. |
|
SelectableJTable(TableModel dm,
TableColumnModel cm,
ListSelectionModel sm)
Creates a new table. |
|
SelectableJTable(Vector rowData,
Vector columnNames)
Creates a new table. |
Method Summary | |
---|---|
void |
changeSelection(int row,
int col,
boolean toggle,
boolean extend)
If a SelectionTableModel is used, a click on the selection column must not
clear an existing selection. |
protected void |
initTable()
Called by every constructor to initialize the extended functionalities. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SelectableJTable()
public SelectableJTable(int numRows, int numColumns)
public SelectableJTable(Object[][] rowData, Object[] columnNames)
public SelectableJTable(TableModel dm, TableColumnModel cm, ListSelectionModel sm)
public SelectableJTable(TableModel dm, TableColumnModel cm)
public SelectableJTable(TableModel dm)
public SelectableJTable(Vector rowData, Vector columnNames)
Method Detail |
---|
protected void initTable()
public void changeSelection(int row, int col, boolean toggle, boolean extend)
SelectionTableModel
is used, a click on the selection column must not
clear an existing selection. So if ...
JTable.getModel()
is an SelectionTableModel
toggle
flag is false
extend
flag is false
convertColumnIndexToModel(col)
is 0
toggle
to true
(before calling the super-method)
to simulate that the Strg/Ctrl-key is pressed.
changeSelection
in class JTable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |