templates.diagram
Class Connector.EventBox

java.lang.Object
  extended by java.awt.geom.RectangularShape
      extended by java.awt.geom.Rectangle2D
          extended by java.awt.Rectangle
              extended by templates.diagram.Connector.EventBox
All Implemented Interfaces:
java.awt.Shape, java.io.Serializable, java.lang.Cloneable
Enclosing class:
Connector

protected class Connector.EventBox
extends java.awt.Rectangle

Encapsulation of a graphical element which displays the events linked through a Connector.

Author:
Lenko Grigorov
See Also:
Serialized Form

Nested Class Summary
protected  class Connector.EventBox.EventPair
          A pair of events.
 
Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D
java.awt.geom.Rectangle2D.Double, java.awt.geom.Rectangle2D.Float
 
Field Summary
protected  java.util.Vector<Connector.EventBox.EventPair> events
          The pairs of linked events to be shown in the event box.
protected  boolean showBothEvents
          Keeps track if the linked events on both sides of a connector have to be shown.
 
Fields inherited from class java.awt.Rectangle
height, width, x, y
 
Fields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
 
Constructor Summary
Connector.EventBox()
          Constructs an event box to display the pairs of linked events.
Connector.EventBox(boolean isSideLeft)
          Constructs an event box to display the linked events from only one side of the connector.
 
Method Summary
 void draw(java.awt.Graphics2D g2d)
          Render the event box.
 
Methods inherited from class java.awt.Rectangle
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, equals, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, toString, translate, union
 
Methods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union
 
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects
 

Field Detail

showBothEvents

protected boolean showBothEvents
Keeps track if the linked events on both sides of a connector have to be shown. Some event boxes show only the list of linked events for only one TemplateComponent.


events

protected java.util.Vector<Connector.EventBox.EventPair> events
The pairs of linked events to be shown in the event box.

Constructor Detail

Connector.EventBox

public Connector.EventBox()
Constructs an event box to display the pairs of linked events.


Connector.EventBox

public Connector.EventBox(boolean isSideLeft)
Constructs an event box to display the linked events from only one side of the connector.

Parameters:
isSideLeft - whether to display the events for the "left" TemplateComponent linked by the connector ( true), or the events for the "right" TemplateComponent (false)
Method Detail

draw

public void draw(java.awt.Graphics2D g2d)
Render the event box.

Parameters:
g2d - the graphical context where the event box has to be rendered