|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.connector.AbstractConnectorTarget
public abstract class AbstractConnectorTarget
An abstract implementation of the ConnectorTarget interface. Most connector targets do only basic filtering on a connector, by disallowing the head and tail of a connector from attaching to the same figure. Most connector targets also have the same behavior for heads and for tails. This class allows connector targets to only implement a single method to use this functionality.
Constructor Summary | |
---|---|
AbstractConnectorTarget()
|
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(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. |
abstract 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)
Return a suitable site to connect a connector's head to. |
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)
Return a suitable site to connect a connector's tail to. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractConnectorTarget()
Method Detail |
---|
public boolean acceptHead(Connector c, Figure f)
public boolean acceptTail(Connector c, Figure f)
public abstract Site getHeadSite(Figure f, double x, double y)
getHeadSite
in interface ConnectorTarget
public Site getTailSite(Figure f, double x, double y)
getTailSite
in interface ConnectorTarget
public Site getHeadSite(Site s, double x, double y)
getHeadSite
in interface ConnectorTarget
public Site getTailSite(Site s, double x, double y)
getTailSite
in interface ConnectorTarget
public Site getHeadSite(Connector c, Figure f, double x, double y)
getHeadSite
in interface ConnectorTarget
public Site getTailSite(Connector c, Figure f, double x, double y)
getTailSite
in interface ConnectorTarget
public Site getHeadSite(Connector c, Site s, double x, double y)
getHeadSite
in interface ConnectorTarget
public Site getTailSite(Connector c, Site s, double x, double y)
getTailSite
in interface ConnectorTarget
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |