|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectproper.gui.core.table.JTableHelper
public class JTableHelper
A helper class for JTable, e.g. calculating the optimal colwidth.
Constructor Summary | |
---|---|
JTableHelper(javax.swing.JTable jtable)
initializes the object |
Method Summary | |
---|---|
int |
calcColumnWidth(int col)
calcs the optimal column width of the given column |
static int |
calcColumnWidth(javax.swing.JTable table,
int col)
Calculates the optimal width for the column of the given table. |
int |
calcHeaderWidth(int col)
calcs the optimal header width of the given column |
static int |
calcHeaderWidth(javax.swing.JTable table,
int col)
Calculates the optimal width for the header of the given table. |
javax.swing.JTable |
getJTable()
returns the JTable |
void |
scrollToVisible(int row,
int col)
Assumes table is contained in a JScrollPane. |
static void |
scrollToVisible(javax.swing.JTable table,
int row,
int col)
Assumes table is contained in a JScrollPane. |
void |
setOptimalColumnWidth()
sets the optimal column width for all columns |
void |
setOptimalColumnWidth(int col)
sets the optimal column width for the given column |
static void |
setOptimalColumnWidth(javax.swing.JTable jtable)
sets the optimal column width for alls column if the given table |
static void |
setOptimalColumnWidth(javax.swing.JTable jtable,
int col)
sets the optimal column width for the given column |
void |
setOptimalHeaderWidth()
sets the optimal header width for all columns |
void |
setOptimalHeaderWidth(int col)
sets the optimal header width for the given column |
static void |
setOptimalHeaderWidth(javax.swing.JTable jtable)
sets the optimal header width for alls column if the given table |
static void |
setOptimalHeaderWidth(javax.swing.JTable jtable,
int col)
sets the optimal header width for the given column |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JTableHelper(javax.swing.JTable jtable)
Method Detail |
---|
public javax.swing.JTable getJTable()
public int calcColumnWidth(int col)
public static int calcColumnWidth(javax.swing.JTable table, int col)
table
- the table to calculate the column widthcol
- the column to calculate the widths
public int calcHeaderWidth(int col)
public static int calcHeaderWidth(javax.swing.JTable table, int col)
table
- the table to calculate the column widthcol
- the column to calculate the widths
public void setOptimalColumnWidth(int col)
public static void setOptimalColumnWidth(javax.swing.JTable jtable, int col)
public void setOptimalColumnWidth()
public static void setOptimalColumnWidth(javax.swing.JTable jtable)
public void setOptimalHeaderWidth(int col)
public static void setOptimalHeaderWidth(javax.swing.JTable jtable, int col)
public void setOptimalHeaderWidth()
public static void setOptimalHeaderWidth(javax.swing.JTable jtable)
public void scrollToVisible(int row, int col)
public static void scrollToVisible(javax.swing.JTable table, int row, int col)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |