public class TypedDecorator extends FigureDecorator
Red |
Constructor and Description |
---|
TypedDecorator()
A typed decorator that uses a BasicHighlighter
as its default.
|
TypedDecorator(FigureDecorator defaultDecorator)
A typed decorator with the given decorator
as its default.
|
Modifier and Type | Method and Description |
---|---|
void |
addDecorator(java.lang.Class c,
FigureDecorator d)
Add a decorator which is duplicated when an object of the given
class is passed to the newInstance() method.
|
FigureDecorator |
newInstance(Figure f)
Return a new decorator, according to the type of the figure.
|
void |
removeDecorator(java.lang.Class c)
Remove a decorator.
|
void |
setParent(CanvasComponent fc)
Throw an exception.
|
add, contains, figures, figuresFromBack, figuresFromFront, getBounds, getChild, getContainer, getDecoratedFigure, getFigureCount, getShape, hit, paint, remove, replaceChild, setChild, transform, translate
decorate, pick, pick, repaint, undecorate
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, intersects, isVisible, paint, repaint, setInteractor, setToolTipText, setUserObject, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isVisible, paint, setVisible
getParent, getTransformContext, repaint
public TypedDecorator()
public TypedDecorator(FigureDecorator defaultDecorator)
public void addDecorator(java.lang.Class c, FigureDecorator d)
public FigureDecorator newInstance(Figure f)
newInstance
in class FigureDecorator
public void removeDecorator(java.lang.Class c)
public void setParent(CanvasComponent fc)
setParent
in interface Figure
setParent
in class AbstractFigure
fc
- The parent of the figure.Figure.getParent()