Runtime

## org.eclipse.gmf.runtime.gef.ui.figures
Class SlidableImageAnchor

    java.lang.Object
      org.eclipse.draw2d.ConnectionAnchorBase
          org.eclipse.draw2d.AbstractConnectionAnchor
              org.eclipse.gmf.runtime.draw2d.ui.figures.BaseSlidableAnchor
                  org.eclipse.gmf.runtime.gef.ui.figures.SlidableAnchor
                      org.eclipse.gmf.runtime.gef.ui.figures.SlidableImageAnchor

All Implemented Interfaces:
  AncestorListener, ConnectionAnchor, IImageFigure.ImageChangedListener, OrthogonalConnectionAnchor

    public class SlidableImageAnchor

extends SlidableAnchor
implements IImageFigure.ImageChangedListener

Implements sliding connection anchor functionality for Image figures

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
`SlidableImageAnchor()` Empty constructor
`SlidableImageAnchor(IFigure f)` Dumb default constructor, for which reference point is at the center of the figure
`SlidableImageAnchor(IFigure container, IImageFigure imageFig)` Default constructor, for which reference point is at the cneter of the figure
`SlidableImageAnchor(IFigure f, IImageFigure imageFig, PrecisionPoint p)` Constructor, for which reference point is specified

Method Summary
`void` `addAnchorListener(AnchorListener listener)`
`protected IFigure` `getContainer()` Returns bounds of the figure.
`protected Image` `getImage()` Returns the image.
`protected Point` `getLocation(Point ownReference, Point foreignReference)` Calculates the location of the anchor depending on the anchors own reference and foreign reference points
`void` `imageChanged()`
`void` `removeAnchorListener(AnchorListener listener)`

Methods inherited from class org.eclipse.gmf.runtime.gef.ui.figures.SlidableAnchor
`getBox`

Methods inherited from class org.eclipse.gmf.runtime.draw2d.ui.figures.BaseSlidableAnchor
`equals, getAnchorRelativeLocation, getIntersectionPoints, getLocation, getOrthogonalLocation, getPolygonPoints, getReferencePoint, getTerminal, hashCode, isDefaultAnchor, normalizeToStraightlineTolerance, parseTerminalString`

Methods inherited from class org.eclipse.draw2d.AbstractConnectionAnchor
`ancestorAdded, ancestorMoved, ancestorRemoved, getOwner, 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
`getOwner`

Constructor Detail

### SlidableImageAnchor

    public SlidableImageAnchor()

  Empty constructor

### SlidableImageAnchor

    public SlidableImageAnchor(IFigure f)

  Dumb default constructor, for which reference point is at the center of the figure

  Parameters:
    `f` - the `IFigure` bounding figure

### SlidableImageAnchor

    public SlidableImageAnchor(IFigure container,
                               IImageFigure imageFig)

  Default constructor, for which reference point is at the cneter of the figure

  Parameters:
    `container` - the `IFigure` bounding figure
    `imageFig` - the `ImageFigure` inside the bounding figure

### SlidableImageAnchor

    public SlidableImageAnchor(IFigure f,
                               IImageFigure imageFig,
                               PrecisionPoint p)

  Constructor, for which reference point is specified

  Parameters:
    `f` - the `IFigure` bounding figure
    `imageFig` - the `ImageFigure` inside the bounding figure
    `p` - the `PrecisionPoint` relative reference

Method Detail

### addAnchorListener

    public void addAnchorListener(AnchorListener listener)

  Specified by:
    `addAnchorListener` in interface `ConnectionAnchor`
  Overrides:
    `addAnchorListener` in class `AbstractConnectionAnchor`

### removeAnchorListener

    public void removeAnchorListener(AnchorListener listener)

  Specified by:
    `removeAnchorListener` in interface `ConnectionAnchor`
  Overrides:
    `removeAnchorListener` in class `AbstractConnectionAnchor`

### getImage

    protected Image getImage()

  Returns the image.

  Returns:
    the `Image` object

### getContainer

    protected IFigure getContainer()

  Returns bounds of the figure.

  Returns:
    the owner figure

### getLocation

    protected Point getLocation(Point ownReference,
                                Point foreignReference)

  Description copied from class: `BaseSlidableAnchor`
  Calculates the location of the anchor depending on the anchors own reference and foreign reference points

  Overrides:
    `getLocation` in class `BaseSlidableAnchor`
  Parameters:
    `ownReference` - - the own reference of the anchor
    `foreignReference` - - foreign reference that comes in
  Returns:
    the location of the anchor depending on the anchors own reference and foreign reference points

### imageChanged

    public void imageChanged()

  Specified by:
    `imageChanged` in interface `IImageFigure.ImageChangedListener`
  Since:
    1.4

Runtime

Guidelines for using Eclipse APIs.

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