public class ODGGroupFigure extends GroupFigure implements ODGFigure
AbstractCompositeFigure.EventHandlercachedBounds, cachedDrawingArea, children, eventHandler, layouterchangingDepth, listenerListpropertySupportCONNECTABLE_PROPERTY, REMOVABLE_PROPERTY, SELECTABLE_PROPERTY, TRANSFORMABLE_PROPERTYLAYOUT_INSETS| Constructor and Description |
|---|
ODGGroupFigure()
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
ODGGroupFigure |
clone()
Returns a clone of the figure, with clones of all aggregated figures,
such as children and decorators.
|
java.util.LinkedList<Handle> |
createHandles(int detailLevel)
Creates handles used to manipulate the figure.
|
void |
draw(java.awt.Graphics2D g)
Draws the figure.
|
<T> T |
get(AttributeKey<T> key)
Gets an attribute from the Figure.
|
java.util.Map<AttributeKey,java.lang.Object> |
getAttributes()
Returns a view to all attributes of this figure.
|
java.awt.geom.Rectangle2D.Double |
getBounds()
Returns the untransformed logical bounds of the figure as a Rectangle.
|
boolean |
isEmpty()
Returns true, if this figure is empty for one of the following
reasons:
A group has no children
A path has less than two points
An ellipse or a rectangle has a width or a height of 0
A text has no characters
|
<T> void |
set(AttributeKey<T> key,
T value)
Sets an attribute on the figure and calls
attributeChanged
on all registered FigureListeners if the attribute value
has changed. |
void |
setAttributes(java.util.Map<AttributeKey,java.lang.Object> map) |
java.lang.String |
toString() |
chop, isTransformableadd, add, addAll, addAll, addCompositeFigureListener, addNotify, basicAdd, basicAdd, basicAddAll, basicRemove, basicRemoveAll, basicRemoveAllChildren, basicRemoveChild, bringToFront, changed, contains, contains, createEventHandler, findChild, findChildIndex, findFigureInside, fireFigureAdded, fireFigureRemoved, getAttributesRestoreData, getChild, getChildCount, getChildren, getChildrenFrontToBack, getDecomposition, getDrawingArea, getLayouter, getPreferredSize, getTransformRestoreData, indexOf, invalidate, layout, read, remove, removeAll, removeAllChildren, removeChild, removeCompositeFigureListener, removeNotify, restoreAttributesTo, restoreTransformTo, sendToBack, setBounds, setLayouter, transform, validate, willChange, writeaddFigureListener, findCompatibleConnector, findConnector, fireAreaInvalidated, fireAreaInvalidated, fireAreaInvalidated, fireAttributeChanged, fireFigureAdded, fireFigureChanged, fireFigureChanged, fireFigureChanged, fireFigureHandlesChanged, fireFigureRemoved, fireFigureRequestRemove, fireUndoableEditHappened, getActions, getChangingDepth, getConnectors, getCursor, getDrawing, getEndPoint, getFontRenderContext, getLayer, getLock, getStartPoint, getTool, getToolTipText, handleDrop, handleMouseClick, includes, isChanging, isConnectable, isRemovable, isSelectable, isVisible, remap, removeFigureListener, requestRemove, setBounds, setConnectable, setRemovable, setSelectable, setTransformable, setVisibleaddPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddFigureListener, addNotify, addPropertyChangeListener, changed, contains, findCompatibleConnector, findConnector, findFigureInside, getActions, getAttributesRestoreData, getConnectors, getCursor, getDecomposition, getDrawingArea, getEndPoint, getLayer, getPreferredSize, getStartPoint, getTool, getToolTipText, getTransformRestoreData, handleDrop, handleMouseClick, includes, isConnectable, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, removeNotify, removePropertyChangeListener, requestRemove, restoreAttributesTo, restoreTransformTo, setBounds, transform, willChangepublic <T> void set(AttributeKey<T> key, T value)
FigureattributeChanged
on all registered FigureListeners if the attribute value
has changed.
For efficiency reasons, the drawing is not automatically repainted.
If you want the drawing to be repainted when the attribute is changed,
you can either use key.set(figure, value); or
figure.willChange(); figure.set(...); figure.changed();
set in interface Figureset in class AbstractCompositeFigureAttributeKey.set(org.jhotdraw.draw.Figure, T)public <T> T get(AttributeKey<T> key)
Figureget in interface Figureget in class AbstractCompositeFigureAttributeKey.get(org.jhotdraw.draw.Figure)public java.util.Map<AttributeKey,java.lang.Object> getAttributes()
FiguregetAttributes in interface FiguregetAttributes in class AbstractCompositeFigurepublic void setAttributes(java.util.Map<AttributeKey,java.lang.Object> map)
public void draw(java.awt.Graphics2D g)
Figuredraw in interface Figuredraw in class AbstractCompositeFigureg - The Graphics2D to draw to.public java.awt.geom.Rectangle2D.Double getBounds()
FigureThe bounds are used by Handle objects for adjusting the figure and for aligning the figure on a grid.
getBounds in interface FiguregetBounds in class AbstractCompositeFigurepublic java.util.LinkedList<Handle> createHandles(int detailLevel)
FigurecreateHandles in interface FigurecreateHandles in class AbstractCompositeFiguredetailLevel - The detail level of the handles. Usually this is 0 for
bounding box handles and 1 for point handles. The value -1 is used
by the SelectAreaTracker and the HandleTracker to highlight figures, over which the mouse
pointer is hovering.Handlepublic boolean isEmpty()
ODGFigurepublic java.lang.String toString()
toString in class AbstractFigurepublic ODGGroupFigure clone()
Figureclone in interface Figureclone in class AbstractCompositeFigure