|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.standard.AbstractFigure
org.jhotdraw.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 FormField Summary |
---|
Fields inherited from interface org.jhotdraw.framework.Figure |
---|
POPUP_MENU |
Constructor Summary | |
---|---|
DecoratorFigure()
|
|
DecoratorFigure(Figure figure)
Constructs a DecoratorFigure and decorates the passed in figure. |
Method Summary | |
---|---|
void |
addDependendFigure(Figure newDependendFigure)
Add a dependent figure. |
void |
basicDisplayBox(java.awt.Point origin,
java.awt.Point corner)
Forwards basicDisplayBox 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,
ConnectionFigure courtingConnection)
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(FigureAttributeConstant attributeConstant)
Forwards getAttribute to its contained figure. |
java.lang.Object |
getAttribute(java.lang.String name)
Deprecated. use getAttribute(FigureAttributeConstant) instead |
Figure |
getDecoratedFigure()
Get the underlying figure in case the figure has been decorated. |
FigureEnumeration |
getDependendFigures()
Get an enumeration of all dependent figures. |
TextHolder |
getTextHolder()
Some figures have the ability to hold text. |
HandleEnumeration |
handles()
Forwards handles to its contained figure. |
boolean |
includes(Figure figure)
Forwards includes to its contained figure. |
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 |
removeDependendFigure(Figure oldDependendFigure)
Remove a dependent figure. |
void |
setAttribute(FigureAttributeConstant attributeConstant,
java.lang.Object value)
Forwards setAttribute to its contained figure. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Deprecated. use setAttribute(FigureAttributeConstant, Object) instead |
void |
setDecoratedFigure(Figure newDecoratedFigure)
|
void |
write(StorableOutput dw)
Writes itself and the contained figure to the StorableOutput. |
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 |
Constructor Detail |
---|
public DecoratorFigure()
public DecoratorFigure(Figure figure)
Method Detail |
---|
public java.awt.Insets connectionInsets()
connectionInsets
in interface Figure
connectionInsets
in class AbstractFigure
public boolean canConnect()
canConnect
in interface Figure
canConnect
in class AbstractFigure
public boolean containsPoint(int x, int y)
containsPoint
in interface Figure
containsPoint
in class AbstractFigure
public void decorate(Figure figure)
public Figure peelDecoration()
public void setDecoratedFigure(Figure newDecoratedFigure)
public Figure getDecoratedFigure()
Figure
org.jhotdraw.standard.DecoratorFigure.peelDecoration
).
getDecoratedFigure
in interface Figure
getDecoratedFigure
in class AbstractFigure
DecoratorFigure
public java.awt.Rectangle displayBox()
displayBox
in interface Figure
displayBox
in class AbstractFigure
Figure.basicDisplayBox(java.awt.Point, java.awt.Point)
public void basicDisplayBox(java.awt.Point origin, java.awt.Point corner)
basicDisplayBox
in interface Figure
basicDisplayBox
in class AbstractFigure
origin
- the new origincorner
- the new cornerAbstractFigure.displayBox(java.awt.Point, java.awt.Point)
public void draw(java.awt.Graphics g)
draw
in interface Figure
g
- the Graphics to draw intopublic Figure findFigureInside(int x, int y)
findFigureInside
in interface Figure
findFigureInside
in class AbstractFigure
AbstractFigure.containsPoint(int, int)
public HandleEnumeration handles()
handles
in interface Figure
handles
in class AbstractFigure
Handle
public boolean includes(Figure figure)
includes
in interface Figure
includes
in class AbstractFigure
public void moveBy(int x, int y)
moveBy
in interface Figure
moveBy
in class AbstractFigure
x
- the x deltay
- the y deltapublic void release()
release
in interface Figure
release
in class AbstractFigure
Figure.release()
public void figureInvalidated(FigureChangeEvent e)
figureInvalidated
in interface FigureChangeListener
FigureChangeListener
public void figureChanged(FigureChangeEvent e)
FigureChangeListener
figureChanged
in interface FigureChangeListener
public void figureRemoved(FigureChangeEvent e)
FigureChangeListener
figureRemoved
in interface FigureChangeListener
public void figureRequestUpdate(FigureChangeEvent e)
figureRequestUpdate
in interface FigureChangeListener
FigureChangeListener
public void figureRequestRemove(FigureChangeEvent e)
figureRequestRemove
in interface FigureChangeListener
FigureChangeListener
public FigureEnumeration figures()
figures
in interface Figure
figures
in class AbstractFigure
CompositeFigure
public FigureEnumeration decompose()
decompose
in interface Figure
decompose
in class AbstractFigure
public void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in interface Figure
setAttribute
in class AbstractFigure
public void setAttribute(FigureAttributeConstant attributeConstant, java.lang.Object value)
setAttribute
in interface Figure
setAttribute
in class AbstractFigure
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface Figure
getAttribute
in class AbstractFigure
public java.lang.Object getAttribute(FigureAttributeConstant attributeConstant)
getAttribute
in interface Figure
getAttribute
in class AbstractFigure
public Locator connectedTextLocator(Figure text)
connectedTextLocator
in interface Figure
connectedTextLocator
in class AbstractFigure
public Connector connectorAt(int x, int y)
connectorAt
in interface Figure
connectorAt
in class AbstractFigure
ChopBoxConnector
public void connectorVisibility(boolean isVisible, ConnectionFigure courtingConnection)
connectorVisibility
in interface Figure
connectorVisibility
in class AbstractFigure
public void write(StorableOutput dw)
write
in interface Storable
write
in class AbstractFigure
public void read(StorableInput dr) throws java.io.IOException
read
in interface Storable
read
in class AbstractFigure
java.io.IOException
public TextHolder getTextHolder()
Figure
getTextHolder
in interface Figure
getTextHolder
in class AbstractFigure
public FigureEnumeration getDependendFigures()
Figure
getDependendFigures
in interface Figure
getDependendFigures
in class AbstractFigure
public void addDependendFigure(Figure newDependendFigure)
Figure
addDependendFigure
in interface Figure
addDependendFigure
in class AbstractFigure
public void removeDependendFigure(Figure oldDependendFigure)
Figure
removeDependendFigure
in interface Figure
removeDependendFigure
in class AbstractFigure
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |