All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class CH.ifa.draw.standard.DecoratorFigure

java.lang.Object
   |
   +----CH.ifa.draw.standard.AbstractFigure
           |
           +----CH.ifa.draw.standard.DecoratorFigure

public abstract class DecoratorFigure
extends AbstractFigure
implements FigureChangeListener
DecoratorFigure can be used to decorate other figures with decorations like borders. Decorator forwards all the methods to their contained figure. Subclasses can selectively override these methods to extend and filter their behavior.
Design Patterns

 o Decorator
DecoratorFigure is a decorator.

See Also:
Figure

Variable Index

 o fComponent
The decorated figure.

Constructor Index

 o DecoratorFigure()
 o DecoratorFigure(Figure)
Constructs a DecoratorFigure and decorates the passed in figure.

Method Index

 o basicDisplayBox(Point, Point)
Forwards basicDisplayBox to its contained figure.
 o basicMoveBy(int, int)
Forwards basicMoveBy to its contained figure.
 o canConnect()
Forwards the canConnect to its contained figure..
 o connectedTextLocator(Figure)
Returns the locator used to located connected text.
 o connectionInsets()
Forwards the connection insets to its contained figure..
 o connectorAt(int, int)
Returns the Connector for the given location.
 o connectorVisibility(boolean)
Forwards the connector visibility request to its component.
 o containsPoint(int, int)
Forwards containsPoint to its contained figure.
 o decompose()
Forwards decompose to its contained figure.
 o decorate(Figure)
Decorates the given figure.
 o displayBox()
Forwards displayBox to its contained figure.
 o draw(Graphics)
Forwards draw to its contained figure.
 o figureChanged(FigureChangeEvent)
 o figureInvalidated(FigureChangeEvent)
Propagates invalidate up the container chain.
 o figureRemoved(FigureChangeEvent)
 o figureRequestRemove(FigureChangeEvent)
Propagates the removeFromDrawing request up to the container.
 o figureRequestUpdate(FigureChangeEvent)
Propagates figureRequestUpdate up the container chain.
 o figures()
Forwards figures to its contained figure.
 o findFigureInside(int, int)
Forwards findFigureInside to its contained figure.
 o getAttribute(String)
Forwards getAttribute to its contained figure.
 o handles()
Forwards handles to its contained figure.
 o includes(Figure)
Forwards includes to its contained figure.
 o moveBy(int, int)
Forwards moveBy to its contained figure.
 o peelDecoration()
Removes the decoration from the contained figure.
 o read(StorableInput)
Reads itself and the contained figure from the StorableInput.
 o release()
Releases itself and the contained figure.
 o setAttribute(String, Object)
Forwards setAttribute to its contained figure.
 o write(StorableOutput)
Writes itself and the contained figure to the StorableOutput.

Variables

 o fComponent
 protected Figure fComponent
The decorated figure.

Constructors

 o DecoratorFigure
 public DecoratorFigure()
 o DecoratorFigure
 public DecoratorFigure(Figure figure)
Constructs a DecoratorFigure and decorates the passed in figure.

Methods

 o connectionInsets
 public Insets connectionInsets()
Forwards the connection insets to its contained figure..

Overrides:
connectionInsets in class AbstractFigure
 o canConnect
 public boolean canConnect()
Forwards the canConnect to its contained figure..

Overrides:
canConnect in class AbstractFigure
 o containsPoint
 public boolean containsPoint(int x,
                              int y)
Forwards containsPoint to its contained figure.

Overrides:
containsPoint in class AbstractFigure
 o decorate
 public void decorate(Figure figure)
Decorates the given figure.

 o peelDecoration
 public Figure peelDecoration()
Removes the decoration from the contained figure.

 o displayBox
 public Rectangle displayBox()
Forwards displayBox to its contained figure.

Overrides:
displayBox in class AbstractFigure
 o basicDisplayBox
 public void basicDisplayBox(Point origin,
                             Point corner)
Forwards basicDisplayBox to its contained figure.

Overrides:
basicDisplayBox in class AbstractFigure
 o draw
 public void draw(Graphics g)
Forwards draw to its contained figure.

Overrides:
draw in class AbstractFigure
 o findFigureInside
 public Figure findFigureInside(int x,
                                int y)
Forwards findFigureInside to its contained figure.

Overrides:
findFigureInside in class AbstractFigure
 o handles
 public Vector handles()
Forwards handles to its contained figure.

Overrides:
handles in class AbstractFigure
 o includes
 public boolean includes(Figure figure)
Forwards includes to its contained figure.

Overrides:
includes in class AbstractFigure
 o moveBy
 public void moveBy(int x,
                    int y)
Forwards moveBy to its contained figure.

Overrides:
moveBy in class AbstractFigure
 o basicMoveBy
 protected void basicMoveBy(int x,
                            int y)
Forwards basicMoveBy to its contained figure.

Overrides:
basicMoveBy in class AbstractFigure
 o release
 public void release()
Releases itself and the contained figure.

Overrides:
release in class AbstractFigure
 o figureInvalidated
 public void figureInvalidated(FigureChangeEvent e)
Propagates invalidate up the container chain.

See Also:
FigureChangeListener
 o figureChanged
 public void figureChanged(FigureChangeEvent e)
 o figureRemoved
 public void figureRemoved(FigureChangeEvent e)
 o figureRequestUpdate
 public void figureRequestUpdate(FigureChangeEvent e)
Propagates figureRequestUpdate up the container chain.

See Also:
FigureChangeListener
 o figureRequestRemove
 public void figureRequestRemove(FigureChangeEvent e)
Propagates the removeFromDrawing request up to the container.

See Also:
FigureChangeListener
 o figures
 public FigureEnumeration figures()
Forwards figures to its contained figure.

Overrides:
figures in class AbstractFigure
 o decompose
 public FigureEnumeration decompose()
Forwards decompose to its contained figure.

Overrides:
decompose in class AbstractFigure
 o setAttribute
 public void setAttribute(String name,
                          Object value)
Forwards setAttribute to its contained figure.

Overrides:
setAttribute in class AbstractFigure
 o getAttribute
 public Object getAttribute(String name)
Forwards getAttribute to its contained figure.

Overrides:
getAttribute in class AbstractFigure
 o connectedTextLocator
 public Locator connectedTextLocator(Figure text)
Returns the locator used to located connected text.

Overrides:
connectedTextLocator in class AbstractFigure
 o connectorAt
 public Connector connectorAt(int x,
                              int y)
Returns the Connector for the given location.

Overrides:
connectorAt in class AbstractFigure
 o connectorVisibility
 public void connectorVisibility(boolean isVisible)
Forwards the connector visibility request to its component.

Overrides:
connectorVisibility in class AbstractFigure
 o write
 public void write(StorableOutput dw)
Writes itself and the contained figure to the StorableOutput.

Overrides:
write in class AbstractFigure
 o read
 public void read(StorableInput dr) throws IOException
Reads itself and the contained figure from the StorableInput.

Overrides:
read in class AbstractFigure

All Packages  Class Hierarchy  This Package  Previous  Next  Index