Class SwingTableRowHeightUpdater
- java.lang.Object
-
- net.sf.jguiraffe.gui.platform.swing.builder.components.table.SwingTableRowHeightUpdater
-
public class SwingTableRowHeightUpdater extends Object
A helper class for setting the correct row heights for a Swing table.
Swing does not automatically adapt the height of a table's rows to the size of the contained components. This is problematic especially if a custom cell renderer is used. This class implements this functionality. It can be called with a table as argument and then updates the heights of all rows so that the column with the greatest height fits in.
- Since:
- 1.3
- Version:
- $Id$
- Author:
- Oliver Heger
-
-
Constructor Summary
Constructors Constructor Description SwingTableRowHeightUpdater()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
updateRowHeights(JTable table)
Updates the heights of all rows in the specified table.void
updateRowHeights(JTable table, int startRow, int endRow)
Updates the heights of all rows of the specified table in the given range.
-
-
-
Method Detail
-
updateRowHeights
public void updateRowHeights(JTable table)
Updates the heights of all rows in the specified table.- Parameters:
table
- the table
-
updateRowHeights
public void updateRowHeights(JTable table, int startRow, int endRow)
Updates the heights of all rows of the specified table in the given range. Note that this obviously has to be done in a separate task in the event queue; otherwise, row height updates do not have any effect.- Parameters:
table
- the tablestartRow
- the index of the first rowendRow
- the index of the last row (including)
-
-