|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.grid.TableColumnAutoResizer
public class TableColumnAutoResizer
Allows table column automatically resize to fit in all the contents in the cells when user mouse double clicks on the
grid line of table header or table depending on the parameter you use to construct this class. To use it, you simply
call
or
new TableColumnAutoResizer(table);
If you use any of the tables provided by JIDE Grids, you can simply call
new TableColumnAutoResizer(table, false);
JideTable.setColumnAutoResizable(boolean)
to make columns auto-resizable. *
Field Summary | |
---|---|
protected boolean |
_onTableHeader
|
protected JTable |
_table
|
protected static String |
KEY
|
Constructor Summary | |
---|---|
TableColumnAutoResizer(JTable table)
Constructor. |
|
TableColumnAutoResizer(JTable table,
boolean onTableHeader)
Constructor. |
Method Summary | |
---|---|
MouseInputListener |
createMouseInputListener()
|
void |
install()
|
void |
propertyChange(PropertyChangeEvent evt)
|
protected void |
resizeColumn(TableColumn resizingColumn)
The action to resize the column. |
void |
uninstall()
Removes the MouseListener registered by install() method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String KEY
protected JTable _table
protected final boolean _onTableHeader
Constructor Detail |
---|
public TableColumnAutoResizer(JTable table)
table
- the table to enable column auto resizepublic TableColumnAutoResizer(JTable table, boolean onTableHeader)
table
- the table to enable column auto resizeonTableHeader
- if the auto resize feature is going to be effective on table header or table cells.Method Detail |
---|
public MouseInputListener createMouseInputListener()
protected void resizeColumn(TableColumn resizingColumn)
resizingColumn
- the column to be resized.public void install()
public void uninstall()
install()
method.
public void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |