JHotDraw 6.0b1

org.jhotdraw.figures
Class BorderDecorator

java.lang.Object
  extended by org.jhotdraw.standard.AbstractFigure
      extended by org.jhotdraw.standard.DecoratorFigure
          extended by org.jhotdraw.figures.BorderDecorator
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.EventListener, Figure, FigureChangeListener, Storable

public class BorderDecorator
extends DecoratorFigure

BorderDecorator decorates an arbitrary Figure with a border.

See Also:
Serialized Form

Constructor Summary
BorderDecorator()
           
BorderDecorator(Figure figure)
           
 
Method Summary
 java.awt.Insets connectionInsets()
          Forwards the connection insets to its contained figure..
 java.awt.Rectangle displayBox()
          Gets the displaybox including the border.
 void draw(java.awt.Graphics g)
          Draws a the figure and decorates it with a border.
 void figureInvalidated(FigureChangeEvent e)
          Invalidates the figure extended by its border.
 java.awt.Point getBorderOffset()
           
protected  void initialize()
          Performs additional initialization code before the figure is decorated Subclasses may override this method.
 void setBorderOffset(java.awt.Point newBorderOffset)
           
 
Methods inherited from class org.jhotdraw.standard.DecoratorFigure
addDependendFigure, basicDisplayBox, basicMoveBy, canConnect, connectedTextLocator, connectorAt, connectorVisibility, containsPoint, decompose, decorate, figureChanged, figureRemoved, figureRequestRemove, figureRequestUpdate, figures, findFigureInside, getAttribute, getAttribute, getDecoratedFigure, getDependendFigures, getTextHolder, handles, includes, moveBy, peelDecoration, read, release, removeDependendFigure, setAttribute, setAttribute, setDecoratedFigure, write
 
Methods inherited from class org.jhotdraw.standard.AbstractFigure
addFigureChangeListener, addToContainer, center, changed, clone, displayBox, displayBox, getZValue, invalidate, invalidateRectangle, isEmpty, listener, removeFigureChangeListener, removeFromContainer, setZValue, size, visit, willChange
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BorderDecorator

public BorderDecorator()

BorderDecorator

public BorderDecorator(Figure figure)
Method Detail

initialize

protected void initialize()
Performs additional initialization code before the figure is decorated Subclasses may override this method.

Overrides:
initialize in class DecoratorFigure

setBorderOffset

public void setBorderOffset(java.awt.Point newBorderOffset)

getBorderOffset

public java.awt.Point getBorderOffset()

draw

public void draw(java.awt.Graphics g)
Draws a the figure and decorates it with a border.

Specified by:
draw in interface Figure
Overrides:
draw in class DecoratorFigure
Parameters:
g - the Graphics to draw into

displayBox

public java.awt.Rectangle displayBox()
Gets the displaybox including the border.

Specified by:
displayBox in interface Figure
Overrides:
displayBox in class DecoratorFigure
See Also:
Figure.basicDisplayBox(java.awt.Point, java.awt.Point)

figureInvalidated

public void figureInvalidated(FigureChangeEvent e)
Invalidates the figure extended by its border.

Specified by:
figureInvalidated in interface FigureChangeListener
Overrides:
figureInvalidated in class DecoratorFigure
See Also:
FigureChangeListener

connectionInsets

public java.awt.Insets connectionInsets()
Description copied from class: DecoratorFigure
Forwards the connection insets to its contained figure..

Specified by:
connectionInsets in interface Figure
Overrides:
connectionInsets in class DecoratorFigure

JHotDraw 6.0b1