Runtime

org.eclipse.gmf.runtime.gef.ui.figures
Class SlidableAnchor

java.lang.Object
  extended by org.eclipse.draw2d.ConnectionAnchorBase
      extended by org.eclipse.draw2d.AbstractConnectionAnchor
          extended by org.eclipse.gmf.runtime.draw2d.ui.figures.BaseSlidableAnchor
              extended by org.eclipse.gmf.runtime.gef.ui.figures.SlidableAnchor
All Implemented Interfaces:
AncestorListener, ConnectionAnchor, OrthogonalConnectionAnchor
Direct Known Subclasses:
SlidableImageAnchor, SlidableOvalAnchor

public class SlidableAnchor
extends BaseSlidableAnchor

Provides the implementation of Slidable anchor


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
SlidableAnchor()
          Empty constructor
SlidableAnchor(IFigure f)
          Default constructor.
SlidableAnchor(IFigure f, PrecisionPoint p)
          Constructor.
 
Method Summary
protected  Rectangle getBox()
          Gets the anchors associated figure's bounding box in absolute coordinates.
 
Methods inherited from class org.eclipse.gmf.runtime.draw2d.ui.figures.BaseSlidableAnchor
equals, getAnchorRelativeLocation, getIntersectionPoints, getLocation, getLocation, getOrthogonalLocation, getPolygonPoints, getReferencePoint, getTerminal, hashCode, isDefaultAnchor, normalizeToStraightlineTolerance, parseTerminalString
 
Methods inherited from class org.eclipse.draw2d.AbstractConnectionAnchor
addAnchorListener, ancestorAdded, ancestorMoved, ancestorRemoved, getOwner, removeAnchorListener, setOwner
 
Methods inherited from class org.eclipse.draw2d.ConnectionAnchorBase
fireAnchorMoved
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.draw2d.ConnectionAnchor
addAnchorListener, getOwner, removeAnchorListener
 

Constructor Detail

SlidableAnchor

public SlidableAnchor()
Empty constructor


SlidableAnchor

public SlidableAnchor(IFigure f)
Default constructor. The anchor will have the center of the figure as the reference point

Parameters:
f - IFigure that this anchor is associated with.

SlidableAnchor

public SlidableAnchor(IFigure f,
                      PrecisionPoint p)
Constructor. Takes point p to store the reference point

Parameters:
f - IFigure that this anchor is associated with.
p - the PrecisionPoint that the anchor will initially attach to.
Method Detail

getBox

protected Rectangle getBox()
Gets the anchors associated figure's bounding box in absolute coordinates.

Overrides:
getBox in class BaseSlidableAnchor
Returns:
a Rectangle that is the bounding box of the owner figure in relative coordinates

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.