JHotDraw 7.5.1

org.jhotdraw.draw
Interface DecoratedFigure

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

@NotNull
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

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

Strategy
RelativeDecoratorLocator encapsulates a strategy for locating a point on a decorator.
Component: DecoratedFigure; Strategy: RelativeDecoratorLocator.


Version:
$Id: DecoratedFigure.java 654 2010-06-25 13:27:08Z rawcoder $
Author:
Werner Randelshofer

Field Summary
 
Fields inherited from interface org.jhotdraw.draw.Figure
CONNECTABLE_PROPERTY, REMOVABLE_PROPERTY, SELECTABLE_PROPERTY, TRANSFORMABLE_PROPERTY
 
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, addPropertyChangeListener, 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, isConnectable, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, removeNotify, removePropertyChangeListener, requestRemove, restoreAttributesTo, restoreTransformTo, set, setBounds, transform, willChange
 

Method Detail

setDecorator

void setDecorator(@Nullable
                  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.


getDecorator

@Nullable
Figure getDecorator()
Gets the decorator for this figure.


Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.