Back to index

moin  1.9.0~rc2
Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes
CH.ifa.draw.standard.AbstractConnector Class Reference

AbstractConnector provides default implementation for the Connector interface. More...

Inheritance diagram for CH.ifa.draw.standard.AbstractConnector:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 AbstractConnector ()
 Constructs a connector that has no owner.
 AbstractConnector (Figure owner)
 Constructs a connector with the given owner figure.
Figure owner ()
 Gets the connector's owner.
Point findStart (ConnectionFigure connection)
Point findEnd (ConnectionFigure connection)
Rectangle displayBox ()
 Gets the display box of the connector.
boolean containsPoint (int x, int y)
 Tests if a point is contained in the connector.
void draw (Graphics g)
 Draws this connector.
void write (StorableOutput dw)
 Stores the connector and its owner to a StorableOutput.
String getMap ()
void read (StorableInput dr) throws IOException
 Reads the connector and its owner from a StorableInput.

Protected Member Functions

Point findPoint (ConnectionFigure connection)
 Gets the connection point.

Private Attributes

Figure fOwner
 the owner of the connector
int abstractConnectorSerializedDataVersion = 1

Static Private Attributes

static final long serialVersionUID = -5170007865562687545L

Detailed Description

AbstractConnector provides default implementation for the Connector interface.

See also:
Connector

Definition at line 18 of file AbstractConnector.java.


Constructor & Destructor Documentation

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.

Definition at line 35 of file AbstractConnector.java.

                               {
        fOwner = null;
    }

Constructs a connector with the given owner figure.

Definition at line 42 of file AbstractConnector.java.

                                           {
        fOwner = owner;
    }

Here is the call graph for this function:


Member Function Documentation

boolean CH.ifa.draw.standard.AbstractConnector.containsPoint ( int  x,
int  y 
) [inline]

Tests if a point is contained in the connector.

Reimplemented in CH.ifa.draw.standard.LocatorConnector.

Definition at line 80 of file AbstractConnector.java.

                                               {
        return owner().containsPoint(x, y);
    }

Here is the call graph for this function:

Gets the display box of the connector.

Reimplemented in CH.ifa.draw.standard.LocatorConnector.

Definition at line 73 of file AbstractConnector.java.

                                  {
        return owner().displayBox();
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void CH.ifa.draw.standard.AbstractConnector.draw ( Graphics  g) [inline]

Draws this connector.

By default connectors are invisible.

Reimplemented in CH.ifa.draw.standard.LocatorConnector.

Definition at line 87 of file AbstractConnector.java.

                                 {
        // invisible by default
    }
Point CH.ifa.draw.standard.AbstractConnector.findEnd ( ConnectionFigure  connection) [inline]

Reimplemented in CH.ifa.draw.standard.ChopBoxConnector.

Definition at line 57 of file AbstractConnector.java.

                                                      {
        return findPoint(connection);
    }

Here is the call graph for this function:

Point CH.ifa.draw.standard.AbstractConnector.findPoint ( ConnectionFigure  connection) [inline, protected]

Gets the connection point.

Override when the connector does not need to distinguish between the start and end point of a connection.

Definition at line 66 of file AbstractConnector.java.

                                                           {
        return Geom.center(displayBox());
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Point CH.ifa.draw.standard.AbstractConnector.findStart ( ConnectionFigure  connection) [inline]

Reimplemented in CH.ifa.draw.standard.ChopBoxConnector.

Definition at line 53 of file AbstractConnector.java.

                                                        {
        return findPoint(connection);
    }

Here is the call graph for this function:

Definition at line 98 of file AbstractConnector.java.

                           {
       return "";
    }

Gets the connector's owner.

Definition at line 49 of file AbstractConnector.java.

                          {
        return fOwner;
    }

Here is the caller graph for this function:

void CH.ifa.draw.standard.AbstractConnector.read ( StorableInput  dr) throws IOException [inline]

Reads the connector and its owner from a StorableInput.

Reimplemented in CH.ifa.draw.standard.LocatorConnector.

Definition at line 105 of file AbstractConnector.java.

                                                          {
        fOwner = (Figure)dr.readStorable();
    }

Here is the caller graph for this function:

void CH.ifa.draw.standard.AbstractConnector.write ( StorableOutput  dw) [inline]

Stores the connector and its owner to a StorableOutput.

Reimplemented in CH.ifa.draw.standard.LocatorConnector.

Definition at line 94 of file AbstractConnector.java.

                                         {
        dw.writeStorable(fOwner);
    }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 28 of file AbstractConnector.java.

the owner of the connector

Definition at line 22 of file AbstractConnector.java.

final long CH.ifa.draw.standard.AbstractConnector.serialVersionUID = -5170007865562687545L [static, private]

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