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, findStart
clone, contains, findPoint, getBounds, getConnectorTarget, getDrawingArea, getOwner, isConnectToDecorator, setConnectToDecorator, setOwner, updateEndLocation, updateStartLocation
public StickyRectangleConnector()
public StickyRectangleConnector(Figure owner)
public StickyRectangleConnector(Figure owner, java.awt.geom.Point2D.Double p)
public void draw(java.awt.Graphics2D g)
Connector
draw
in interface Connector
draw
in class AbstractConnector
public void setAngle(float angle)
public double getAngle()
public void updateAnchor(java.awt.geom.Point2D.Double p)
Connector
updateAnchor
in interface Connector
updateAnchor
in class AbstractConnector
public java.awt.geom.Point2D.Double getAnchor()
Connector
getAnchor
in interface Connector
getAnchor
in class AbstractConnector
protected java.awt.geom.Point2D.Double chop(Figure target, java.awt.geom.Point2D.Double from)
chop
in class ChopRectangleConnector
public java.lang.String getParameters()
public void read(DOMInput in) throws java.io.IOException
read
in interface DOMStorable
read
in class AbstractConnector
java.io.IOException
public void write(DOMOutput out) throws java.io.IOException
write
in interface DOMStorable
write
in class AbstractConnector
java.io.IOException