Back to index

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

A LocatorConnector locates connection points with the help of a Locator. More...

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

List of all members.

Public Member Functions

 LocatorConnector ()
 LocatorConnector (Figure owner, Locator l)
boolean containsPoint (int x, int y)
 Tests if a point is contained in the connector.
Rectangle displayBox ()
 Gets the display box of the connector.
void draw (Graphics g)
 Draws this connector.
void write (StorableOutput dw)
 Stores the arrow tip to a StorableOutput.
void read (StorableInput dr) throws IOException
 Reads the arrow tip from a StorableInput.
Figure owner ()
 Gets the connector's owner.
Point findStart (ConnectionFigure connection)
Point findEnd (ConnectionFigure connection)
String getMap ()

Static Public Attributes

static final int SIZE = 8
 The standard size of the connector.

Protected Member Functions

Point locate (ConnectionFigure connection)
Point findPoint (ConnectionFigure connection)
 Gets the connection point.

Private Attributes

Locator fLocator
int locatorConnectorSerializedDataVersion = 1

Static Private Attributes

static final long serialVersionUID = 5062833203337604181L

Detailed Description

A LocatorConnector locates connection points with the help of a Locator.

It supports the definition of connection points to semantic locations.

See also:
Locator
Connector

Definition at line 20 of file LocatorConnector.java.


Constructor & Destructor Documentation

Definition at line 36 of file LocatorConnector.java.

                              { // only used for Storable
        fLocator = null;
    }
CH.ifa.draw.standard.LocatorConnector.LocatorConnector ( Figure  owner,
Locator  l 
) [inline]

Definition at line 40 of file LocatorConnector.java.

                                                     {
        super(owner);
        fLocator = l;
    }

Member Function Documentation

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

Tests if a point is contained in the connector.

Reimplemented from CH.ifa.draw.standard.AbstractConnector.

Definition at line 52 of file LocatorConnector.java.

                                               {
        return displayBox().contains(x, y);
    }

Here is the call graph for this function:

Gets the display box of the connector.

Reimplemented from CH.ifa.draw.standard.AbstractConnector.

Definition at line 59 of file LocatorConnector.java.

                                  {
        Point p = fLocator.locate(owner());
        return new Rectangle(
                p.x - SIZE / 2,
                p.y - SIZE / 2,
                SIZE,
                SIZE);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Draws this connector.

Reimplemented from CH.ifa.draw.standard.AbstractConnector.

Definition at line 71 of file LocatorConnector.java.

                                 {
        Rectangle r = displayBox();

        g.setColor(Color.blue);
        g.fillOval(r.x, r.y, r.width, r.height);
        g.setColor(Color.black);
        g.drawOval(r.x, r.y, r.width, r.height);
    }

Here is the call graph for this function:

Point CH.ifa.draw.standard.AbstractConnector.findEnd ( ConnectionFigure  connection) [inline, inherited]

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, inherited]

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, inherited]

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:

String CH.ifa.draw.standard.AbstractConnector.getMap ( ) [inline, inherited]

Definition at line 98 of file AbstractConnector.java.

                           {
       return "";
    }
Point CH.ifa.draw.standard.LocatorConnector.locate ( ConnectionFigure  connection) [inline, protected]

Definition at line 45 of file LocatorConnector.java.

                                                        {
        return fLocator.locate(owner());
    }

Here is the call graph for this function:

Figure CH.ifa.draw.standard.AbstractConnector.owner ( ) [inline, inherited]

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.LocatorConnector.read ( StorableInput  dr) throws IOException [inline]

Reads the arrow tip from a StorableInput.

Reimplemented from CH.ifa.draw.standard.AbstractConnector.

Definition at line 91 of file LocatorConnector.java.

                                                          {
        super.read(dr);
        fLocator = (Locator)dr.readStorable();
    }

Here is the caller graph for this function:

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

Stores the arrow tip to a StorableOutput.

Reimplemented from CH.ifa.draw.standard.AbstractConnector.

Definition at line 83 of file LocatorConnector.java.

                                         {
        super.write(dw);
        dw.writeStorable(fLocator);
    }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 28 of file LocatorConnector.java.

Definition at line 34 of file LocatorConnector.java.

final long CH.ifa.draw.standard.LocatorConnector.serialVersionUID = 5062833203337604181L [static, private]

Reimplemented from CH.ifa.draw.standard.AbstractConnector.

Definition at line 33 of file LocatorConnector.java.

The standard size of the connector.

The display box is centered around the located point.

Definition at line 26 of file LocatorConnector.java.


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