|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.jrefinery.ui.SortButtonRenderer
public class SortButtonRenderer
A table cell renderer for table headings - uses one of three JButton instances to indicate the sort order for the table column.
This class (and also BevelArrowIcon) is adapted from original code by Nobuo Tamemasa (version 1.0, 26-Feb-1999) posted on www.codeguru.com.
| Field Summary | |
|---|---|
static int |
DOWN
Useful constant indicating ASCENDING (that is, arrow pointing down) sorting in the table. |
static int |
NONE
Useful constant indicating NO sorting. |
protected int |
pressedColumn
The current pressed column (-1 for no column). |
static int |
UP
Useful constant indicating DESCENDING (that is, arrow pointing up) sorting in the table. |
| Constructor Summary | |
|---|---|
SortButtonRenderer()
Constructs a SortButtonRenderer. |
|
| Method Summary | |
|---|---|
java.awt.Component |
getTableCellRendererComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
Returns the renderer component. |
void |
setPressedColumn(int column)
Sets the pressed column. |
| 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
protected int pressedColumn
| Constructor Detail |
|---|
public SortButtonRenderer()
| Method Detail |
|---|
public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
getTableCellRendererComponent in interface javax.swing.table.TableCellRendererpublic void setPressedColumn(int column)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||