CH.ifa.draw.figures
Class BorderDecorator
java.lang.Object
CH.ifa.draw.standard.AbstractFigure
CH.ifa.draw.standard.DecoratorFigure
CH.ifa.draw.figures.BorderDecorator
- All Implemented Interfaces:
- Figure, FigureChangeListener, Storable, java.io.Serializable, java.lang.Cloneable, java.util.EventListener
public class BorderDecorator
- extends DecoratorFigure
BorderDecorator decorates an arbitrary Figure with
a border.
- See Also:
- Serialized Form
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 CH.ifa.draw.standard.DecoratorFigure |
basicDisplayBox, basicMoveBy, canConnect, connectedTextLocator, connectorAt, connectorVisibility, containsPoint, decompose, decorate, figureChanged, figureRemoved, figureRequestRemove, figureRequestUpdate, figures, findFigureInside, getAttribute, handles, includes, moveBy, peelDecoration, read, release, setAttribute, write |
Methods inherited from class CH.ifa.draw.standard.AbstractFigure |
addFigureChangeListener, addToContainer, center, changed, clone, displayBox, displayBox, invalidate, isEmpty, listener, removeFigureChangeListener, removeFromContainer, size, willChange |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BorderDecorator
public BorderDecorator()
BorderDecorator
public BorderDecorator(Figure figure)
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