public class StickyRectangleConnector extends ChopRectangleConnector
The location of the connection point is computed once, when the user connects the figure. Moving the figure around will not change the location.
| Constructor and Description |
|---|
StickyRectangleConnector()
Creates a new instance.
|
StickyRectangleConnector(Figure owner) |
StickyRectangleConnector(Figure owner,
java.awt.geom.Point2D.Double p) |
| Modifier and Type | Method and Description |
|---|---|
protected java.awt.geom.Point2D.Double |
chop(Figure target,
java.awt.geom.Point2D.Double from) |
void |
draw(java.awt.Graphics2D g)
Draws the connector.
|
java.awt.geom.Point2D.Double |
getAnchor()
Gets the anchor of the connector.
|
double |
getAngle() |
java.lang.String |
getParameters() |
void |
read(DOMInput in) |
void |
setAngle(float angle) |
void |
updateAnchor(java.awt.geom.Point2D.Double p)
Updates the anchor of the connector.
|
void |
write(DOMOutput out) |
findEnd, findStartclone, contains, findPoint, getBounds, getConnectorTarget, getDrawingArea, getOwner, isConnectToDecorator, setConnectToDecorator, setOwner, updateEndLocation, updateStartLocationpublic StickyRectangleConnector()
public StickyRectangleConnector(Figure owner)
public StickyRectangleConnector(Figure owner, java.awt.geom.Point2D.Double p)
public void draw(java.awt.Graphics2D g)
Connectordraw in interface Connectordraw in class AbstractConnectorpublic void setAngle(float angle)
public double getAngle()
public void updateAnchor(java.awt.geom.Point2D.Double p)
ConnectorupdateAnchor in interface ConnectorupdateAnchor in class AbstractConnectorpublic java.awt.geom.Point2D.Double getAnchor()
ConnectorgetAnchor in interface ConnectorgetAnchor in class AbstractConnectorprotected java.awt.geom.Point2D.Double chop(Figure target, java.awt.geom.Point2D.Double from)
chop in class ChopRectangleConnectorpublic java.lang.String getParameters()
public void read(DOMInput in) throws java.io.IOException
read in interface DOMStorableread in class AbstractConnectorjava.io.IOExceptionpublic void write(DOMOutput out) throws java.io.IOException
write in interface DOMStorablewrite in class AbstractConnectorjava.io.IOException