ptolemy.vergil.actor
Class LinkController.LinkTarget

java.lang.Object
  extended bydiva.canvas.connector.AbstractConnectorTarget
      extended bydiva.canvas.connector.PerimeterTarget
          extended byptolemy.vergil.actor.LinkController.LinkTarget
All Implemented Interfaces:
ConnectorTarget
Enclosing class:
LinkController

public class LinkController.LinkTarget
extends PerimeterTarget


Constructor Summary
LinkController.LinkTarget()
           
 
Method Summary
 boolean acceptHead(Connector c, Figure f)
          Return true if the given connector can be connected to the given figure.
 boolean acceptTail(Connector c, Figure f)
          Return true if the given connector can be connected to the given figure.
 Site getHeadSite(Figure f, double x, double y)
          Return the nearest site on the figure if the figure is not a connector
 
Methods inherited from class diva.canvas.connector.AbstractConnectorTarget
getHeadSite, getHeadSite, getHeadSite, getTailSite, getTailSite, getTailSite, getTailSite
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkController.LinkTarget

public LinkController.LinkTarget()
Method Detail

acceptHead

public boolean acceptHead(Connector c,
                          Figure f)
Description copied from class: AbstractConnectorTarget
Return true if the given connector can be connected to the given figure. In this base class return true if the tail of the connector is not attached to the same figure.

Overrides:
acceptHead in class AbstractConnectorTarget

acceptTail

public boolean acceptTail(Connector c,
                          Figure f)
Description copied from class: AbstractConnectorTarget
Return true if the given connector can be connected to the given figure. In this base class return true if the head of the connector is not attached to the same figure.

Overrides:
acceptTail in class AbstractConnectorTarget

getHeadSite

public Site getHeadSite(Figure f,
                        double x,
                        double y)
Description copied from class: PerimeterTarget
Return the nearest site on the figure if the figure is not a connector

Specified by:
getHeadSite in interface ConnectorTarget
Overrides:
getHeadSite in class PerimeterTarget