org.acm.seguin.uml
Class ProtectionIcon
java.lang.Object
org.acm.seguin.uml.UMLIcon
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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProtectionIcon
public ProtectionIcon(int wide,
int high)
- Constructor for the ProtectionIcon object
- Parameters:
wide
- the size of the iconhigh
- the size of the icon
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 drawingg
- The graphics objectx
- the x locationy
- the y location