Class ObjectIcon

java.lang.Object
  extended byObjectIcon
All Implemented Interfaces:
javax.swing.Icon

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

This class represents an icon for an object in sequence diagram.

Author:
Matilda Östling

Constructor Summary
ObjectIcon()
           
 
Method Summary
 int getIconHeight()
          This method returns the height for the icon.
 int getIconWidth()
          This method returns the width for the icon.
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
          This method is called to draw the icon on a given point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectIcon

public ObjectIcon()
Method Detail

getIconHeight

public int getIconHeight()
This method returns the height for the icon.

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

getIconWidth

public int getIconWidth()
This method returns the width for the icon.

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

paintIcon

public void paintIcon(java.awt.Component c,
                      java.awt.Graphics g,
                      int x,
                      int y)
This method is called to draw the icon on a given point.

Specified by:
paintIcon in interface javax.swing.Icon
Parameters:
c - The component where the icon should be drawn.
g - The graphics used to draw the icon.
x - The x-value where the icon should be drawn.
y - The y-value where the icon should be drawn.