|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCH.ifa.draw.standard.AbstractFigure
CH.ifa.draw.standard.DecoratorFigure
public abstract class DecoratorFigure
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.
Decorator
DecoratorFigure is a decorator.
Figure,
Serialized Form| Field Summary | |
|---|---|
protected Figure |
fComponent
The decorated figure. |
| Fields inherited from interface CH.ifa.draw.framework.Figure |
|---|
POPUP_MENU |
| Constructor Summary | |
|---|---|
DecoratorFigure()
|
|
DecoratorFigure(Figure figure)
Constructs a DecoratorFigure and decorates the passed in figure. |
|
| Method Summary | |
|---|---|
void |
basicDisplayBox(java.awt.Point origin,
java.awt.Point corner)
Forwards basicDisplayBox to its contained figure. |
protected void |
basicMoveBy(int x,
int y)
Forwards basicMoveBy to its contained figure. |
boolean |
canConnect()
Forwards the canConnect to its contained figure.. |
Locator |
connectedTextLocator(Figure text)
Returns the locator used to located connected text. |
java.awt.Insets |
connectionInsets()
Forwards the connection insets to its contained figure.. |
Connector |
connectorAt(int x,
int y)
Returns the Connector for the given location. |
void |
connectorVisibility(boolean isVisible)
Forwards the connector visibility request to its component. |
boolean |
containsPoint(int x,
int y)
Forwards containsPoint to its contained figure. |
FigureEnumeration |
decompose()
Forwards decompose to its contained figure. |
void |
decorate(Figure figure)
Decorates the given figure. |
java.awt.Rectangle |
displayBox()
Forwards displayBox to its contained figure. |
void |
draw(java.awt.Graphics g)
Forwards draw to its contained figure. |
void |
figureChanged(FigureChangeEvent e)
Sent when a figure changed |
void |
figureInvalidated(FigureChangeEvent e)
Propagates invalidate up the container chain. |
void |
figureRemoved(FigureChangeEvent e)
Sent when a figure was removed |
void |
figureRequestRemove(FigureChangeEvent e)
Propagates the removeFromDrawing request up to the container. |
void |
figureRequestUpdate(FigureChangeEvent e)
Propagates figureRequestUpdate up the container chain. |
FigureEnumeration |
figures()
Forwards figures to its contained figure. |
Figure |
findFigureInside(int x,
int y)
Forwards findFigureInside to its contained figure. |
java.lang.Object |
getAttribute(java.lang.String name)
Forwards getAttribute to its contained figure. |
java.util.Vector |
handles()
Forwards handles to its contained figure. |
boolean |
includes(Figure figure)
Forwards includes to its contained figure. |
protected void |
initialize()
Performs additional initialization code before the figure is decorated. |
void |
moveBy(int x,
int y)
Forwards moveBy to its contained figure. |
Figure |
peelDecoration()
Removes the decoration from the contained figure. |
void |
read(StorableInput dr)
Reads itself and the contained figure from the StorableInput. |
void |
release()
Releases itself and the contained figure. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Forwards setAttribute to its contained figure. |
void |
write(StorableOutput dw)
Writes itself and the contained figure to the StorableOutput. |
| 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 |
| Field Detail |
|---|
protected Figure fComponent
| Constructor Detail |
|---|
public DecoratorFigure()
public DecoratorFigure(Figure figure)
| Method Detail |
|---|
protected void initialize()
public java.awt.Insets connectionInsets()
connectionInsets in interface FigureconnectionInsets in class AbstractFigurepublic boolean canConnect()
canConnect in interface FigurecanConnect in class AbstractFigure
public boolean containsPoint(int x,
int y)
containsPoint in interface FigurecontainsPoint in class AbstractFigurepublic void decorate(Figure figure)
public Figure peelDecoration()
public java.awt.Rectangle displayBox()
displayBox in interface FiguredisplayBox in class AbstractFigureFigure.basicDisplayBox(java.awt.Point, java.awt.Point)
public void basicDisplayBox(java.awt.Point origin,
java.awt.Point corner)
basicDisplayBox in interface FigurebasicDisplayBox in class AbstractFigureorigin - the new origincorner - the new cornerAbstractFigure.displayBox(java.awt.Point, java.awt.Point)public void draw(java.awt.Graphics g)
draw in interface Figureg - the Graphics to draw into
public Figure findFigureInside(int x,
int y)
findFigureInside in interface FigurefindFigureInside in class AbstractFigureAbstractFigure.containsPoint(int, int)public java.util.Vector handles()
handles in interface Figurehandles in class AbstractFigureHandlepublic boolean includes(Figure figure)
includes in interface Figureincludes in class AbstractFigure
public void moveBy(int x,
int y)
moveBy in interface FiguremoveBy in class AbstractFigure
protected void basicMoveBy(int x,
int y)
basicMoveBy in class AbstractFigureAbstractFigure.moveBy(int, int)public void release()
release in interface Figurerelease in class AbstractFigureFigure.release()public void figureInvalidated(FigureChangeEvent e)
figureInvalidated in interface FigureChangeListenerFigureChangeListenerpublic void figureChanged(FigureChangeEvent e)
FigureChangeListener
figureChanged in interface FigureChangeListenerpublic void figureRemoved(FigureChangeEvent e)
FigureChangeListener
figureRemoved in interface FigureChangeListenerpublic void figureRequestUpdate(FigureChangeEvent e)
figureRequestUpdate in interface FigureChangeListenerFigureChangeListenerpublic void figureRequestRemove(FigureChangeEvent e)
figureRequestRemove in interface FigureChangeListenerFigureChangeListenerpublic FigureEnumeration figures()
figures in interface Figurefigures in class AbstractFigureCompositeFigurepublic FigureEnumeration decompose()
decompose in interface Figuredecompose in class AbstractFigure
public void setAttribute(java.lang.String name,
java.lang.Object value)
setAttribute in interface FiguresetAttribute in class AbstractFigurepublic java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface FiguregetAttribute in class AbstractFigurepublic Locator connectedTextLocator(Figure text)
connectedTextLocator in interface FigureconnectedTextLocator in class AbstractFigure
public Connector connectorAt(int x,
int y)
connectorAt in interface FigureconnectorAt in class AbstractFigureChopBoxConnectorpublic void connectorVisibility(boolean isVisible)
connectorVisibility in interface FigureconnectorVisibility in class AbstractFigurepublic void write(StorableOutput dw)
write in interface Storablewrite in class AbstractFigure
public void read(StorableInput dr)
throws java.io.IOException
read in interface Storableread in class AbstractFigurejava.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||