org.acm.seguin.uml
Class ProtectionIcon

java.lang.Object
  extended by org.acm.seguin.uml.UMLIcon
      extended by org.acm.seguin.uml.ProtectionIcon
All Implemented Interfaces:
javax.swing.Icon

public class ProtectionIcon
extends UMLIcon

Icon that draws the protection symbol

Author:
Chris Seguin

Field Summary
 
Fields inherited from class org.acm.seguin.uml.UMLIcon
iconHeight, iconWidth, scale
 
Constructor Summary
ProtectionIcon(int wide, int high)
          Constructor for the ProtectionIcon object
 
Method Summary
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
          Draws the icon
 void setProtection(int value)
          Sets the Protection attribute of the ProtectionIcon object
 
Methods inherited from class org.acm.seguin.uml.UMLIcon
getIconHeight, getIconWidth, setScale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtectionIcon

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

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

setProtection

public void setProtection(int value)
Sets the Protection attribute of the ProtectionIcon object

Parameters:
value - The new Protection value

paintIcon

public 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
Specified by:
paintIcon in class UMLIcon
Parameters:
c - The component on which we are drawing
g - The graphics object
x - the x location
y - the y location