Back to index

moin  1.9.0~rc2
Public Member Functions
CH.ifa.draw.framework.Connector Interface Reference

Connectors know how to locate a connection point on a figure. More...

Inheritance diagram for CH.ifa.draw.framework.Connector:
Inheritance graph
[legend]
Collaboration diagram for CH.ifa.draw.framework.Connector:
Collaboration graph
[legend]

List of all members.

Public Member Functions

abstract Point findStart (ConnectionFigure connection)
 Finds the start point for the connection.
abstract Point findEnd (ConnectionFigure connection)
 Finds the end point for the connection.
abstract Figure owner ()
 Gets the connector's owner.
abstract Rectangle displayBox ()
 Gets the display box of the connector.
abstract boolean containsPoint (int x, int y)
 Tests if a point is contained in the connector.
abstract void draw (Graphics g)
 Draws this connector.
void write (StorableOutput dw)
 Writes the object to the StorableOutput.
String getMap ()
 Writes a map image of the object.
void read (StorableInput dr) throws IOException
 Reads the object from the StorableInput.

Detailed Description

Connectors know how to locate a connection point on a figure.

A Connector knows its owning figure and can determine either the start or the endpoint of a given connection figure. A connector has a display box that describes the area of a figure it is responsible for. A connector can be visible but it doesn't have to be.


Design Patterns

 o

Strategy
Connector implements the strategy to determine the connections points.

 o

Factory Method
Connectors are created by the Figure's factory method connectorAt.


See also:
Figure::connectorAt
ConnectionFigure

Definition at line 33 of file Connector.java.


Member Function Documentation

abstract boolean CH.ifa.draw.framework.Connector.containsPoint ( int  x,
int  y 
) [pure virtual]

Tests if a point is contained in the connector.

abstract Rectangle CH.ifa.draw.framework.Connector.displayBox ( ) [pure virtual]

Gets the display box of the connector.

abstract void CH.ifa.draw.framework.Connector.draw ( Graphics  g) [pure virtual]

Draws this connector.

Connectors don't have to be visible and it is OK leave this method empty.

abstract Point CH.ifa.draw.framework.Connector.findEnd ( ConnectionFigure  connection) [pure virtual]

Finds the end point for the connection.

abstract Point CH.ifa.draw.framework.Connector.findStart ( ConnectionFigure  connection) [pure virtual]

Finds the start point for the connection.

String CH.ifa.draw.util.Storable.getMap ( ) [inherited]

Writes a map image of the object.

Implemented in CH.ifa.draw.figures.ArrowTip.

abstract Figure CH.ifa.draw.framework.Connector.owner ( ) [pure virtual]

Gets the connector's owner.

void CH.ifa.draw.util.Storable.read ( StorableInput  dr) throws IOException [inherited]

Reads the object from the StorableInput.

Here is the caller graph for this function:

Writes the object to the StorableOutput.

Here is the caller graph for this function:


The documentation for this interface was generated from the following file: