Package org.jfree.ui

Class BevelArrowIcon

java.lang.Object
org.jfree.ui.BevelArrowIcon
All Implemented Interfaces:
Icon

public class BevelArrowIcon extends Object implements Icon
An arrow icon that can point up or down (usually used to indicate the sort direction in a table).

This class (and also SortButtonRenderer) is based on original code by Nobuo Tamemasa (version 1.0, 26-Feb-1999) posted on www.codeguru.com.

Author:
Nobuo Tamemasa
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Constant indicating that the arrow is pointing down.
    static final int
    Constant indicating that the arrow is pointing up.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BevelArrowIcon(int direction, boolean isRaisedView, boolean isPressedView)
    Standard constructor - builds an icon with the specified attributes.
    BevelArrowIcon(Color edge1, Color edge2, Color fill, int size, int direction)
    Standard constructor - builds an icon with the specified attributes.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the height of the icon.
    int
    Returns the width of the icon.
    void
    paintIcon(Component c, Graphics g, int x, int y)
    Paints the icon at the specified position.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • BevelArrowIcon

      public BevelArrowIcon(int direction, boolean isRaisedView, boolean isPressedView)
      Standard constructor - builds an icon with the specified attributes.
      Parameters:
      direction - .
      isRaisedView - .
      isPressedView - .
    • BevelArrowIcon

      public BevelArrowIcon(Color edge1, Color edge2, Color fill, int size, int direction)
      Standard constructor - builds an icon with the specified attributes.
      Parameters:
      edge1 - the color of edge1.
      edge2 - the color of edge2.
      fill - the fill color.
      size - the size of the arrow icon.
      direction - the direction that the arrow points.
  • Method Details

    • paintIcon

      public void paintIcon(Component c, Graphics g, int x, int y)
      Paints the icon at the specified position. Supports the Icon interface.
      Specified by:
      paintIcon in interface Icon
      Parameters:
      c - .
      g - .
      x - .
      y - .
    • getIconWidth

      public int getIconWidth()
      Returns the width of the icon. Supports the Icon interface.
      Specified by:
      getIconWidth in interface Icon
      Returns:
      the icon width.
    • getIconHeight

      public int getIconHeight()
      Returns the height of the icon. Supports the Icon interface.
      Specified by:
      getIconHeight in interface Icon
      Returns:
      the icon height.