org.acm.seguin.uml
Class UMLIcon

java.lang.Object
  extended by org.acm.seguin.uml.UMLIcon
All Implemented Interfaces:
javax.swing.Icon
Direct Known Subclasses:
ClassIcon, InterfaceIcon, ProtectionIcon

public abstract class UMLIcon
extends java.lang.Object
implements javax.swing.Icon

Base class for drawing icons on a UML diagram

Author:
Chris Seguin

Field Summary
protected  int iconHeight
          Description of the Field
protected  int iconWidth
          Description of the Field
protected  double scale
          Description of the Field
 
Constructor Summary
UMLIcon(int wide, int high)
          Constructor for the UMLIcon object
 
Method Summary
 int getIconHeight()
          Gets the IconHeight attribute of the UMLIcon object
 int getIconWidth()
          Gets the IconWidth attribute of the UMLIcon object
abstract  void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
          Draws the icon
 void setScale(double value)
          Sets the Scale attribute of the UMLIcon object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iconHeight

protected int iconHeight
Description of the Field


iconWidth

protected int iconWidth
Description of the Field


scale

protected double scale
Description of the Field

Constructor Detail

UMLIcon

public UMLIcon(int wide,
               int high)
Constructor for the UMLIcon object

Parameters:
wide - the size of the icon
high - the size of the icon
Method Detail

setScale

public void setScale(double value)
Sets the Scale attribute of the UMLIcon object

Parameters:
value - The new Scale value

getIconWidth

public int getIconWidth()
Gets the IconWidth attribute of the UMLIcon object

Specified by:
getIconWidth in interface javax.swing.Icon
Returns:
The IconWidth value

getIconHeight

public int getIconHeight()
Gets the IconHeight attribute of the UMLIcon object

Specified by:
getIconHeight in interface javax.swing.Icon
Returns:
The IconHeight value

paintIcon

public abstract void paintIcon(java.awt.Component c,
                               java.awt.Graphics g,
                               int x,
                               int y)
Draws the icon

Specified by:
paintIcon in interface javax.swing.Icon
Parameters:
c - The component on which we are drawing
g - The graphics object
x - the x location
y - the y location