com.mindfusion.diagramming
Class DrawItemEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.mindfusion.diagramming.DrawItemEvent
All Implemented Interfaces:
java.io.Serializable

public class DrawItemEvent
extends java.util.EventObject

Contains information passed to the custom-draw events defined in DiagramListener.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DrawItemEvent(java.lang.Object source, java.awt.Graphics2D graphics, DiagramItem item)
          Initializes a new DrawItemEvent instance.
 
Method Summary
 java.awt.Graphics2D getGraphics()
          Gets a reference to the destination graphics object.
 DiagramItem getItem()
          Gets a reference to the item related to the event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DrawItemEvent

public DrawItemEvent(java.lang.Object source,
                     java.awt.Graphics2D graphics,
                     DiagramItem item)
Initializes a new DrawItemEvent instance.

Parameters:
source - The sender of this event.
graphics - The destination graphics.
item - The item that should be drawn.
Method Detail

getGraphics

public java.awt.Graphics2D getGraphics()
Gets a reference to the destination graphics object.

Returns:
A reference to a Graphics2D object through which the custom drawing should be performed.

getItem

public DiagramItem getItem()
Gets a reference to the item related to the event.

Returns:
A reference to an DiagramItem -derived object.