org.eclipse.gmf.runtime.lite.edit.parts.decorations
Class ConnectionDecorationManager

java.lang.Object
  extended by org.eclipse.gmf.runtime.lite.edit.parts.decorations.AbstractDecorationManager
      extended by org.eclipse.gmf.runtime.lite.edit.parts.decorations.ConnectionDecorationManager
All Implemented Interfaces:
IDecorationManager

public class ConnectionDecorationManager
extends AbstractDecorationManager

Decoration manager that places decorations over the given connection figure. The actual position of the decoration is controlled by the getDecorationPosition(String) method.

Author:
bblajer

Nested Class Summary
static class ConnectionDecorationManager.DecorationPosition
           
 
Constructor Summary
ConnectionDecorationManager(org.eclipse.draw2d.Connection decorationParent)
           
 
Method Summary
protected  Object getConstraint(String key, org.eclipse.draw2d.IFigure decoration)
          Returns the constraint with which the decoration will be added to the parent figure.
protected  ConnectionDecorationManager.DecorationPosition getDecorationPosition(String key)
          Returns the position where the decorator with the given key should appear.
 
Methods inherited from class org.eclipse.gmf.runtime.lite.edit.parts.decorations.AbstractDecorationManager
getDecoration, getDecorationParent, installDecoration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionDecorationManager

public ConnectionDecorationManager(org.eclipse.draw2d.Connection decorationParent)
Method Detail

getConstraint

protected Object getConstraint(String key,
                               org.eclipse.draw2d.IFigure decoration)
Description copied from class: AbstractDecorationManager
Returns the constraint with which the decoration will be added to the parent figure.

Specified by:
getConstraint in class AbstractDecorationManager
Returns:

getDecorationPosition

protected ConnectionDecorationManager.DecorationPosition getDecorationPosition(String key)
Returns the position where the decorator with the given key should appear. By default, all decorators are positioned in the center of the connection Subclasses may reimplement.

Parameters:
key - the key which is used to install the decorator


Copyright © 2012. All Rights Reserved.