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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Logger
private JTable
private TableModelListener
private 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 TableModelListener
protected PropertyChangeListener
protected PropertyChangeListener
protected TableModelListener
void
Installs this controller on the given table.private void
void
release()
Release this controller from its table.private void
protected void
updateModel
(TableModel oldValue) protected void
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.
-
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:
-