|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCH.ifa.draw.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 Form| Field Summary |
|---|
| Fields inherited from interface CH.ifa.draw.framework.Figure |
|---|
POPUP_MENU |
| Constructor Summary | |
|---|---|
protected |
AbstractFigure()
|
| Method Summary | |
|---|---|
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. |
protected abstract void |
basicMoveBy(int dx,
int dy)
Moves the 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)
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(java.lang.String name)
Returns the named attribute or null if a a figure doesn't have an attribute. |
abstract java.util.Vector |
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 |
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(java.lang.String name,
java.lang.Object value)
Sets the named attribute to the new value. |
java.awt.Dimension |
size()
Gets the size of the figure. |
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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface CH.ifa.draw.framework.Figure |
|---|
draw |
| Constructor Detail |
|---|
protected AbstractFigure()
| Method Detail |
|---|
public void moveBy(int dx,
int dy)
moveBy in interface Figure
protected abstract void basicMoveBy(int dx,
int dy)
moveBy(int, int)
public void displayBox(java.awt.Point origin,
java.awt.Point corner)
displayBox in interface Figureorigin - 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 Figureorigin - the new origincorner - the new cornerdisplayBox(java.awt.Point, java.awt.Point)public abstract java.awt.Rectangle displayBox()
displayBox in interface FigureFigure.basicDisplayBox(java.awt.Point, java.awt.Point)public abstract java.util.Vector handles()
handles in interface FigureHandlepublic FigureEnumeration figures()
figures in interface FigureCompositeFigurepublic java.awt.Dimension size()
size in interface Figurepublic boolean isEmpty()
isEmpty in interface FigureFigure.isEmpty()
public Figure findFigureInside(int x,
int y)
findFigureInside in interface FigurecontainsPoint(int, int)
public boolean containsPoint(int x,
int y)
containsPoint in interface Figurepublic void displayBox(java.awt.Rectangle r)
displayBox in interface FiguredisplayBox(java.awt.Point, java.awt.Point)public boolean includes(Figure figure)
includes in interface Figurepublic FigureEnumeration decompose()
decompose in interface Figurepublic void addToContainer(FigureChangeListener c)
addToContainer in interface Figurepublic void removeFromContainer(FigureChangeListener c)
removeFromContainer in interface Figurepublic void addFigureChangeListener(FigureChangeListener l)
addFigureChangeListener in interface Figurepublic void removeFigureChangeListener(FigureChangeListener l)
removeFigureChangeListener in interface Figurepublic FigureChangeListener listener()
listener in interface Figurepublic void release()
release in interface FigureFigure.release()public void invalidate()
invalidate in interface Figurepublic void willChange()
willChange in interface FigureFigure.willChange()public void changed()
changed in interface FigureFigureChangeEvent,
Figure.changed()public java.awt.Point center()
center in interface Figurepublic boolean canConnect()
canConnect in interface Figurepublic java.awt.Insets connectionInsets()
connectionInsets in interface Figure
public Connector connectorAt(int x,
int y)
connectorAt in interface FigureChopBoxConnectorpublic void connectorVisibility(boolean isVisible)
connectorVisibility in interface Figurepublic Locator connectedTextLocator(Figure text)
connectedTextLocator in interface Figurepublic java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface Figure
public void setAttribute(java.lang.String name,
java.lang.Object value)
setAttribute in interface Figurepublic java.lang.Object clone()
clone in interface Figureclone in class java.lang.ObjectFigure.clone()public void write(StorableOutput dw)
write in interface Storable
public void read(StorableInput dr)
throws java.io.IOException
read in interface Storablejava.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||