org.jscience.swing.spinner.icons
Class RectanglesIcon

java.lang.Object
  extended by org.jscience.swing.spinner.icons.RectanglesIcon
All Implemented Interfaces:
javax.swing.Icon

public class RectanglesIcon
extends java.lang.Object
implements javax.swing.Icon

An Icon showing two vertical rectangles. For example you can use it as the Icon for a pause button of a timer.

See Also:
ArrowIcon, SquareIcon

Constructor Summary
RectanglesIcon()
          Creates a new SquareIcon with the default size of 8 pixels.
RectanglesIcon(int iconSize)
          Creates a new RectanglesIcon with the specified size.
 
Method Summary
 int getIconHeight()
          DOCUMENT ME!
 int getIconWidth()
          DOCUMENT ME!
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
          DOCUMENT ME!
 void paintTriangle(java.awt.Graphics g, int x, int y, int size, boolean isEnabled, java.awt.Color foreground)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RectanglesIcon

public RectanglesIcon()
Creates a new SquareIcon with the default size of 8 pixels.


RectanglesIcon

public RectanglesIcon(int iconSize)
Creates a new RectanglesIcon with the specified size. Note that the size of the Icon is its width AND height, the two rectangles displayed by this Icon lie within that square but have not that size.

Parameters:
iconSize - DOCUMENT ME!
Method Detail

getIconHeight

public int getIconHeight()
DOCUMENT ME!

Specified by:
getIconHeight in interface javax.swing.Icon
Returns:
DOCUMENT ME!

getIconWidth

public int getIconWidth()
DOCUMENT ME!

Specified by:
getIconWidth in interface javax.swing.Icon
Returns:
DOCUMENT ME!

paintIcon

public void paintIcon(java.awt.Component c,
                      java.awt.Graphics g,
                      int x,
                      int y)
DOCUMENT ME!

Specified by:
paintIcon in interface javax.swing.Icon
Parameters:
c - DOCUMENT ME!
g - DOCUMENT ME!
x - DOCUMENT ME!
y - DOCUMENT ME!

paintTriangle

public void paintTriangle(java.awt.Graphics g,
                          int x,
                          int y,
                          int size,
                          boolean isEnabled,
                          java.awt.Color foreground)
DOCUMENT ME!

Parameters:
g - DOCUMENT ME!
x - DOCUMENT ME!
y - DOCUMENT ME!
size - DOCUMENT ME!
isEnabled - DOCUMENT ME!
foreground - DOCUMENT ME!