Runtime

## org.eclipse.gmf.runtime.draw2d.ui.figures
Interface IAnchorableFigure

All Known Subinterfaces:
  IPolygonAnchorableFigure

All Known Implementing Classes:
  NodeFigure, PolylineConnectionEx

public interface IAnchorableFigure

Interface class for figures that are anchorable to other figures.

Method Summary
`ConnectionAnchor` `getConnectionAnchor(java.lang.String terminal)` Given a string identifier, return the associated anchor for that identifier
`java.lang.String` `getConnectionAnchorTerminal(ConnectionAnchor c)` Dynamically allocates a new anchor if needed.
`ConnectionAnchor` `getSourceConnectionAnchorAt(Point p)` Gets the source connection anchor at a given point on the figure.
`ConnectionAnchor` `getTargetConnectionAnchorAt(Point p)` Gets the target connection anchor at a given point on the figure.

Method Detail

### getConnectionAnchor

    public ConnectionAnchor getConnectionAnchor(java.lang.String terminal)

  Given a string identifier, return the associated anchor for that identifier

  Parameters:
    `terminal` - `String` identifier associated with the anchor
  Returns:
    `ConnectionAnchor` that is associated with the given string.

### getConnectionAnchorTerminal

    public java.lang.String getConnectionAnchorTerminal(ConnectionAnchor c)

  Dynamically allocates a new anchor if needed. Otherwise, recycles old anchors no longer in use.

  Parameters:
    `c` - the `ConnectionAnchor` reference to an anchor associated with the given point on the figure
  Returns:
    a `String` that represents the anchor identifier.

### getSourceConnectionAnchorAt

    public ConnectionAnchor getSourceConnectionAnchorAt(Point p)

  Gets the source connection anchor at a given point on the figure.

  Parameters:
    `p` - `Point` on the figure that gives a hint which anchor to return.
  Returns:
    a `ConnectionAnchor` reference to an anchor associated with the given point on the figure.

### getTargetConnectionAnchorAt

    public ConnectionAnchor getTargetConnectionAnchorAt(Point p)

  Gets the target connection anchor at a given point on the figure.

  Parameters:
    `p` - `Point` on the figure that gives a hint which anchor to return.
  Returns:
    `ConnectionAnchor` reference to an anchor associated with the given point on the figure.

Runtime

Guidelines for using Eclipse APIs.

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