templates.presentation
Class EventLinker.LabelLink

java.lang.Object
  extended by java.awt.geom.Line2D
      extended by java.awt.geom.Line2D.Float
          extended by templates.presentation.EventLinker.LabelLink
All Implemented Interfaces:
java.awt.Shape, java.io.Serializable, java.lang.Cloneable
Enclosing class:
EventLinker

protected class EventLinker.LabelLink
extends java.awt.geom.Line2D.Float

The UI component used to render a link between two events.

Author:
Lenko Grigorov
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Line2D
java.awt.geom.Line2D.Double, java.awt.geom.Line2D.Float
 
Field Summary
 
Fields inherited from class java.awt.geom.Line2D.Float
x1, x2, y1, y2
 
Constructor Summary
EventLinker.LabelLink(EventLinker.EventLabel leftSide, EventLinker.EventLabel rightSide)
          Construct a new event link with the given event labels.
 
Method Summary
 boolean contains(java.awt.Point p)
          Determine if the line drawn to represent the link contains the given point (within a degree of proximity).
 boolean equals(java.lang.Object o)
           
 void paint(java.awt.Graphics2D g2d)
          Render the event link in the given graphics context.
 
Methods inherited from class java.awt.geom.Line2D.Float
getBounds2D, getP1, getP2, getX1, getX2, getY1, getY2, setLine, setLine
 
Methods inherited from class java.awt.geom.Line2D
clone, contains, contains, contains, contains, getBounds, getPathIterator, getPathIterator, intersects, intersects, intersectsLine, intersectsLine, linesIntersect, ptLineDist, ptLineDist, ptLineDist, ptLineDistSq, ptLineDistSq, ptLineDistSq, ptSegDist, ptSegDist, ptSegDist, ptSegDistSq, ptSegDistSq, ptSegDistSq, relativeCCW, relativeCCW, relativeCCW, setLine, setLine
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventLinker.LabelLink

public EventLinker.LabelLink(EventLinker.EventLabel leftSide,
                             EventLinker.EventLabel rightSide)
Construct a new event link with the given event labels.

Parameters:
leftSide - the event label on the left side of the link
rightSide - the event label on the right side of the link
Method Detail

contains

public boolean contains(java.awt.Point p)
Determine if the line drawn to represent the link contains the given point (within a degree of proximity).

Parameters:
p - the point
Returns:
true if the line drawn to represent the link contains the given point (within a degree of proximity); false otherwise

paint

public void paint(java.awt.Graphics2D g2d)
Render the event link in the given graphics context.

Parameters:
g2d - the graphics context where the event link should be rendered

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object