public final class ColumnResizer extends Object
From Swing Hacks by Joshua Marinacci and Chris Adamson.
2005 Oreilly & Associates Inc. ISBN: 0-596-00907-0
Module: swing-util-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>swing-util-api</artifactId> </dependency>
Modifier and Type | Method and Description |
---|---|
static void |
adjustColumnPreferredWidth(JTable table,
int col)
Adjust one table column to its preferred width.
|
static void |
adjustColumnPreferredWidth(JTable table,
int col,
boolean checkAllRows)
Adjust one table column to its preferred width.
|
static void |
adjustColumnPreferredWidths(JTable table)
Adjust the columns in the table to their preferred widths.
|
static void |
adjustColumnPreferredWidths(JTable table,
boolean checkAllRows)
Adjust the columns in the table to their preferred widths.
|
public static void adjustColumnPreferredWidths(JTable table)
table
- The table whose columns should be adjusted.public static void adjustColumnPreferredWidths(JTable table, boolean checkAllRows)
table
- The table whose columns should be adjusted.checkAllRows
- If false, only the preferred width of the column headers are considered.public static void adjustColumnPreferredWidth(JTable table, int col)
table
- The table whose columns should be adjusted.col
- The column index.public static void adjustColumnPreferredWidth(JTable table, int col, boolean checkAllRows)
table
- The table whose columns should be adjusted.col
- The column index.checkAllRows
- If false, only the preferred width of the column header is considered.Copyright 2011-2015 Cytoscape Consortium. All rights reserved.