Package org.jdesktop.swingx.table
Class TableRowHeightController
java.lang.Object
org.jdesktop.swingx.table.TableRowHeightController
A controller to adjust JTable rowHeight based on sizing requirements of its renderers.
- Author:
- Jeanette Winzenburg, Berlin
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates an unbound TableRowHeightController.TableRowHeightController(JTable table) Instantiates a TableRowHeightController and installs itself to the given table. -
Method Summary
Modifier and TypeMethodDescriptionprotected TableModelListenerprotected PropertyChangeListenerprotected PropertyChangeListenerprotected TableModelListenervoidInstalls this controller on the given table.voidrelease()Release this controller from its table.protected voidupdateModel(TableModel oldValue) protected voidSets the row heights of all rows.protected voidupdatePreferredRowHeights(int firstRow, int lastRow) Sets the row heights of the rows in the range of first- to lastRow, inclusive.
-
Constructor Details
-
TableRowHeightController
public TableRowHeightController()Instantiates an unbound TableRowHeightController. -
TableRowHeightController
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 Details
-
install
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 coordinateslastRow- the last row in model coordinates
-
updatePreferredRowHeights
protected void updatePreferredRowHeights()Sets the row heights of all rows. -
updateModel
- Parameters:
oldValue-
-
createTablePropertyListener
- Returns:
-
createTableModelListener
-
getTableModelListener
- Returns:
-
getPropertyChangeListener
- Returns:
-