|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nih.nlm.swing.SortButtonRenderer
public class SortButtonRenderer
TableCellRenderer for use as s column header in a SortableJTable.
Displays a BevelArrowIcon that indicates if sorting should
occur in an ascending or descending order.
| Field Summary | |
|---|---|
static int |
DOWN
Down sort |
static int |
NONE
Neither up nor down |
static int |
UP
Up sort |
| Constructor Summary | |
|---|---|
SortButtonRenderer()
Instantiates a SortButtonRenderer
Sets the current icon to BlankIcon until
the user chooses to sort a column. |
|
| Method Summary | |
|---|---|
Component |
getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
Returns a JButton that holds the text and BevelArrowIcon. |
void |
setState(int col,
boolean asc)
Sets the state of a column for either ascending or descending sorting. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NONE
public static final int DOWN
public static final int UP
| Constructor Detail |
|---|
public SortButtonRenderer()
SortButtonRenderer
Sets the current icon to BlankIcon until
the user chooses to sort a column.
| Method Detail |
|---|
public Component getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
JButton that holds the text and BevelArrowIcon.
getTableCellRendererComponent in interface TableCellRenderertable - the JTablevalue - the valueisSelected - indicates whether or not it is selectedhasFocus - indicates whether or not it has focusrow - row indexcolumn - column index
JButton that holds the text and BevelArrowIcon
public void setState(int col,
boolean asc)
col - a column indexasc - true if ascending, false if descending
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||