|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.standard.AbstractFigure
public abstract class AbstractFigure
AbstractFigure provides default implementations for the Figure interface.
Template Method
Template Methods implement default and invariant behavior for
figure subclasses.
Figure
,
Handle
,
Serialized FormField Summary |
---|
Fields inherited from interface org.jhotdraw.framework.Figure |
---|
POPUP_MENU |
Method Summary | |
---|---|
void |
addDependendFigure(Figure newDependendFigure)
Add a dependent figure. |
void |
addFigureChangeListener(FigureChangeListener l)
Adds a listener for this figure. |
void |
addToContainer(FigureChangeListener c)
Sets the Figure's container and registers the container as a figure change listener. |
abstract void |
basicDisplayBox(java.awt.Point origin,
java.awt.Point corner)
Sets the display box of a figure. |
boolean |
canConnect()
Checks if this figure can be connected. |
java.awt.Point |
center()
Gets the center of a figure. |
void |
changed()
Informs that a figure changed the area of its display box. |
java.lang.Object |
clone()
Clones a figure. |
Locator |
connectedTextLocator(Figure text)
Returns the locator used to located connected text. |
java.awt.Insets |
connectionInsets()
Returns the connection inset. |
Connector |
connectorAt(int x,
int y)
Returns the Figures connector for the specified location. |
void |
connectorVisibility(boolean isVisible,
ConnectionFigure connector)
Sets whether the connectors should be visible. |
boolean |
containsPoint(int x,
int y)
Checks if a point is inside the figure. |
FigureEnumeration |
decompose()
Decomposes a figure into its parts. |
abstract java.awt.Rectangle |
displayBox()
Gets the display box of a figure. |
void |
displayBox(java.awt.Point origin,
java.awt.Point corner)
Changes the display box of a figure. |
void |
displayBox(java.awt.Rectangle r)
Changes the display box of a figure. |
FigureEnumeration |
figures()
Returns an Enumeration of the figures contained in this figure. |
Figure |
findFigureInside(int x,
int y)
Returns the figure that contains the given point. |
java.lang.Object |
getAttribute(FigureAttributeConstant attributeConstant)
Returns the named attribute or null if a a figure doesn't have an attribute. |
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. |
int |
getZValue()
Gets the z value (back-to-front ordering) of this figure. |
abstract HandleEnumeration |
handles()
Returns the handles of a Figure that can be used to manipulate some of its attributes. |
boolean |
includes(Figure figure)
Checks whether the given figure is contained in this figure. |
void |
invalidate()
Invalidates the figure. |
boolean |
isEmpty()
Checks if the figure is empty. |
FigureChangeListener |
listener()
Gets the figure's listners. |
void |
moveBy(int dx,
int dy)
Moves the figure by the given offset. |
void |
read(StorableInput dr)
Reads the Figure from a StorableInput. |
void |
release()
A figure is released from the drawing. |
void |
removeDependendFigure(Figure oldDependendFigure)
Remove a dependent figure. |
void |
removeFigureChangeListener(FigureChangeListener l)
Removes a listener for this figure. |
void |
removeFromContainer(FigureChangeListener c)
Removes a figure from the given container and unregisters it as a change listener. |
void |
setAttribute(FigureAttributeConstant attributeConstant,
java.lang.Object value)
Sets the named attribute to the new value. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Deprecated. use setAttribute(FigureAttributeConstant, Object) instead |
void |
setZValue(int z)
Sets the z value (back-to-front ordering) of this figure. |
java.awt.Dimension |
size()
Gets the size of the figure. |
void |
visit(FigureVisitor visitor)
|
void |
willChange()
Informes that a figure is about to change something that affects the contents of its display box. |
void |
write(StorableOutput dw)
Stores the Figure to a StorableOutput. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jhotdraw.framework.Figure |
---|
draw |
Method Detail |
---|
public void moveBy(int dx, int dy)
moveBy
in interface Figure
dx
- the x deltady
- the y deltapublic void displayBox(java.awt.Point origin, java.awt.Point corner)
displayBox
in interface Figure
origin
- the new origincorner
- the new cornerdisplayBox(java.awt.Point, java.awt.Point)
public abstract void basicDisplayBox(java.awt.Point origin, java.awt.Point corner)
basicDisplayBox
in interface Figure
origin
- the new origincorner
- the new cornerdisplayBox(java.awt.Point, java.awt.Point)
public abstract java.awt.Rectangle displayBox()
displayBox
in interface Figure
Figure.basicDisplayBox(java.awt.Point, java.awt.Point)
public abstract HandleEnumeration handles()
handles
in interface Figure
Handle
public FigureEnumeration figures()
figures
in interface Figure
CompositeFigure
public java.awt.Dimension size()
size
in interface Figure
public boolean isEmpty()
isEmpty
in interface Figure
Figure.isEmpty()
public Figure findFigureInside(int x, int y)
findFigureInside
in interface Figure
containsPoint(int, int)
public boolean containsPoint(int x, int y)
containsPoint
in interface Figure
public void displayBox(java.awt.Rectangle r)
displayBox
in interface Figure
displayBox(java.awt.Point, java.awt.Point)
public boolean includes(Figure figure)
includes
in interface Figure
public FigureEnumeration decompose()
decompose
in interface Figure
public void addToContainer(FigureChangeListener c)
addToContainer
in interface Figure
public void removeFromContainer(FigureChangeListener c)
removeFromContainer
in interface Figure
public void addFigureChangeListener(FigureChangeListener l)
addFigureChangeListener
in interface Figure
public void removeFigureChangeListener(FigureChangeListener l)
removeFigureChangeListener
in interface Figure
public FigureChangeListener listener()
listener
in interface Figure
public void release()
release
in interface Figure
Figure.release()
public void invalidate()
invalidate
in interface Figure
public void willChange()
willChange
in interface Figure
Figure.willChange()
public void changed()
changed
in interface Figure
FigureChangeEvent
,
Figure.changed()
public java.awt.Point center()
center
in interface Figure
public boolean canConnect()
canConnect
in interface Figure
public java.awt.Insets connectionInsets()
connectionInsets
in interface Figure
public Connector connectorAt(int x, int y)
connectorAt
in interface Figure
ChopBoxConnector
public void connectorVisibility(boolean isVisible, ConnectionFigure connector)
connectorVisibility
in interface Figure
public Locator connectedTextLocator(Figure text)
connectedTextLocator
in interface Figure
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface Figure
public java.lang.Object getAttribute(FigureAttributeConstant attributeConstant)
getAttribute
in interface Figure
public void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in interface Figure
public void setAttribute(FigureAttributeConstant attributeConstant, java.lang.Object value)
setAttribute
in interface Figure
public java.lang.Object clone()
clone
in interface Figure
clone
in class java.lang.Object
Figure.clone()
public void write(StorableOutput dw)
write
in interface Storable
public void read(StorableInput dr) throws java.io.IOException
read
in interface Storable
java.io.IOException
public int getZValue()
getZValue
in interface Figure
public void setZValue(int z)
setZValue
in interface Figure
public void visit(FigureVisitor visitor)
visit
in interface Figure
public FigureEnumeration getDependendFigures()
Figure
getDependendFigures
in interface Figure
public void addDependendFigure(Figure newDependendFigure)
Figure
addDependendFigure
in interface Figure
public void removeDependendFigure(Figure oldDependendFigure)
Figure
removeDependendFigure
in interface Figure
public TextHolder getTextHolder()
Figure
getTextHolder
in interface Figure
public Figure getDecoratedFigure()
Figure
org.jhotdraw.standard.DecoratorFigure.peelDecoration
).
getDecoratedFigure
in interface Figure
DecoratorFigure
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |