|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.table.JTableHeader
com.jidesoft.grid.DraggingTableHeader
com.jidesoft.grid.CellStyleTableHeader
com.jidesoft.grid.SortableTableHeader
public class SortableTableHeader
A special table header for SortableTable which draws arrows and index to indicate the sorting order.
SortableTableHeader introduced a very useful feature called TableHeaderCellDecorator which
provides a way for users to paint over the margin of any table header's cells. SortableTableHeader uses
it to paint the sort arrow and sort order index.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.table.JTableHeader |
|---|
JTableHeader.AccessibleJTableHeader |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static String |
PROPERTY_SHOW_SORT_ARROW
|
| Fields inherited from class com.jidesoft.grid.CellStyleTableHeader |
|---|
_cellStyleList |
| Fields inherited from class com.jidesoft.grid.DraggingTableHeader |
|---|
PROPERTY_DRAGGED_COLUMN, PROPERTY_DRAGGED_DISTANCE, PROPERTY_RESIZING_COLUMN |
| Fields inherited from class javax.swing.table.JTableHeader |
|---|
columnModel, draggedColumn, draggedDistance, reorderingAllowed, resizingAllowed, resizingColumn, table, updateTableInRealTime |
| 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.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 | |
|---|---|
SortableTableHeader(JTable table)
The constructor which takes JTable. |
|
SortableTableHeader(TableColumnModel cm)
|
|
| Method Summary | |
|---|---|
protected TableHeaderCellDecorator |
createSortableTableHeaderCellDecorator()
Creates a TableHeaderCellDecorator instance to paint the sort icon and index. |
protected Icon |
createSortIcon(SortableTable table,
boolean ascending)
Create the sort arrow icon. |
String |
getActualUIClassID()
Returns a string that specifies the name of the L&F class that renders this component. |
TableHeaderCellDecorator |
getSortableTableHeaderCellDecorator()
Gets the TableHeaderCellDecorator instance to paint the sort icon and index. |
String |
getUIDelegateClassID()
Returns a string that specifies the name of the UIDelegate class that paints this component. |
boolean |
isShowSortArrow()
Checks if the sort arrow is visible on the table header. |
protected void |
paintComponent(Graphics g)
Overrides to paint the sort arrows on table header. |
protected void |
paintSortArrow(JComponent c,
SortableTable table,
Graphics g,
Rectangle rect,
int index,
boolean ascending)
Deprecated. replaced by SortableTableHeaderCellDecorator |
protected void |
paintSortArrows(Graphics g)
Deprecated. replaced by SortableTableHeaderCellDecorator |
void |
setShowSortArrow(boolean showSortArrow)
Sets the flag if the sort arrow is shown on the header. |
| Methods inherited from class com.jidesoft.grid.DraggingTableHeader |
|---|
getPreferredSize, getToolTipText, setDraggedColumn, setDraggedDistance, setResizingColumn |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PROPERTY_SHOW_SORT_ARROW
| Constructor Detail |
|---|
public SortableTableHeader(TableColumnModel cm)
public SortableTableHeader(JTable table)
table - the JTable| Method Detail |
|---|
public String getActualUIClassID()
getActualUIClassID in class CellStyleTableHeaderpublic String getUIDelegateClassID()
getUIDelegateClassID in class CellStyleTableHeaderprotected void paintComponent(Graphics g)
paintComponent in class DraggingTableHeaderg - the Graphics object@Deprecated protected void paintSortArrows(Graphics g)
SortableTableHeaderCellDecorator
g - the Graphics object
@Deprecated
protected void paintSortArrow(JComponent c,
SortableTable table,
Graphics g,
Rectangle rect,
int index,
boolean ascending)
SortableTableHeaderCellDecorator
c - table headertable - the sortable table.g - Graphicsrect - the bounds of the table column headerindex - the sorting indexascending - the sorting direction.
protected Icon createSortIcon(SortableTable table,
boolean ascending)
table - the sortable table.ascending - true or false. True is ascending.
public boolean isShowSortArrow()
AutoFilterTableHeader since 3.1.0.
public void setShowSortArrow(boolean showSortArrow)
AutoFilterTableHeader since 3.1.0.
showSortArrow - true to show the sort arrow. False to not show it.public TableHeaderCellDecorator getSortableTableHeaderCellDecorator()
protected TableHeaderCellDecorator createSortableTableHeaderCellDecorator()
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||