org.jdesktop.swingx.table
Class TableRowHeightController

java.lang.Object
  extended by org.jdesktop.swingx.table.TableRowHeightController

public class TableRowHeightController
extends Object

A controller to adjust JTable rowHeight based on sizing requirements of its renderers.

Author:
Jeanette Winzenburg, Berlin

Constructor Summary
TableRowHeightController()
          Instantiates an unbound TableRowHeightController.
TableRowHeightController(JTable table)
          Instantiates a TableRowHeightController and installs itself to the given table.
 
Method Summary
protected  TableModelListener createTableModelListener()
           
protected  PropertyChangeListener createTablePropertyListener()
           
protected  PropertyChangeListener getPropertyChangeListener()
           
protected  TableModelListener getTableModelListener()
           
 void install(JTable table)
          Installs this controller on the given table.
 void release()
          Release this controller from its table.
protected  void updateModel(TableModel oldValue)
           
protected  void updatePreferredRowHeights()
          Sets the row heights of all rows.
protected  void updatePreferredRowHeights(int firstRow, int lastRow)
          Sets the row heights of the rows in the range of first- to lastRow, inclusive.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableRowHeightController

public TableRowHeightController()
Instantiates an unbound TableRowHeightController.


TableRowHeightController

public TableRowHeightController(JTable table)
Instantiates a TableRowHeightController and installs itself to the given table. The row heights of all visible rows are automatically adjusted on model changes.

Parameters:
table - the table to control.
Method Detail

install

public void install(JTable table)
Installs this controller on the given table. Releases control from previously installed table, if any.

Parameters:
table - the table to install upon.

release

public void release()
Release this controller from its table. Does nothing if no table installed.


updatePreferredRowHeights

protected void updatePreferredRowHeights(int firstRow,
                                         int lastRow)
Sets the row heights of the rows in the range of first- to lastRow, inclusive. The coordinates are model indices.

Parameters:
firstRow - the first row in model coordinates
lastRow - the last row in model coordinates

updatePreferredRowHeights

protected void updatePreferredRowHeights()
Sets the row heights of all rows.


updateModel

protected void updateModel(TableModel oldValue)
Parameters:
oldValue -

createTablePropertyListener

protected PropertyChangeListener createTablePropertyListener()
Returns:

createTableModelListener

protected TableModelListener createTableModelListener()

getTableModelListener

protected TableModelListener getTableModelListener()
Returns:

getPropertyChangeListener

protected PropertyChangeListener getPropertyChangeListener()
Returns:


Copyright © 2012. All Rights Reserved.