public class AbstractConnector extends java.lang.Object implements Connector, DOMStorable
Connector
.Connector
,
Serialized FormConstructor and Description |
---|
AbstractConnector()
Constructs a connector that has no owner.
|
AbstractConnector(Figure owner)
Constructs a connector with the given owner figure.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns a clone of the Connection.
|
boolean |
contains(java.awt.geom.Point2D.Double p)
Tests if a point is contained in the connector.
|
void |
draw(java.awt.Graphics2D g)
Draws the connector.
|
java.awt.geom.Point2D.Double |
findEnd(ConnectionFigure connection)
Finds the end point for the connection.
|
protected java.awt.geom.Point2D.Double |
findPoint(ConnectionFigure connection)
Gets the connection point.
|
java.awt.geom.Point2D.Double |
findStart(ConnectionFigure connection)
Finds the start point for the connection.
|
java.awt.geom.Point2D.Double |
getAnchor()
Gets the anchor of the connector.
|
java.awt.geom.Rectangle2D.Double |
getBounds()
Gets the bounds of the connector.
|
protected Figure |
getConnectorTarget(Figure f) |
java.awt.geom.Rectangle2D.Double |
getDrawingArea()
Gets the drawing area of the connector.
|
Figure |
getOwner()
Gets the connector's owner.
|
boolean |
isConnectToDecorator() |
void |
read(DOMInput in) |
void |
setConnectToDecorator(boolean newValue) |
protected void |
setOwner(Figure newValue)
Sets the connector's owner.
|
void |
updateAnchor(java.awt.geom.Point2D.Double p)
Updates the anchor of the connector.
|
void |
updateEndLocation(java.awt.geom.Point2D.Double p)
This is called, when the end location of the connection has been
moved by the user.
|
void |
updateStartLocation(java.awt.geom.Point2D.Double p)
This is called, when the start location of the connection has been
moved by the user.
|
void |
write(DOMOutput out) |
public AbstractConnector()
public AbstractConnector(Figure owner)
public void setConnectToDecorator(boolean newValue)
public boolean isConnectToDecorator()
public boolean contains(java.awt.geom.Point2D.Double p)
public java.awt.geom.Point2D.Double findStart(ConnectionFigure connection)
Connector
public java.awt.geom.Point2D.Double findEnd(ConnectionFigure connection)
Connector
protected java.awt.geom.Point2D.Double findPoint(ConnectionFigure connection)
public Figure getOwner()
protected void setOwner(Figure newValue)
public java.lang.Object clone()
Connector
public void updateStartLocation(java.awt.geom.Point2D.Double p)
public void updateEndLocation(java.awt.geom.Point2D.Double p)
public java.awt.geom.Point2D.Double getAnchor()
Connector
public void updateAnchor(java.awt.geom.Point2D.Double p)
Connector
updateAnchor
in interface Connector
public java.awt.geom.Rectangle2D.Double getBounds()
Connector
public void read(DOMInput in) throws java.io.IOException
read
in interface DOMStorable
java.io.IOException
public void write(DOMOutput out) throws java.io.IOException
write
in interface DOMStorable
java.io.IOException
public java.awt.geom.Rectangle2D.Double getDrawingArea()
Connector
getDrawingArea
in interface Connector