Package diva.canvas.connector
Interface Connector
-
- All Superinterfaces:
CanvasComponent
,Figure
,UserObjectContainer
,VisibleComponent
- All Known Implementing Classes:
AbstractConnector
,ArcConnector
,KielerLayoutArcConnector
,KielerLayoutConnector
,LinkManhattanConnector
,ManhattanConnector
,StraightConnector
public interface Connector extends Figure
A Connector is a figure that draws itself between two sites on other figures. To do so, it requires two references to sites on other figures.- Version:
- $Id$
- Author:
- Michael Shilman, John Reekie
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Site
getHeadSite()
Get the site that marks the "head" of the connector.Site
getTailSite()
Get the site that marks the "tail" of the connector.void
headMoved()
Inform the connector that the head site has moved.void
reroute()
Tell the connector to re-route itself.void
route()
Tell the connector to route itself completely, using all available information.void
setHeadSite(Site s)
Set the site that marks the "head" of the connector.void
setTailSite(Site s)
Set the site that marks the "tail" of the connector.void
tailMoved()
Inform the connector that the tail site has moved.-
Methods inherited from interface diva.canvas.CanvasComponent
getTransformContext, repaint, repaint
-
Methods inherited from interface diva.canvas.Figure
contains, getBounds, getInteractor, getLayer, getOrigin, getParent, getShape, getToolTipText, hit, intersects, setInteractor, setParent, setToolTipText, transform, translate
-
Methods inherited from interface diva.util.UserObjectContainer
getUserObject, setUserObject
-
Methods inherited from interface diva.canvas.VisibleComponent
isVisible, paint, paint, setVisible
-
-
-
-
Method Detail
-
getHeadSite
Site getHeadSite()
Get the site that marks the "head" of the connector.- Returns:
- the "head" site.
-
getTailSite
Site getTailSite()
Get the site that marks the "tail" of the connector.- Returns:
- The "tail" site
-
headMoved
void headMoved()
Inform the connector that the head site has moved. The connector is expected to reroute itself using an efficient means as is available. Repaint the figure.
-
reroute
void reroute()
Tell the connector to re-route itself. In general, implementations of this method should be more efficient than route(). Repaint the figure.
-
route
void route()
Tell the connector to route itself completely, using all available information. Repaint the figure.
-
setHeadSite
void setHeadSite(Site s)
Set the site that marks the "head" of the connector.- Parameters:
s
- The "head" site
-
setTailSite
void setTailSite(Site s)
Set the site that marks the "tail" of the connector.- Parameters:
s
- The "tail" site
-
tailMoved
void tailMoved()
Inform the connector that the tail site has moved. The connector is expected to reroute itself using an efficient means as is available. Repaint the figure.
-
-