Constructor and Description |
---|
TableUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
autoResizeTable(JTable table,
boolean includeColumnHeaderWidth)
Resizes the given table so that all of its columns have their preferred
width.
|
static int |
autoResizeTable(JTable table,
boolean includeColumnHeaderWidth,
int columnPadding)
Resizes the given table so that all of its columns have their preferred
width.
|
static void |
ensureRowIsVisible(JTable table,
int row)
Scrolls the viewport to make the specified row vertically completely
visible.
|
static void |
repaintAfterValueChanged(JComponent comp,
TreeTable table,
TreeSelectionEvent e)
Repaints the given component after a value changed event from the tree
table selection model has arrived.
|
public static int autoResizeTable(JTable table, boolean includeColumnHeaderWidth)
table
- the table to resizeincludeColumnHeaderWidth
- a flag that signals whether the width of the column header
shall be considered as wellpublic static int autoResizeTable(JTable table, boolean includeColumnHeaderWidth, int columnPadding)
table
- the table to resizeincludeColumnHeaderWidth
- a flag that signals whether the width of the column header
shall be considered as wellcolumnPadding
- a padding added to the preferred column widthpublic static void repaintAfterValueChanged(JComponent comp, TreeTable table, TreeSelectionEvent e)
comp
- the component that needs repaintingtable
- the table where the selection event occurede
- the tree selection event that triggered the repaintpublic static void ensureRowIsVisible(JTable table, int row)
JTable
must be displayed
within a JViewport
.table
- The table to show the row for.row
- The row to show.Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.