|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
An object that can be decorated. The decorator target is an adaptable.
Minimally, it adapts to an EditPart and
org.eclipse.uml2.Element if the shape/connection has an
underlying element.
Here is an example:
theDecoratorTarget.getAdapter(EditPart.class)
This interface is not intended to be implemented by clients as new methods may be added in the future.
| Nested Class Summary | |
static class |
IDecoratorTarget.Direction
Enumeration of directions for the location of shape decorations. |
| Method Summary | |
IDecoration |
addConnectionDecoration(IFigure figure,
int percentageFromSource,
boolean isVolatile)
Adds a figure as a decoration on a connection. |
IDecoration |
addConnectionDecoration(Image image,
int percentageFromSource,
boolean isVolatile)
Adds an image as a decoration on a connection. |
IDecoration |
addDecoration(IFigure figure,
Locator locator,
boolean isVolatile)
Adds a figure as a decoration on a shape or connection. |
IDecoration |
addShapeDecoration(IFigure figure,
IDecoratorTarget.Direction direction,
int margin,
boolean isVolatile)
Adds a figure as a decoration on a shape. |
IDecoration |
addShapeDecoration(Image image,
IDecoratorTarget.Direction direction,
int margin,
boolean isVolatile)
Adds an image as a decoration on a shape. |
void |
installDecorator(java.lang.Object key,
IDecorator decorator)
Installs a decorator on this decorator target using a key (a String identifier). |
void |
removeDecoration(IDecoration decoration)
Removes the decoration from the shape or connection it has been added to. |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
| Method Detail |
public void installDecorator(java.lang.Object key,
IDecorator decorator)
key - the key for the decorator, used to override a decorator
previously installed on this decoratorTarget objectdecorator - the decorator to install
public IDecoration addShapeDecoration(Image image,
IDecoratorTarget.Direction direction,
int margin,
boolean isVolatile)
image - The image to be used as the decoration.direction - The direction relative to the shape to place the decoration.margin - The margin is the space, in himetric units, between the
shape's edge and the decoration. A positive margin will place
the figure outside the shape, a negative margin will place the
decoration inside the shape.isVolatile - True if this decoration is volatile (i.e. not to be included
in the printed output of a diagram); false otherwise.
public IDecoration addConnectionDecoration(Image image,
int percentageFromSource,
boolean isVolatile)
image - The image to be used as the decoration.percentageFromSource - The percentage of the connection length away from the source
end (range is from 0 to 100) where the decoration should be
positioned.isVolatile - True if this decoration is volatile (i.e. not to be included
in the printed output of a diagram); false otherwise.
public void removeDecoration(IDecoration decoration)
decoration - The decoration to be removed.
public IDecoration addShapeDecoration(IFigure figure,
IDecoratorTarget.Direction direction,
int margin,
boolean isVolatile)
figure - the figure to be used as the decorationdirection - The direction relative to the shape to place the
decoration.margin - The margin is the space, in himetric units, between the
shape's edge and the decoration. A positive margin will
place the figure outside the shape, a negative margin will
place the decoration inside the shape.isVolatile - True if this decoration is volatile (i.e. not to be
included in the printed output of a diagram); false
otherwise.
public IDecoration addConnectionDecoration(IFigure figure,
int percentageFromSource,
boolean isVolatile)
figure - the figure to be used as the decorationpercentageFromSource - The percentage of the connection length away from the
source end (range is from 0 to 100) where the decoration
should be positioned.isVolatile - True if this decoration is volatile (i.e. not to be
included in the printed output of a diagram); false
otherwise.
public IDecoration addDecoration(IFigure figure,
Locator locator,
boolean isVolatile)
figure - the figure to be used as the decorationlocator - The locator to be used to position the decorationisVolatile - True if this decoration is volatile (i.e. not to be
included in the printed output of a diagram); false
otherwise.
|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.