|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.rolemodelsoft.drawlet.basics.AbstractPaintable
|
+--com.rolemodelsoft.drawlet.basics.AbstractFigure
|
+--com.rolemodelsoft.drawlet.shapes.AbstractShape
|
+--com.rolemodelsoft.drawlet.shapes.lines.Arrow
Arrows are a basic adornment for AdornedLines.
| Field Summary | |
protected ArrowStyle |
arrowStyle
The ArrowStyle which defines how to draw this Arrow. |
protected int |
direction
The direction of the arrow |
static int |
FORWARD
Defines which end of the line we are attached to. |
protected java.beans.PropertyChangeEvent |
lastEvent
|
protected LineFigure |
line
The LineFigure we are attached to. |
protected java.awt.Polygon |
polygon
The polygon defining the arrow head |
static int |
REVERSE
Defines which end of the line we are attached to. |
| Fields inherited from class com.rolemodelsoft.drawlet.basics.AbstractFigure |
listeners,
locationListeners |
| Constructor Summary | |
Arrow(LineFigure line)
Construct a new arrow initialized with the given LineFigure. |
|
Arrow(LineFigure line,
int direction)
Construct a new arrow initialized with the given LineFigure and direction. |
|
| Method Summary | |
protected void |
basicReshape(int x,
int y,
int width,
int height)
Reshapes the Arrow to the specified bounding box. |
protected void |
basicTranslate(int x,
int y)
Shifts the receiver by the specified values. |
protected ArrowStyle |
defaultArrowStyle()
Answer the default shape for the arrow. |
protected int |
defaultDirection()
Answer the default direction for the arrow. |
protected java.awt.Polygon |
defaultPolygon()
Answer the default shape for the arrow. |
protected Locator |
getArrowLocator(Locator loc)
Answer the proper Locator for the given values. |
ArrowStyle |
getArrowStyle()
Answer the ArrowStyle that defines how to draw the arrow. |
java.awt.Rectangle |
getBounds()
Answer the bounds of the receiver. |
protected int |
getDestinationIndex()
Answers the index of the destination, depending on the direction of the receiver. |
protected Locator |
getDestinationLocator()
Answers the Locator of the destination, depending on the direction of the receiver. |
protected int |
getDirection()
Answers the direction of the receiver. |
Handle[] |
getHandles()
Answer the handles associated with the receiver. |
protected java.awt.Polygon |
getPolygon()
Answer the polygon that defines the arrow. |
protected int |
getSourceIndex()
Answers the index of the source, depending on the direction of the receiver. |
protected Locator |
getSourceLocator()
Answers the Locator of the source, depending on the direction of the receiver. |
void |
locationChanged(java.beans.PropertyChangeEvent evt)
Update because the location of my line has changed. |
void |
paint(java.awt.Graphics g)
Paints the Arrow. |
void |
relationChanged(java.beans.PropertyChangeEvent event)
Update because the relation of my line has changed. |
protected void |
resetLocationCache()
Flush caches with respect to determining location. |
void |
shapeChanged(java.beans.PropertyChangeEvent evt)
Update because the shape of my line has changed. |
void |
sizeChanged(java.beans.PropertyChangeEvent evt)
Update because the size of my line has changed. |
protected void |
updateShape()
The line has notified the receiver of a change. |
| Methods inherited from class com.rolemodelsoft.drawlet.shapes.AbstractShape |
basicResize,
resetBoundsCache,
resetSizeCache,
reshapedPolygon,
reshapedPolygon,
setBounds,
setSize |
| Methods inherited from class com.rolemodelsoft.drawlet.basics.AbstractFigure |
addPropertyChangeListener,
addRelatedLocationListener,
basicMove,
changedLocation,
changedShape,
changedSize,
contains,
contains,
contains,
deleteLocationListeners,
disconnect,
duplicate,
duplicateIn,
editTool,
estimatedDuplicateSize,
figureFromLocator,
fireLocationChange,
firePropertyChange,
firePropertyChange,
fireRelationChange,
fireShapeChange,
fireSizeChange,
getLocation,
getLocator,
getStyle,
intersects,
intersects,
isObsolete,
isWithin,
isWithin,
locatorAt,
move,
move,
postDuplicate,
relatedLocationListeners,
removePropertyChangeListener,
removeRelatedLocationListener,
requestConnection,
setSize,
setStyle,
translate |
| Methods inherited from class com.rolemodelsoft.drawlet.basics.AbstractPaintable |
getBottom,
getHeight,
getLeft,
getRight,
getSize,
getTop,
getWidth |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected LineFigure line
public static final int FORWARD
public static final int REVERSE
protected int direction
protected transient java.awt.Polygon polygon
protected ArrowStyle arrowStyle
protected java.beans.PropertyChangeEvent lastEvent
| Constructor Detail |
public Arrow(LineFigure line)
line - the LineFigure to attach to.
public Arrow(LineFigure line,
int direction)
line - the LineFigure to attach to.the - direction for the Arrow.| Method Detail |
protected void basicReshape(int x,
int y,
int width,
int height)
x - the x coordinatey - the y coordinatewidth - the width of the figureheight - the height of the figuregetBounds()
protected void basicTranslate(int x,
int y)
x - the amount to shift horizontally.y - the amount to shift vertically.protected ArrowStyle defaultArrowStyle()
protected int defaultDirection()
protected java.awt.Polygon defaultPolygon()
protected Locator getArrowLocator(Locator loc)
source - the first Locator to calculate from.destination - the second Locator to calculate from.offset - the amount the Locator should be offset.public ArrowStyle getArrowStyle()
public java.awt.Rectangle getBounds()
protected int getDestinationIndex()
protected Locator getDestinationLocator()
protected int getDirection()
public Handle[] getHandles()
protected java.awt.Polygon getPolygon()
protected int getSourceIndex()
protected Locator getSourceLocator()
public void locationChanged(java.beans.PropertyChangeEvent evt)
event - PropertyChangeEventpublic void paint(java.awt.Graphics g)
g - the specified Graphics windowpublic void relationChanged(java.beans.PropertyChangeEvent event)
event - PropertyChangeEventprotected void resetLocationCache()
public void shapeChanged(java.beans.PropertyChangeEvent evt)
event - PropertyChangeEventpublic void sizeChanged(java.beans.PropertyChangeEvent evt)
event - PropertyChangeEventprotected void updateShape()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||