|
|||||||||
| 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
CH.ifa.draw.contrib.GraphicalCompositeFigure
public class GraphicalCompositeFigure
The GraphicalCompositeFigure fills in the gap between a CompositeFigure and other figures which mainly have a presentation purpose. The GraphicalCompositeFigure can be configured with any Figure which takes over the task for rendering the graphical presentation for a CompositeFigure. Therefore, the GraphicalCompositeFigure manages contained figures like the CompositeFigure does, but delegates its graphical presentation to another (graphical) figure which purpose it is to draw the container for all contained figures.
| Field Summary |
|---|
| Fields inherited from class CH.ifa.draw.standard.CompositeFigure |
|---|
fFigures |
| Fields inherited from interface CH.ifa.draw.framework.Figure |
|---|
POPUP_MENU |
| Constructor Summary | |
|---|---|
GraphicalCompositeFigure()
Default constructor which uses a RectangleFigure as presentation figure. |
|
GraphicalCompositeFigure(Figure newPresentationFigure)
Constructor which creates a GraphicalCompositeFigure with a given graphical figure for presenting it. |
|
| Method Summary | |
|---|---|
void |
basicDisplayBox(java.awt.Point origin,
java.awt.Point corner)
Standard presentation method which is delegated to the encapsulated presentation figure. |
protected void |
basicMoveBy(int dx,
int dy)
Standard presentation method which is delegated to the encapsulated presentation figure. |
protected void |
change()
Notify the registered change listener if an exlicit change to the component (or one of its child components has occurred). |
java.lang.Object |
clone()
Clones a figure and initializes it |
java.awt.Rectangle |
displayBox()
Return the display area. |
void |
draw(java.awt.Graphics g)
Draw the figure. |
void |
figureRequestRemove(FigureChangeEvent e)
Propagates the removeFromDrawing request up to the container. |
java.lang.Object |
getAttribute(java.lang.String name)
Delegate capabilities for storing and retrieving attributes to a CompositeFigure if the encapsulated presentation figure. |
Layouter |
getLayouter()
Get a Layouter object which encapsulated a layout algorithm for this figure. |
Figure |
getPresentationFigure()
Get a figure which renders this CompositeFigure. |
java.util.Vector |
handles()
Return default handles from the presentation figure. |
protected void |
initialize()
This method performs additional initialization operations, in this case setting the Layouter. |
void |
layout()
A layout algorithm is used to define how the child components should be laid out in relation to each other. |
void |
read(StorableInput dr)
Reads the contained figures from StorableInput. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Delegate capabilities for storing and retrieving attributes to a CompositeFigure if the encapsulated presentation figure. |
void |
setLayouter(Layouter newLayouter)
Set a Layouter object which encapsulated a layout algorithm for this figure. |
void |
setPresentationFigure(Figure newPresentationFigure)
Set a figure which renders this CompositeFigure. |
void |
update()
Expicit update: an updated involves a layout for all contained figures. |
void |
write(StorableOutput dw)
Writes the contained figures to the StorableOutput. |
| Methods inherited from class CH.ifa.draw.standard.CompositeFigure |
|---|
add, addAll, bringToFront, figureAt, figureChanged, figureCount, figureInvalidated, figureRemoved, figureRequestUpdate, figures, figuresReverse, findFigure, findFigure, findFigure, findFigureInside, findFigureInsideWithout, findFigureWithout, includes, orphan, orphanAll, release, remove, removeAll, removeAll, replace, sendToBack |
| Methods inherited from class CH.ifa.draw.standard.AbstractFigure |
|---|
addFigureChangeListener, addToContainer, canConnect, center, changed, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, invalidate, isEmpty, listener, moveBy, removeFigureChangeListener, removeFromContainer, size, willChange |
| 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 |
|---|
addFigureChangeListener, addToContainer, canConnect, center, changed, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, figures, findFigureInside, includes, invalidate, isEmpty, listener, moveBy, release, removeFigureChangeListener, removeFromContainer, size, willChange |
| Constructor Detail |
|---|
public GraphicalCompositeFigure()
public GraphicalCompositeFigure(Figure newPresentationFigure)
newPresentationFigure - figure which renders the container| Method Detail |
|---|
protected void initialize()
public java.lang.Object clone()
clone in interface Figureclone in class AbstractFigureFigure.clone()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)
protected void basicMoveBy(int dx,
int dy)
basicMoveBy in class CompositeFigureAbstractFigure.moveBy(int, int)public void update()
public void draw(java.awt.Graphics g)
draw in interface Figuredraw in class CompositeFigureg - the Graphics to draw intoFigure.draw(java.awt.Graphics)public java.util.Vector handles()
handles in interface Figurehandles in class AbstractFigureHandlepublic java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface FiguregetAttribute in class AbstractFigurename - name of the attribute whose value should be returned
public void setAttribute(java.lang.String name,
java.lang.Object value)
setAttribute in interface FiguresetAttribute in class AbstractFigurename - name of the attributevalue - value associated with this attributepublic void setPresentationFigure(Figure newPresentationFigure)
newPresentationFigure - figure takes over the presentation taskspublic Figure getPresentationFigure()
public void layout()
layout in interface Layoutablepublic void setLayouter(Layouter newLayouter)
setLayouter in interface LayoutablenewLayouter - encapsulation of a layout algorithm.public Layouter getLayouter()
getLayouter in interface Layoutableprotected void change()
public void figureRequestRemove(FigureChangeEvent e)
figureRequestRemove in interface FigureChangeListenerfigureRequestRemove in class CompositeFigureFigureChangeListener
public void read(StorableInput dr)
throws java.io.IOException
read in interface Storableread in class CompositeFigurejava.io.IOExceptionpublic void write(StorableOutput dw)
write in interface Storablewrite in class CompositeFigure
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||