fcmodeler.view
Class AbstractEdgeFigure
java.lang.Object
|
+--diva.canvas.AbstractFigure
|
+--diva.canvas.connector.AbstractConnector
|
+--fcmodeler.view.AbstractEdgeFigure
- All Implemented Interfaces:
- diva.canvas.CanvasComponent, diva.canvas.connector.Connector, EdgeFigure, diva.canvas.Figure, PermanentFigure, diva.util.UserObjectContainer, diva.canvas.VisibleComponent
- Direct Known Subclasses:
- BezierEdgeFigure
- public abstract class AbstractEdgeFigure
- extends diva.canvas.connector.AbstractConnector
- implements EdgeFigure
An abstract implementation of EdgeFigure
. AbstractEdgeFigure
provides
support for the PermanentFigure
aspect of
EdgeFigure
, as well as skeletal implementations of all of the methods specified
in the EdgeFigure
interface. It does not provide any line geometry; this is left for concrete
subclasses to handle.
- Since:
- JDK1.3
- Version:
- $Revision: 1.4 $
- Author:
- Julie Dickerson , Zach Cox
Constructor Summary |
AbstractEdgeFigure(diva.canvas.Site tail,
diva.canvas.Site head)
Creates a new AbstractEdgeFigure between the given sites. |
Method Summary |
diva.canvas.toolbox.PaintedShape |
getFigure()
Returns the PaintedShape used for painting this edge figure. |
diva.canvas.connector.ConnectorEnd |
getHeadEnd()
Returns the arrowhead used at the head end of this edge figure. |
diva.canvas.toolbox.PaintedShape |
getPermanentFigure()
Returns the PaintedShape used for permanent visual attribute storage in this edge figure. |
diva.canvas.connector.ConnectorEnd |
getTailEnd()
Returns the arrowhead used at the tail end of this edge figure. |
void |
setHeadEnd(diva.canvas.connector.ConnectorEnd end)
Sets the arrowhead at the head end of this edge figure to the specified ConnectorEnd . |
void |
setTailEnd(diva.canvas.connector.ConnectorEnd end)
Sets the arrowhead at the tail end of this edge figure to the specified ConnectorEnd . |
void |
usePermanents()
Sets the visual attributes for this edge to those stored in the permanent
PaintedShape . |
Methods inherited from class diva.canvas.connector.AbstractConnector |
getBounds, getHeadSite, getLineWidth, getPaintedShape, getShape, getStroke, getStrokePaint, getTailSite, headMoved, hit, paint, reroute, route, setDashArray, setHeadSite, setLineWidth, setStroke, setStrokePaint, setTailSite, tailMoved, transform, translate |
Methods inherited from class diva.canvas.AbstractFigure |
contains, getInteractor, getLayer, getParent, getTransformContext, getUserObject, intersects, isVisible, paint, repaint, repaint, setInteractor, setParent, setUserObject, setVisible |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface diva.canvas.connector.Connector |
getHeadSite, getTailSite, headMoved, reroute, route, setHeadSite, setTailSite, tailMoved |
Methods inherited from interface diva.canvas.Figure |
contains, getBounds, getInteractor, getLayer, getShape, hit, intersects, setInteractor, setParent, transform, translate |
Methods inherited from interface diva.canvas.VisibleComponent |
isVisible, paint, paint, setVisible |
Methods inherited from interface diva.canvas.CanvasComponent |
getParent, getTransformContext, repaint, repaint |
Methods inherited from interface diva.util.UserObjectContainer |
getUserObject, setUserObject |
AbstractEdgeFigure
public AbstractEdgeFigure(diva.canvas.Site tail,
diva.canvas.Site head)
- Creates a new
AbstractEdgeFigure
between the given sites.
- Parameters:
tail
- the site on the tail node to connect to.head
- the site on the head node to connect to.
getFigure
public diva.canvas.toolbox.PaintedShape getFigure()
- Returns the
PaintedShape
used for painting this edge figure.
- Specified by:
getFigure
in interface EdgeFigure
- Returns:
- the
PaintedShape
used for painting this edge figure.
getHeadEnd
public diva.canvas.connector.ConnectorEnd getHeadEnd()
- Returns the arrowhead used at the head end of this edge figure.
- Specified by:
getHeadEnd
in interface EdgeFigure
- Overrides:
getHeadEnd
in class diva.canvas.connector.AbstractConnector
- Returns:
- the arrowhead used at the head end of this edge figure.
getPermanentFigure
public diva.canvas.toolbox.PaintedShape getPermanentFigure()
- Returns the
PaintedShape
used for permanent visual attribute storage in this edge figure.
- Specified by:
getPermanentFigure
in interface EdgeFigure
- Returns:
- the
PaintedShape
used for permanent visual attribute storage in this edge figure.
getTailEnd
public diva.canvas.connector.ConnectorEnd getTailEnd()
- Returns the arrowhead used at the tail end of this edge figure.
- Specified by:
getTailEnd
in interface EdgeFigure
- Overrides:
getTailEnd
in class diva.canvas.connector.AbstractConnector
- Returns:
- the arrowhead used at the tail end of this edge figure.
setHeadEnd
public void setHeadEnd(diva.canvas.connector.ConnectorEnd end)
- Sets the arrowhead at the head end of this edge figure to the specified
ConnectorEnd
.
- Specified by:
setHeadEnd
in interface EdgeFigure
- Overrides:
setHeadEnd
in class diva.canvas.connector.AbstractConnector
- Parameters:
end
- the new head end arrowhead for this edge figure.
setTailEnd
public void setTailEnd(diva.canvas.connector.ConnectorEnd end)
- Sets the arrowhead at the tail end of this edge figure to the specified
ConnectorEnd
.
- Specified by:
setTailEnd
in interface EdgeFigure
- Overrides:
setTailEnd
in class diva.canvas.connector.AbstractConnector
- Parameters:
end
- the new tail end arrowhead for this edge figure.
usePermanents
public void usePermanents()
- Sets the visual attributes for this edge to those stored in the permanent
PaintedShape
. This can be used to revert back to a permanent visual state
after modifying the appearance of this edge.
- Specified by:
usePermanents
in interface PermanentFigure