| java.lang.Object org.jfree.ui.SortButtonRenderer
SortButtonRenderer | public class SortButtonRenderer implements TableCellRenderer(Code) | | 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.
author: David Gilbert |
Field Summary | |
final public static int | DOWN Useful constant indicating ASCENDING (that is, arrow pointing down) sorting in the table. | final public static int | NONE Useful constant indicating NO sorting. | final public static int | UP Useful constant indicating DESCENDING (that is, arrow pointing up) sorting in the table. |
Method Summary | |
public Component | getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) Returns the renderer component.
Parameters: table - the table. Parameters: value - the value. Parameters: isSelected - selected? Parameters: hasFocus - focussed? Parameters: row - the row. Parameters: column - the column. | public void | setPressedColumn(int column) Sets the pressed column. |
DOWN | final public static int DOWN(Code) | | Useful constant indicating ASCENDING (that is, arrow pointing down) sorting in the table.
|
NONE | final public static int NONE(Code) | | Useful constant indicating NO sorting.
|
UP | final public static int UP(Code) | | Useful constant indicating DESCENDING (that is, arrow pointing up) sorting in the table.
|
SortButtonRenderer | public SortButtonRenderer()(Code) | | Creates a new button renderer.
|
getTableCellRendererComponent | public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)(Code) | | Returns the renderer component.
Parameters: table - the table. Parameters: value - the value. Parameters: isSelected - selected? Parameters: hasFocus - focussed? Parameters: row - the row. Parameters: column - the column. the renderer. |
setPressedColumn | public void setPressedColumn(int column)(Code) | | Sets the pressed column.
Parameters: column - the column. |
|
|