|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.wordpress.tipsforjava.swing.table.FixedColumnTable
public class FixedColumnTable extends Object
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.
| Field Summary | |
|---|---|
private JTable |
fixed
|
private JTable |
main
|
private JScrollPane |
scrollPane
|
| Constructor Summary | |
FixedColumnTable(int fixedColumns, JScrollPane scrollPane)
|
|
| Method Summary | |
|---|---|
JTable
|
getFixedTable()
|
void
|
propertyChange(PropertyChangeEvent e)
|
void
|
stateChanged(ChangeEvent e)
|
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Field Detail |
|---|
private JTable fixed
private JTable main
private JScrollPane scrollPane
| Constructor Detail |
|---|
public FixedColumnTable(int fixedColumns, JScrollPane scrollPane)
| Method Detail |
|---|
public JTable getFixedTable()
public void propertyChange(PropertyChangeEvent e)
public void stateChanged(ChangeEvent e)
Groovy Documentation