JHotDraw 6.0b1

org.jhotdraw.standard
Class LocatorConnector

java.lang.Object
  extended by org.jhotdraw.standard.AbstractConnector
      extended by org.jhotdraw.standard.LocatorConnector
All Implemented Interfaces:
java.io.Serializable, Connector, Storable
Direct Known Subclasses:
OffsetConnector

public class LocatorConnector
extends AbstractConnector

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, Serialized Form

Field Summary
protected  Locator myLocator
           
static int SIZE
          The standard size of the connector.
 
Fields inherited from class org.jhotdraw.standard.AbstractConnector
fOwner
 
Constructor Summary
LocatorConnector()
           
LocatorConnector(Figure owner, Locator l)
           
 
Method Summary
 boolean containsPoint(int x, int y)
          Tests if a point is contained in the connector.
 java.awt.Rectangle displayBox()
          Gets the display box of the connector.
 void draw(java.awt.Graphics g)
          Draws this connector.
 Locator getLocator()
           
 void read(StorableInput dr)
          Reads the arrow tip from a StorableInput.
protected  void setLocator(Locator newLocator)
           
 void write(StorableOutput dw)
          Stores the arrow tip to a StorableOutput.
 
Methods inherited from class org.jhotdraw.standard.AbstractConnector
connectorMovedTo, connectorVisibility, finalizeConnector, findEnd, findPoint, findStart, owner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIZE

public static final int SIZE
The standard size of the connector. The display box is centered around the located point.

See Also:
Constant Field Values

myLocator

protected Locator myLocator
Constructor Detail

LocatorConnector

public LocatorConnector()

LocatorConnector

public LocatorConnector(Figure owner,
                        Locator l)
Method Detail

containsPoint

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

Specified by:
containsPoint in interface Connector
Overrides:
containsPoint in class AbstractConnector

displayBox

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

Specified by:
displayBox in interface Connector
Overrides:
displayBox in class AbstractConnector

draw

public void draw(java.awt.Graphics g)
Draws this connector.

Specified by:
draw in interface Connector
Overrides:
draw in class AbstractConnector

write

public void write(StorableOutput dw)
Stores the arrow tip to a StorableOutput.

Specified by:
write in interface Storable
Overrides:
write in class AbstractConnector

read

public void read(StorableInput dr)
          throws java.io.IOException
Reads the arrow tip from a StorableInput.

Specified by:
read in interface Storable
Overrides:
read in class AbstractConnector
Throws:
java.io.IOException

setLocator

protected void setLocator(Locator newLocator)

getLocator

public Locator getLocator()

JHotDraw 6.0b1