org.jhotdraw.draw.connector
Class LocatorConnector
- java.lang.Object
-
- org.jhotdraw.draw.connector.AbstractConnector
-
- org.jhotdraw.draw.connector.LocatorConnector
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Connector, DOMStorable
public class LocatorConnector extends AbstractConnector
A LocatorConnector locates connection points with the help of a Locator. It supports the definition of connection points to semantic locations.- See Also:
Locator,Connector, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEThe standard size of the connector.
-
Constructor Summary
Constructors Constructor and Description LocatorConnector()Creates a new instance.LocatorConnector(Figure owner, Locator l)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleancontains(java.awt.geom.Point2D.Double p)Tests if a point is contained in the connector.java.awt.geom.Rectangle2D.DoublegetBounds()Gets the display box of the connector.LocatorgetLocator()voidread(DOMInput in)voidwrite(DOMOutput out)-
Methods inherited from class org.jhotdraw.draw.connector.AbstractConnector
clone, draw, findEnd, findStart, getAnchor, getDrawingArea, getOwner, isConnectToDecorator, setConnectToDecorator, updateAnchor, updateEndLocation, updateStartLocation
-
-
-
-
Field Detail
-
SIZE
public static final int SIZE
The standard size of the connector. The display box is centered around the located point.FIXME - Why do we need a standard size?
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LocatorConnector
public LocatorConnector()
Creates a new instance. Only used for DOMStorable.
-
-
Method Detail
-
getLocator
public Locator getLocator()
-
contains
public boolean contains(java.awt.geom.Point2D.Double p)
Tests if a point is contained in the connector.- Specified by:
containsin interfaceConnector- Overrides:
containsin classAbstractConnector
-
getBounds
public java.awt.geom.Rectangle2D.Double getBounds()
Gets the display box of the connector.- Specified by:
getBoundsin interfaceConnector- Overrides:
getBoundsin classAbstractConnector
-
read
public void read(DOMInput in) throws java.io.IOException
- Specified by:
readin interfaceDOMStorable- Overrides:
readin classAbstractConnector- Throws:
java.io.IOException
-
write
public void write(DOMOutput out) throws java.io.IOException
- Specified by:
writein interfaceDOMStorable- Overrides:
writein classAbstractConnector- Throws:
java.io.IOException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG