public abstract class AbstractConnectionAnchor extends ConnectionAnchorBase implements AncestorListener
AncestorListener.Stub
listeners
Constructor and Description |
---|
AbstractConnectionAnchor()
Constructs an AbstractConnectionAnchor with no owner.
|
AbstractConnectionAnchor(IFigure owner)
Constructs an AbstractConnectionAnchor with the owner supplied as input.
|
Modifier and Type | Method and Description |
---|---|
void |
addAnchorListener(AnchorListener listener)
Adds the given listener to the listeners to be notified of anchor
location changes.
|
void |
ancestorAdded(IFigure ancestor)
Called when an ancestor has been added into the listening figure's
hierarchy.
|
void |
ancestorMoved(IFigure figure)
Notifies all the listeners of this anchor's location change.
|
void |
ancestorRemoved(IFigure ancestor)
Called when an ancestor has been removed from the listening figure's
hierarchy.
|
IFigure |
getOwner()
Returns the owner Figure on which this anchor's location is dependent.
|
Point |
getReferencePoint()
Returns the point which is used as the reference by this
AbstractConnectionAnchor.
|
void |
removeAnchorListener(AnchorListener listener)
Removes the given listener from this anchor.
|
void |
setOwner(IFigure owner)
Sets the owner of this anchor, on whom this anchors location is
dependent.
|
fireAnchorMoved
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLocation
public AbstractConnectionAnchor()
public AbstractConnectionAnchor(IFigure owner)
owner
- Owner of this anchorpublic void addAnchorListener(AnchorListener listener)
addAnchorListener
in interface ConnectionAnchor
addAnchorListener
in class ConnectionAnchorBase
listener
- Listener to be addedremoveAnchorListener(AnchorListener)
public void ancestorMoved(IFigure figure)
ancestorMoved
in interface AncestorListener
figure
- Anchor-owning Figure which has movedAncestorListener.ancestorMoved(IFigure)
public void ancestorAdded(IFigure ancestor)
AncestorListener
ancestorAdded
in interface AncestorListener
ancestor
- The ancestor that was addedAncestorListener.ancestorAdded(IFigure)
public void ancestorRemoved(IFigure ancestor)
AncestorListener
ancestorRemoved
in interface AncestorListener
ancestor
- The ancestor that has been removedAncestorListener.ancestorRemoved(IFigure)
public IFigure getOwner()
getOwner
in interface ConnectionAnchor
setOwner(IFigure)
public Point getReferencePoint()
getReferencePoint
in interface ConnectionAnchor
ConnectionAnchor.getReferencePoint()
public void removeAnchorListener(AnchorListener listener)
removeAnchorListener
in interface ConnectionAnchor
removeAnchorListener
in class ConnectionAnchorBase
listener
- Listener to be removed from this anchors listeners listaddAnchorListener(AnchorListener)
public void setOwner(IFigure owner)
owner
- Owner of this anchorCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.