Package diva.canvas.connector
Interface ConnectorTarget
-
- All Known Implementing Classes:
AbstractConnectorTarget
,ArcTutorial.SelfPTarget
,CenterTarget
,ConnectorTutorial.SRTarget
,LinkController.LinkTarget
,PerimeterTarget
,TransitionController.LinkTarget
public interface ConnectorTarget
An object that is used to get suitable "target" sites for connectors. This class provides a way for connections to be connected to figures without knowing too many specifics about the figure being connected. Instances of this object are often given to controller objects (as in model-view-controller) so they can set up view construction and interaction. In this same package, an instance is required by ConnectorManipulator.- Version:
- $Id$
- Author:
- John Reekie
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Site
getHeadSite(Connector c, Figure f, double x, double y)
Return a suitable site to connect the given connector's head to, based on this figure and location.Site
getHeadSite(Connector c, Site s, double x, double y)
Return a suitable site to connect a connector's head to.Site
getHeadSite(Figure f, double x, double y)
Return a suitable site to connect a connector's head to, based on this figure and location.Site
getHeadSite(Site s, double x, double y)
Deprecated.Use getHeadSite that takes a connector.Site
getTailSite(Connector c, Figure f, double x, double y)
Return a suitable site to connect the given connector's tail to, based on this figure and location.Site
getTailSite(Connector c, Site s, double x, double y)
Return a suitable site to connect a connector's tail to.Site
getTailSite(Figure f, double x, double y)
Return a suitable site to connect a connector's tail to, based on this figure and location.Site
getTailSite(Site s, double x, double y)
Deprecated.Use getTailSite that takes a connector.
-
-
-
Method Detail
-
getHeadSite
Site getHeadSite(Figure f, double x, double y)
Return a suitable site to connect a connector's head to, based on this figure and location. Return null if there is no suitable site. In general, it is better to use the method that takes a connector, as this gives the target a chance to disallow the connection. This method is primarily useful for manually creating new figures.- Parameters:
f
- The figurex
- The x location of the sitey
- The y location of the site- Returns:
- The head site
-
getTailSite
Site getTailSite(Figure f, double x, double y)
Return a suitable site to connect a connector's tail to, based on this figure and location. Return null if there is no suitable site. In general, it is better to use the method that takes a connector, as this gives the target a chance to disallow the connection. This method is primarily useful for manually creating new figures.- Parameters:
f
- The figurex
- The x location of the sitey
- The y location of the site- Returns:
- The tail site
-
getHeadSite
@Deprecated Site getHeadSite(Site s, double x, double y)
Deprecated.Use getHeadSite that takes a connector.Return a suitable site to connect a connector's head to. The passed site is usually taken to be a site that the connector is already connected to, so the target should take this into account if it has restrictions such as only allowing one connection to each site. The returned site can be the same as the passed site, which signals that the passed site is the best one available.- Parameters:
s
- The sitex
- The x location of the sitey
- The y location of the site- Returns:
- The head site
-
getTailSite
@Deprecated Site getTailSite(Site s, double x, double y)
Deprecated.Use getTailSite that takes a connector.Return a suitable site to connect a connector's tail to. See the description for getheadSite().- Parameters:
s
- The sitex
- The x location of the sitey
- The y location of the site- Returns:
- The tail site
-
getHeadSite
Site getHeadSite(Connector c, Figure f, double x, double y)
Return a suitable site to connect the given connector's head to, based on this figure and location. Return null if there is no suitable site.- Parameters:
c
- The connectorf
- The figurex
- The x location of the sitey
- The y location of the site- Returns:
- The head site
-
getTailSite
Site getTailSite(Connector c, Figure f, double x, double y)
Return a suitable site to connect the given connector's tail to, based on this figure and location. Return null if there is no suitable site.- Parameters:
c
- The connectorf
- The figurex
- The x location of the sitey
- The y location of the site- Returns:
- The tail site
-
getHeadSite
Site getHeadSite(Connector c, Site s, double x, double y)
Return a suitable site to connect a connector's head to. The passed site is usually taken to be a site that the connector is already connected to, so the target should take this into account if it has restrictions such as only allowing one connection to each site. The returned site can be the same as the passed site, which signals that the passed site is the best one available.- Parameters:
c
- The connectors
- The sitex
- The x location of the sitey
- The y location of the site- Returns:
- The head site
-
-