|
|||||||||
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.CompositeFigure
public abstract class CompositeFigure
A Figure that is composed of several figures. A CompositeFigure doesn't define any layout behavior. It is up to subclassers to arrange the contained figures.
Composite
CompositeFigure enables to treat a composition of figures like
a single figure.
Figure
,
Serialized FormField Summary | |
---|---|
protected java.util.Vector |
fFigures
The figures that this figure is composed of |
Fields inherited from interface CH.ifa.draw.framework.Figure |
---|
POPUP_MENU |
Constructor Summary | |
---|---|
protected |
CompositeFigure()
|
Method Summary | |
---|---|
Figure |
add(Figure figure)
Adds a figure to the list of figures. |
void |
addAll(java.util.Vector newFigures)
Adds a vector of figures. |
protected void |
basicMoveBy(int x,
int y)
Moves all the given figures by x and y. |
void |
bringToFront(Figure figure)
Brings a figure to the front. |
void |
draw(java.awt.Graphics g)
Draws all the contained figures |
Figure |
figureAt(int i)
Gets a figure at the given index. |
void |
figureChanged(FigureChangeEvent e)
Sent when a figure changed |
int |
figureCount()
Gets number of child figures. |
void |
figureInvalidated(FigureChangeEvent e)
Propagates the figureInvalidated event to my listener. |
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 the requestUpdate request up to the container. |
FigureEnumeration |
figures()
Returns an Enumeration for accessing the contained figures. |
FigureEnumeration |
figuresReverse()
Returns an Enumeration for accessing the contained figures in the reverse drawing order. |
Figure |
findFigure(int x,
int y)
Finds a top level Figure. |
Figure |
findFigure(java.awt.Rectangle r)
Finds a top level Figure that intersects the given rectangle. |
Figure |
findFigure(java.awt.Rectangle r,
Figure without)
Finds a top level Figure that intersects the given rectangle. |
Figure |
findFigureInside(int x,
int y)
Finds a figure but descends into a figure's children. |
Figure |
findFigureInsideWithout(int x,
int y,
Figure without)
Finds a figure but descends into a figure's children. |
Figure |
findFigureWithout(int x,
int y,
Figure without)
Finds a top level Figure, but supresses the passed in figure. |
boolean |
includes(Figure figure)
Checks if the composite figure has the argument as one of its children. |
Figure |
orphan(Figure figure)
Removes a figure from the figure list, but doesn't release it. |
void |
orphanAll(java.util.Vector newFigures)
Removes a vector of figures from the figure's list without releasing the figures. |
void |
read(StorableInput dr)
Reads the contained figures from StorableInput. |
void |
release()
Releases the figure and all its children. |
Figure |
remove(Figure figure)
Removes a figure from the composite. |
void |
removeAll()
Removes all children. |
void |
removeAll(java.util.Vector figures)
Removes a vector of figures. |
void |
replace(Figure figure,
Figure replacement)
Replaces a figure in the drawing without removing it from the drawing. |
void |
sendToBack(Figure figure)
Sends a figure to the back of the drawing. |
void |
write(StorableOutput dw)
Writes the contained figures to the StorableOutput. |
Methods inherited from class CH.ifa.draw.standard.AbstractFigure |
---|
addFigureChangeListener, addToContainer, basicDisplayBox, canConnect, center, changed, clone, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, displayBox, getAttribute, handles, invalidate, isEmpty, listener, moveBy, removeFigureChangeListener, removeFromContainer, setAttribute, size, willChange |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Vector fFigures
add(CH.ifa.draw.framework.Figure)
,
remove(CH.ifa.draw.framework.Figure)
Constructor Detail |
---|
protected CompositeFigure()
Method Detail |
---|
public Figure add(Figure figure)
public void addAll(java.util.Vector newFigures)
add(CH.ifa.draw.framework.Figure)
public Figure remove(Figure figure)
removeAll(java.util.Vector)
public void removeAll(java.util.Vector figures)
remove(CH.ifa.draw.framework.Figure)
public void removeAll()
remove(CH.ifa.draw.framework.Figure)
public Figure orphan(Figure figure)
public void orphanAll(java.util.Vector newFigures)
orphan(CH.ifa.draw.framework.Figure)
public void replace(Figure figure, Figure replacement)
public void sendToBack(Figure figure)
public void bringToFront(Figure figure)
public void draw(java.awt.Graphics g)
draw
in interface Figure
g
- the Graphics to draw intoFigure.draw(java.awt.Graphics)
public Figure figureAt(int i)
public final FigureEnumeration figures()
figures
in interface Figure
figures
in class AbstractFigure
CompositeFigure
public int figureCount()
public final FigureEnumeration figuresReverse()
public Figure findFigure(int x, int y)
public Figure findFigure(java.awt.Rectangle r)
public Figure findFigureWithout(int x, int y, Figure without)
x
- the x coordinatey
- the y coordinatewithout
- the figure to be ignored during
the find.public Figure findFigure(java.awt.Rectangle r, Figure without)
public Figure findFigureInside(int x, int y)
findFigureInside
in interface Figure
findFigureInside
in class AbstractFigure
AbstractFigure.containsPoint(int, int)
public Figure findFigureInsideWithout(int x, int y, Figure without)
public boolean includes(Figure figure)
includes
in interface Figure
includes
in class AbstractFigure
protected void basicMoveBy(int x, int y)
basicMoveBy
in class AbstractFigure
AbstractFigure.moveBy(int, int)
public void release()
release
in interface Figure
release
in class AbstractFigure
Figure.release()
public void figureInvalidated(FigureChangeEvent e)
figureInvalidated
in interface FigureChangeListener
FigureChangeListener
public void figureRequestRemove(FigureChangeEvent e)
figureRequestRemove
in interface FigureChangeListener
FigureChangeListener
public void figureRequestUpdate(FigureChangeEvent e)
figureRequestUpdate
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 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |