de.uni_paderborn.fujaba.fsa.swing
Class OperationIcon

java.lang.Object
  extended byde.uni_paderborn.fujaba.fsa.swing.OperationIcon
All Implemented Interfaces:
javax.swing.Icon

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

Renders icons for operations such as equal, not equal, etc. This class uses a singleton pattern, see OperationIcon.get().

Version:
$Revision: 1.11 $
Author:
$Author: lowende $

Field Summary
static int EQUAL
          flags for appearance and types
static int LSUBSET
          No comment provided by developer, please add a comment to improve documentation.
static int LSUBSETEQUAL
          No comment provided by developer, please add a comment to improve documentation.
static int NONEQUAL
          No comment provided by developer, please add a comment to improve documentation.
static int RSUBSET
          No comment provided by developer, please add a comment to improve documentation.
static int RSUBSETEQUAL
          No comment provided by developer, please add a comment to improve documentation.
 
Method Summary
static OperationIcon get(int shape)
          Returns an instance of this class with the given shape.
 int getIconHeight()
          Returns the height of this icon
 int getIconWidth()
          Returns the width of this icon
 int getShape()
          Returns the shape of this icon
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
          Paints this icon at the given position
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EQUAL

public static final transient int EQUAL
flags for appearance and types

See Also:
Constant Field Values

NONEQUAL

public static final transient int NONEQUAL
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

LSUBSET

public static final transient int LSUBSET
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

RSUBSET

public static final transient int RSUBSET
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

LSUBSETEQUAL

public static final transient int LSUBSETEQUAL
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

RSUBSETEQUAL

public static final transient int RSUBSETEQUAL
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values
Method Detail

get

public static OperationIcon get(int shape)
Returns an instance of this class with the given shape. The OperationIcon returned is a singleton and may thus be shared for multiple tasks. The OperationIcon returned is immutable.

Parameters:
shape - shape to use for this icon.
Returns:
an instance of this class with the given shape.

getShape

public int getShape()
Returns the shape of this icon

Returns:
the shape of this icon

getIconWidth

public int getIconWidth()
Returns the width of this icon

Specified by:
getIconWidth in interface javax.swing.Icon
Returns:
the width of this icon

getIconHeight

public int getIconHeight()
Returns the height of this icon

Specified by:
getIconHeight in interface javax.swing.Icon
Returns:
the height of this icon

paintIcon

public void paintIcon(java.awt.Component c,
                      java.awt.Graphics g,
                      int x,
                      int y)
Paints this icon at the given position

Specified by:
paintIcon in interface javax.swing.Icon
Parameters:
c - No description provided
g - No description provided
x - No description provided
y - No description provided