org.eclipse.draw2d
Class AbstractConnectionAnchor
java.lang.Object
|
+--org.eclipse.draw2d.ConnectionAnchorBase
|
+--org.eclipse.draw2d.AbstractConnectionAnchor
- All Implemented Interfaces:
- AncestorListener, ConnectionAnchor
- Direct Known Subclasses:
- ChopboxAnchor
- public abstract class AbstractConnectionAnchor
- extends ConnectionAnchorBase
- implements AncestorListener
Provides support for anchors which depend on a figure
for thier location.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractConnectionAnchor
public AbstractConnectionAnchor()
- Constructs an AbstractConnectionAnchor with no owner.
- Since:
- 2.0
AbstractConnectionAnchor
public AbstractConnectionAnchor(IFigure owner)
- Constructs an AbstractConnectionAnchor with the owner
supplied as input.
- Parameters:
owner - Owner of this anchor.- Since:
- 2.0
addAnchorListener
public void addAnchorListener(AnchorListener listener)
- Adds the given listener to the listeners to be
notified of anchor location changes.
- Overrides:
addAnchorListener in class ConnectionAnchorBase
- Parameters:
listener - Listener to be added.- Since:
- 2.0
- See Also:
removeAnchorListener(AnchorListener)
ancestorMoved
public void ancestorMoved(IFigure figure)
- Notifies all the listeners of this anchor's location change.
- Specified by:
ancestorMoved in interface AncestorListener
- Parameters:
figure - Anchor-owning Figure which has moved.- Since:
- 2.0
ancestorAdded
public void ancestorAdded(IFigure ancestor)
- Description copied from interface:
AncestorListener
- Called when an ancestor has been added into the listening
figure's hierarchy.
- Specified by:
ancestorAdded in interface AncestorListener
ancestorRemoved
public void ancestorRemoved(IFigure ancestor)
- Description copied from interface:
AncestorListener
- Called when an ancestor has been removed from the listening
figure's hierarchy.
- Specified by:
ancestorRemoved in interface AncestorListener
getOwner
public IFigure getOwner()
- Returns the owner Figure on which this anchor's
location is dependent.
- Returns:
- Owner of this anchor.
- Since:
- 2.0
- See Also:
setOwner(IFigure)
getReferencePoint
public Point getReferencePoint()
- Returns the point which is used as the reference by this
AbstractConnectionAnchor. It is generally dependent on the Figure
which is the owner of this AbstractConnectionAnchor.
- Returns:
- The reference point of this anchor.
- Since:
- 2.0
removeAnchorListener
public void removeAnchorListener(AnchorListener listener)
- Removes the given listener from this anchor.
If all the listeners are removed, then this anchor
removes itself from its owner.
- Overrides:
removeAnchorListener in class ConnectionAnchorBase
- Parameters:
listener - Listener to be removed from this anchors listeners list.- Since:
- 2.0
- See Also:
addAnchorListener(AnchorListener)
setOwner
public void setOwner(IFigure owner)
- Sets the owner of this anchor, on whom this anchors location
is dependent.
- Parameters:
owner - Owner of this anchor.- Since:
- 2.0