org.processmining.analysis.performance.sequence
Class Arrow

java.lang.Object
  extended by org.processmining.analysis.performance.sequence.Arrow
Direct Known Subclasses:
PatternArrow, SequenceArrow

public class Arrow
extends java.lang.Object

Represents the transfer of work between two data-element instances.

Author:
Peter T.G. Hornix (p.t.g.hornix@student.tue.nl)

Constructor Summary
Arrow(java.lang.String source, java.lang.String destination)
          constructor to initialize arrow
 
Method Summary
 void drawArrow(java.util.HashMap lifeLines, java.awt.Color thisColor, java.awt.Graphics2D g)
          Draws the arrow
 java.lang.String getDestination()
          Returns the name of the data element instance in which the arrow ends.
 DataElementBlock getDestinationBlock()
          Returns the block in which the arrow ends.
 double getEndAt()
          Returns the end position of the arrow
 java.lang.String getSource()
          Returns the name of the data element instance from which the arrow originates.
 DataElementBlock getSourceBlock()
          Returns the block from which the arrow originates.
 double getStartAt()
          Returns the starting position of the arrow
 boolean isOnLine(java.awt.Point p, java.util.HashMap lifeLines, double scale)
          Returns true if point p is on the line of the arrow (or at most 2 pixels away)
 void setDestinationBlock(DataElementBlock destinationBlock)
          Sets the block in which the arrow ends to destinationBlock
 void setEndAt(double endAt)
          Sets the end position of the arrow.
 void setSourceBlock(DataElementBlock sourceBlock)
          Sets the block from which the arrow originates to sourceBlock
 void setStartAt(double startAt)
          Sets the starting position of the arrow.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Arrow

public Arrow(java.lang.String source,
             java.lang.String destination)
constructor to initialize arrow

Parameters:
source - String
destination - String
Method Detail

getSource

public java.lang.String getSource()
Returns the name of the data element instance from which the arrow originates.

Returns:
String

getDestination

public java.lang.String getDestination()
Returns the name of the data element instance in which the arrow ends.

Returns:
String

getStartAt

public double getStartAt()
Returns the starting position of the arrow

Returns:
double

getEndAt

public double getEndAt()
Returns the end position of the arrow

Returns:
double

setStartAt

public void setStartAt(double startAt)
Sets the starting position of the arrow.

Parameters:
startAt - double

setEndAt

public void setEndAt(double endAt)
Sets the end position of the arrow.

Parameters:
endAt - double

getSourceBlock

public DataElementBlock getSourceBlock()
Returns the block from which the arrow originates.

Returns:
DataElementBlock

setSourceBlock

public void setSourceBlock(DataElementBlock sourceBlock)
Sets the block from which the arrow originates to sourceBlock

Parameters:
sourceBlock - DataElementBlock

getDestinationBlock

public DataElementBlock getDestinationBlock()
Returns the block in which the arrow ends.

Returns:
DataElementBlock

setDestinationBlock

public void setDestinationBlock(DataElementBlock destinationBlock)
Sets the block in which the arrow ends to destinationBlock

Parameters:
destinationBlock - DataElementBlock

drawArrow

public void drawArrow(java.util.HashMap lifeLines,
                      java.awt.Color thisColor,
                      java.awt.Graphics2D g)
Draws the arrow

Parameters:
lifeLines - HashMap
thisColor - Color
g - Graphics2D

isOnLine

public boolean isOnLine(java.awt.Point p,
                        java.util.HashMap lifeLines,
                        double scale)
Returns true if point p is on the line of the arrow (or at most 2 pixels away)

Parameters:
p - Point
lifeLines - HashMap
scale - double
Returns:
boolean