Runtime

## org.eclipse.gmf.runtime.diagram.ui.services.decorator
Class AbstractDecorator

    java.lang.Object
      org.eclipse.gmf.runtime.diagram.ui.services.decorator.AbstractDecorator

All Implemented Interfaces:
  IDecorator

public abstract class AbstractDecorator
extends java.lang.Object
implements IDecorator

Abstract Decorator class. Clients can have their decorator subclass this to inherit utility methods for adding decoration figures.

See Also:
  `IDecorator`

Constructor Summary
`AbstractDecorator(IDecoratorTarget decoratorTarget)` Creates a new `AbstractDecorator` for the decorator target passed in.

Method Summary
`void` `deactivate()` Removes the decoration.
`org.eclipse.gmf.runtime.diagram.ui.internal.services.decorator.Decoration` `getDecoration()`
`protected DecorationEditPolicy.DecoratorTarget` `getDecoratorTarget()` Gets the object to be decorated.
`protected void` `removeDecoration()` Removes the decoration if it exists and sets it to null.
`void` `setDecoration(IDecoration decoration)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecorator
`activate, refresh`

Constructor Detail

### AbstractDecorator

    public AbstractDecorator(IDecoratorTarget decoratorTarget)

  Creates a new `AbstractDecorator` for the decorator target passed in.

Parameters:
  `decoratorTarget` - the object to be decorated

Method Detail

### getDecoratorTarget

    protected DecorationEditPolicy.DecoratorTarget getDecoratorTarget()

  Gets the object to be decorated.

  Returns:
    Returns the object to be decorated

### getDecoration

    public org.eclipse.gmf.runtime.diagram.ui.internal.services.decorator.Decoration getDecoration()

  Returns:
    Returns the decoration.

### setDecoration

    public void setDecoration(IDecoration decoration)

  Parameters:
    `decoration` - The decoration to set.

### removeDecoration

    protected void removeDecoration()

  Removes the decoration if it exists and sets it to null.

### deactivate

    public void deactivate()

  Removes the decoration.

  Specified by:
    `deactivate` in interface `IDecorator`
  See Also:
    `IDecorator.deactivate()`

Runtime

Guidelines for using Eclipse APIs.

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