public class PSDArrow
extends java.lang.Object
Constructor and Description |
---|
PSDArrow(java.lang.String source,
java.lang.String destination)
constructor to initialize arrow
|
Modifier and Type | Method and Description |
---|---|
void |
drawArrow(java.util.Map<java.lang.String,PSDLifeLine> 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.
|
PSDBlock |
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.
|
PSDBlock |
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.Map<java.lang.String,PSDLifeLine> lifeLines,
double scale)
Returns true if point p is on the line of the arrow (or at most 2 pixels
away)
|
void |
setDestinationBlock(PSDBlock destinationBlock)
Sets the block in which the arrow ends to destinationBlock
|
void |
setEndAt(double endAt)
Sets the end position of the arrow.
|
void |
setSourceBlock(PSDBlock sourceBlock)
Sets the block from which the arrow originates to sourceBlock
|
void |
setStartAt(double startAt)
Sets the starting position of the arrow.
|
public PSDArrow(java.lang.String source, java.lang.String destination)
source
- Stringdestination
- Stringpublic java.lang.String getSource()
public java.lang.String getDestination()
public double getStartAt()
public double getEndAt()
public void setStartAt(double startAt)
startAt
- doublepublic void setEndAt(double endAt)
endAt
- doublepublic PSDBlock getSourceBlock()
public void setSourceBlock(PSDBlock sourceBlock)
sourceBlock
- PSDBlockpublic PSDBlock getDestinationBlock()
public void setDestinationBlock(PSDBlock destinationBlock)
destinationBlock
- PSDBlockpublic void drawArrow(java.util.Map<java.lang.String,PSDLifeLine> lifeLines, java.awt.Color thisColor, java.awt.Graphics2D g)
lifeLines
- MapthisColor
- Colorg
- Graphics2Dpublic boolean isOnLine(java.awt.Point p, java.util.Map<java.lang.String,PSDLifeLine> lifeLines, double scale)
p
- PointlifeLines
- Mapscale
- double