diva.canvas.connector
Interface Connector

All Superinterfaces:
CanvasComponent, Figure, UserObjectContainer, VisibleComponent
All Known Implementing Classes:
AbstractConnector, ArcConnector, 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: Connector.java 38798 2005-07-08 20:00:01Z cxh $
Author:
Michael Shilman, John Reekie

Method Summary
 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.Figure
contains, getBounds, getInteractor, getLayer, getOrigin, getParent, getShape, getToolTipText, hit, intersects, setInteractor, setParent, setToolTipText, transform, translate
 
Methods inherited from interface diva.canvas.VisibleComponent
isVisible, paint, paint, setVisible
 
Methods inherited from interface diva.canvas.CanvasComponent
getTransformContext, repaint, repaint
 
Methods inherited from interface diva.util.UserObjectContainer
getUserObject, setUserObject
 

Method Detail

getHeadSite

Site getHeadSite()
Get the site that marks the "head" of the connector.


getTailSite

Site getTailSite()
Get the site that marks the "tail" of the connector.


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.


setTailSite

void setTailSite(Site s)
Set the site that marks the "tail" of the connector.


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.