org.jhotdraw.figures
Class BorderDecorator
java.lang.Object
org.jhotdraw.standard.AbstractFigure
org.jhotdraw.standard.DecoratorFigure
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.
- Version:
- <$CURRENT_VERSION$>
- See Also:
- Serialized Form
Methods inherited from class org.jhotdraw.standard.DecoratorFigure |
addDependendFigure, basicDisplayBox, 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, isEmpty, listener, removeFigureChangeListener, removeFromContainer, setZValue, size, visit, willChange |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BorderDecorator
public BorderDecorator()
BorderDecorator
public BorderDecorator(Figure figure)
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