public class AbstractConnector extends java.lang.Object implements Connector, DOMStorable
Connector.Connector,
Serialized Form| Constructor 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)
Connectorpublic java.awt.geom.Point2D.Double findEnd(ConnectionFigure connection)
Connectorprotected java.awt.geom.Point2D.Double findPoint(ConnectionFigure connection)
public Figure getOwner()
protected void setOwner(Figure newValue)
public java.lang.Object clone()
Connectorpublic void updateStartLocation(java.awt.geom.Point2D.Double p)
public void updateEndLocation(java.awt.geom.Point2D.Double p)
public java.awt.geom.Point2D.Double getAnchor()
Connectorpublic void updateAnchor(java.awt.geom.Point2D.Double p)
ConnectorupdateAnchor in interface Connectorpublic java.awt.geom.Rectangle2D.Double getBounds()
Connectorpublic void read(DOMInput in) throws java.io.IOException
read in interface DOMStorablejava.io.IOExceptionpublic void write(DOMOutput out) throws java.io.IOException
write in interface DOMStorablejava.io.IOExceptionpublic java.awt.geom.Rectangle2D.Double getDrawingArea()
ConnectorgetDrawingArea in interface Connector