|
JHotDraw 7.5.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.beans.AbstractBean
org.jhotdraw.draw.AbstractFigure
org.jhotdraw.draw.AbstractCompositeFigure
org.jhotdraw.draw.GroupFigure
org.jhotdraw.samples.odg.figures.ODGGroupFigure
public class ODGGroupFigure
ODGGroupFigure.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jhotdraw.draw.AbstractCompositeFigure |
---|
AbstractCompositeFigure.EventHandler |
Field Summary |
---|
Fields inherited from class org.jhotdraw.draw.AbstractCompositeFigure |
---|
cachedBounds, cachedDrawingArea, children, eventHandler, layouter |
Fields inherited from class org.jhotdraw.draw.AbstractFigure |
---|
changingDepth, listenerList |
Fields inherited from class org.jhotdraw.beans.AbstractBean |
---|
propertySupport |
Fields inherited from interface org.jhotdraw.draw.Figure |
---|
CONNECTABLE_PROPERTY, REMOVABLE_PROPERTY, SELECTABLE_PROPERTY, TRANSFORMABLE_PROPERTY |
Fields inherited from interface org.jhotdraw.draw.CompositeFigure |
---|
LAYOUT_INSETS |
Constructor Summary | |
---|---|
ODGGroupFigure()
Creates a new instance. |
Method Summary | ||
---|---|---|
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. |
|
|
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 |
|
|
set(AttributeKey<T> key,
T value)
Sets an attribute on the figure and calls attributeChanged
on all registered FigureListener s if the attribute value
has changed. |
|
void |
setAttributes(java.util.Map<AttributeKey,java.lang.Object> map)
|
|
java.lang.String |
toString()
|
Methods inherited from class org.jhotdraw.draw.GroupFigure |
---|
chop |
Methods inherited from class org.jhotdraw.beans.AbstractBean |
---|
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ODGGroupFigure()
Method Detail |
---|
public <T> void set(AttributeKey<T> key, T value)
Figure
attributeChanged
on all registered FigureListener
s 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 Figure
set
in class AbstractCompositeFigure
AttributeKey.set(org.jhotdraw.draw.Figure, T)
public <T> T get(AttributeKey<T> key)
Figure
get
in interface Figure
get
in class AbstractCompositeFigure
AttributeKey.get(org.jhotdraw.draw.Figure)
public java.util.Map<AttributeKey,java.lang.Object> getAttributes()
Figure
getAttributes
in interface Figure
getAttributes
in class AbstractCompositeFigure
public void setAttributes(java.util.Map<AttributeKey,java.lang.Object> map)
public void draw(java.awt.Graphics2D g)
Figure
draw
in interface Figure
draw
in class AbstractCompositeFigure
g
- The Graphics2D to draw to.public java.awt.geom.Rectangle2D.Double getBounds()
Figure
The bounds are used by Handle objects for adjusting the figure and for aligning the figure on a grid.
getBounds
in interface Figure
getBounds
in class AbstractCompositeFigure
public java.util.LinkedList<Handle> createHandles(int detailLevel)
Figure
createHandles
in interface Figure
createHandles
in class AbstractCompositeFigure
detailLevel
- 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.
Handle
public boolean isEmpty()
ODGFigure
isEmpty
in interface ODGFigure
public java.lang.String toString()
toString
in class AbstractFigure
public ODGGroupFigure clone()
Figure
clone
in interface Figure
clone
in class AbstractCompositeFigure
|
Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |