All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class CH.ifa.draw.standard.AbstractConnector

java.lang.Object
   |
   +----CH.ifa.draw.standard.AbstractConnector

public abstract class AbstractConnector
extends Object
implements Connector
AbstractConnector provides default implementation for the Connector interface.

See Also:
Connector

Constructor Index

 o AbstractConnector()
Constructs a connector that has no owner.
 o AbstractConnector(Figure)
Constructs a connector with the given owner figure.

Method Index

 o containsPoint(int, int)
Tests if a point is contained in the connector.
 o displayBox()
Gets the display box of the connector.
 o draw(Graphics)
Draws this connector.
 o findEnd(ConnectionFigure)
 o findPoint(ConnectionFigure)
Gets the connection point.
 o findStart(ConnectionFigure)
 o owner()
Gets the connector's owner.
 o read(StorableInput)
Reads the connector and its owner from a StorableInput.
 o write(StorableOutput)
Stores the connector and its owner to a StorableOutput.

Constructors

 o AbstractConnector
 public AbstractConnector()
Constructs a connector that has no owner. It is only used internally to resurrect a connectors from a StorableOutput. It should never be called directly.

 o AbstractConnector
 public AbstractConnector(Figure owner)
Constructs a connector with the given owner figure.

Methods

 o owner
 public Figure owner()
Gets the connector's owner.

 o findStart
 public Point findStart(ConnectionFigure connection)
 o findEnd
 public Point findEnd(ConnectionFigure connection)
 o findPoint
 protected Point findPoint(ConnectionFigure connection)
Gets the connection point. Override when the connector does not need to distinguish between the start and end point of a connection.

 o displayBox
 public Rectangle displayBox()
Gets the display box of the connector.

 o containsPoint
 public boolean containsPoint(int x,
                              int y)
Tests if a point is contained in the connector.

 o draw
 public void draw(Graphics g)
Draws this connector. By default connectors are invisible.

 o write
 public void write(StorableOutput dw)
Stores the connector and its owner to a StorableOutput.

 o read
 public void read(StorableInput dr) throws IOException
Reads the connector and its owner from a StorableInput.


All Packages  Class Hierarchy  This Package  Previous  Next  Index