Package org.jfree.ui

Class SortButtonRenderer

java.lang.Object
org.jfree.ui.SortButtonRenderer
All Implemented Interfaces:
TableCellRenderer

public class SortButtonRenderer extends Object implements 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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Useful constant indicating ASCENDING (that is, arrow pointing down) sorting in the table.
    static final int
    Useful constant indicating NO sorting.
    static final int
    Useful constant indicating DESCENDING (that is, arrow pointing up) sorting in the table.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new button renderer.
  • Method Summary

    Modifier and Type
    Method
    Description
    getTableCellRendererComponent(JTable table, 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 Details

    • NONE

      public static final int NONE
      Useful constant indicating NO sorting.
      See Also:
    • DOWN

      public static final int DOWN
      Useful constant indicating ASCENDING (that is, arrow pointing down) sorting in the table.
      See Also:
    • UP

      public static final int UP
      Useful constant indicating DESCENDING (that is, arrow pointing up) sorting in the table.
      See Also:
  • Constructor Details

  • Method Details