Package 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,EllipseAnchor
public abstract class AbstractConnectionAnchor
extends ConnectionAnchorBase
implements AncestorListener
Provides support for anchors which depend on a figure for thier location.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.draw2d.AncestorListener
AncestorListener.Stub -
Field Summary
Fields inherited from class org.eclipse.draw2d.ConnectionAnchorBase
listeners -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an AbstractConnectionAnchor with no owner.AbstractConnectionAnchor(IFigure owner) Constructs an AbstractConnectionAnchor with the owner supplied as input. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnchorListener(AnchorListener listener) Adds the given listener to the listeners to be notified of anchor location changes.voidancestorAdded(IFigure ancestor) Called when an ancestor has been added into the listening figure's hierarchy.voidancestorMoved(IFigure figure) Notifies all the listeners of this anchor's location change.voidancestorRemoved(IFigure ancestor) Called when an ancestor has been removed from the listening figure's hierarchy.getOwner()Returns the owner Figure on which this anchor's location is dependent.Returns the point which is used as the reference by this AbstractConnectionAnchor.voidremoveAnchorListener(AnchorListener listener) Removes the given listener from this anchor.voidSets the owner of this anchor, on whom this anchors location is dependent.Methods inherited from class org.eclipse.draw2d.ConnectionAnchorBase
fireAnchorMovedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.draw2d.ConnectionAnchor
getLocation
-
Constructor Details
-
AbstractConnectionAnchor
public AbstractConnectionAnchor()Constructs an AbstractConnectionAnchor with no owner.- Since:
- 2.0
-
AbstractConnectionAnchor
Constructs an AbstractConnectionAnchor with the owner supplied as input.- Parameters:
owner- Owner of this anchor- Since:
- 2.0
-
-
Method Details
-
addAnchorListener
Adds the given listener to the listeners to be notified of anchor location changes.- Specified by:
addAnchorListenerin interfaceConnectionAnchor- Overrides:
addAnchorListenerin classConnectionAnchorBase- Parameters:
listener- Listener to be added- Since:
- 2.0
- See Also:
-
ancestorMoved
Notifies all the listeners of this anchor's location change.- Specified by:
ancestorMovedin interfaceAncestorListener- Parameters:
figure- Anchor-owning Figure which has moved- Since:
- 2.0
- See Also:
-
ancestorAdded
Description copied from interface:AncestorListenerCalled when an ancestor has been added into the listening figure's hierarchy.- Specified by:
ancestorAddedin interfaceAncestorListener- Parameters:
ancestor- The ancestor that was added- See Also:
-
ancestorRemoved
Description copied from interface:AncestorListenerCalled when an ancestor has been removed from the listening figure's hierarchy.- Specified by:
ancestorRemovedin interfaceAncestorListener- Parameters:
ancestor- The ancestor that has been removed- See Also:
-
getOwner
Returns the owner Figure on which this anchor's location is dependent.- Specified by:
getOwnerin interfaceConnectionAnchor- Returns:
- Owner of this anchor
- Since:
- 2.0
- See Also:
-
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.- Specified by:
getReferencePointin interfaceConnectionAnchor- Returns:
- The reference point of this anchor
- Since:
- 2.0
- See Also:
-
removeAnchorListener
Removes the given listener from this anchor. If all the listeners are removed, then this anchor removes itself from its owner.- Specified by:
removeAnchorListenerin interfaceConnectionAnchor- Overrides:
removeAnchorListenerin classConnectionAnchorBase- Parameters:
listener- Listener to be removed from this anchors listeners list- Since:
- 2.0
- See Also:
-
setOwner
Sets the owner of this anchor, on whom this anchors location is dependent.- Parameters:
owner- Owner of this anchor- Since:
- 2.0
-