|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JTable | +--gate.swing.XJTable
A "smarter" JTable. Feaures include:
Nested Class Summary | |
(package private) class |
XJTable.CustomHeaderRenderer
|
(package private) class |
XJTable.TableSorter
A sorter for TableModels. |
Field Summary | |
(package private) boolean |
ascending
|
protected Icon |
downIcon
|
(package private) MouseListener |
headerMouseListener
|
protected TableCellRenderer |
headerRenderer
|
protected boolean |
sortable
|
(package private) int |
sortedColumn
|
protected XJTable.TableSorter |
sorter
|
protected Icon |
upIcon
|
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Container |
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
XJTable()
Default constructor |
|
XJTable(TableModel model)
Constructor from model |
Method Summary | |
protected void |
adjustSizes()
Resizes all the cells so they accommodate the components at their preferred sizes. |
protected void |
configureEnclosingScrollPane()
|
TableModel |
getActualModel()
Returns the actual table model. |
int |
getTableRow(int modelRow)
Get the row in the table for a row in the model. |
protected void |
init()
|
void |
setAscending(boolean ascending)
Should the sorting be ascending or descending |
void |
setAutoResizeMode(int resizeMode)
|
void |
setModel(TableModel model)
|
void |
setSortable(boolean isSortable)
Should the soring facility be enabled |
void |
setSortedColumn(int column)
Sets the column to be used as key for sorting. |
void |
tableChanged(TableModelEvent e)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected XJTable.TableSorter sorter
protected Icon upIcon
protected Icon downIcon
int sortedColumn
boolean ascending
protected TableCellRenderer headerRenderer
protected boolean sortable
MouseListener headerMouseListener
Constructor Detail |
public XJTable()
public XJTable(TableModel model)
Method Detail |
public void setModel(TableModel model)
setModel
in class JTable
public TableModel getActualModel()
public int getTableRow(int modelRow)
public void tableChanged(TableModelEvent e)
tableChanged
in interface TableModelListener
tableChanged
in class JTable
public void setSortable(boolean isSortable)
protected void init()
protected void configureEnclosingScrollPane()
configureEnclosingScrollPane
in class JTable
protected void adjustSizes()
public void setSortedColumn(int column)
public void setAscending(boolean ascending)
public void setAutoResizeMode(int resizeMode)
setAutoResizeMode
in class JTable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |