Class TableRowHeightController
java.lang.Object
org.jdesktop.swingx.table.TableRowHeightController
A controller to adjust JTable rowHeight based on sizing requirements of its renderers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Loggerprivate JTableprivate TableModelListenerprivate PropertyChangeListener -
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.private voidvoidrelease()Release this controller from its table.private voidprotected 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.
-
Field Details
-
table
-
tableModelListener
-
tablePropertyListener
-
LOG
-
-
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
-
uninstallListeners
private void uninstallListeners() -
installListeners
private void installListeners() -
getTableModelListener
- Returns:
-
getPropertyChangeListener
- Returns:
-