Class SortButtonRenderer
java.lang.Object
org.jfree.ui.SortButtonRenderer
- All Implemented Interfaces:
TableCellRenderer
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
FieldsModifier and TypeFieldDescriptionstatic final intUseful constant indicating ASCENDING (that is, arrow pointing down) sorting in the table.static final intUseful constant indicating NO sorting.static final intUseful constant indicating DESCENDING (that is, arrow pointing up) sorting in the table. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) Returns the renderer component.voidsetPressedColumn(int column) Sets the pressed column.
-
Field Details
-
NONE
-
DOWN
Useful constant indicating ASCENDING (that is, arrow pointing down) sorting in the table.- See Also:
-
UP
Useful constant indicating DESCENDING (that is, arrow pointing up) sorting in the table.- See Also:
-
-
Constructor Details
-
SortButtonRenderer
public SortButtonRenderer()Creates a new button renderer.
-
-
Method Details
-
getTableCellRendererComponent
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) Returns the renderer component.- Specified by:
getTableCellRendererComponentin interfaceTableCellRenderer- Parameters:
table- the table.value- the value.isSelected- selected?hasFocus- focussed?row- the row.column- the column.- Returns:
- the renderer.
-
setPressedColumn
-