Groovy Documentation

com.wordpress.tipsforjava.swing.table
[Java] Class FixedColumnTable

java.lang.Object
  com.wordpress.tipsforjava.swing.table.FixedColumnTable
All Implemented Interfaces:
ChangeListener, PropertyChangeListener

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.

Authors:
Rob Camick
Darryl Burke


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

fixed

private JTable fixed


main

private JTable main


scrollPane

private JScrollPane scrollPane


 
Constructor Detail

FixedColumnTable

public FixedColumnTable(int fixedColumns, JScrollPane scrollPane)


 
Method Detail

getFixedTable

public JTable getFixedTable()


propertyChange

public void propertyChange(PropertyChangeEvent e)


stateChanged

public void stateChanged(ChangeEvent e)


 

Groovy Documentation