Interface DecoratedFigure

All Superinterfaces:
java.lang.Cloneable, DOMStorable, Figure,
All Known Implementing Classes:
AbstractAttributedDecoratedFigure, ImageFigure, LabelFigure, NodeFigure, TextAreaFigure, TextFigure

public interface DecoratedFigure
extends Figure

A decorated figure can be decorated with another Figure, for example to draw a border around the decorated figure.

Design Patterns

Decorated figures can be adorned with another figure.
Component: DecoratedFigure; Decorator: Figure.

$Id: 527 2009-06-07 14:28:19Z rawcoder $
Werner Randelshofer

Method Summary
 Figure getDecorator()
          Gets the decorator for this figure.
 void setDecorator(Figure newValue)
          Sets a decorator Figure, for example a visual adornment to this Figure.
Methods inherited from interface org.jhotdraw.draw.Figure
addFigureListener, addNotify, canConnect, changed, clone, contains, createHandles, draw, findCompatibleConnector, findConnector, findFigureInside, get, getActions, getAttributes, getAttributesRestoreData, getBounds, getConnectors, getCursor, getDecomposition, getDrawingArea, getEndPoint, getLayer, getPreferredSize, getStartPoint, getTool, getToolTipText, getTransformRestoreData, handleDrop, handleMouseClick, includes, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, removeNotify, requestRemove, restoreAttributesTo, restoreTransformTo, set, setBounds, transform, willChange
Methods inherited from interface org.jhotdraw.xml.DOMStorable
read, write

Method Detail


void setDecorator(Figure newValue)
Sets a decorator Figure, for example a visual adornment to this Figure. Set this to null, if no decorator is desired. The decorator uses the same logical bounds as this Figure plus AttributeKeys.DECORATOR_INSETS. The decorator does not handle events. The decorator is drawn when the figure is drawn.


Figure getDecorator()
Gets the decorator for this figure.