Package com.jsql.view.swing.table
Class FixedColumnTable
java.lang.Object
com.jsql.view.swing.table.FixedColumnTable
- All Implemented Interfaces:
PropertyChangeListener
,EventListener
,ChangeListener
Prevent the specified number of columns from scrolling horizontally in
the scroll pane. The table must already exist in the scroll pane.
The functionality is accomplished by creating a second JTable (fixed)
that will share the TableModel and SelectionModel of the main table.
This table will be used as the row header of the scroll pane.
The fixed table created can be accessed by using the getFixedTable()
method. will be returned from this method. It will allow you to:
You can change the model of the main table and the change will be
reflected in the fixed model. However, you cannot change the structure
of the model.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
fixColumnSize
(int fixedColumns, JScrollPane scrollPane) Specify the number of columns to be fixed and the scroll pane containing the table.void
Implement the PropertyChangeListenervoid
Implement the ChangeListener
-
Constructor Details
-
FixedColumnTable
public FixedColumnTable()
-
-
Method Details
-
fixColumnSize
Specify the number of columns to be fixed and the scroll pane containing the table. -
stateChanged
Implement the ChangeListener- Specified by:
stateChanged
in interfaceChangeListener
-
propertyChange
Implement the PropertyChangeListener- Specified by:
propertyChange
in interfacePropertyChangeListener
-