JHotDraw 7.3.1

org.jhotdraw.draw
Class GroupFigure

java.lang.Object
  extended by org.jhotdraw.beans.AbstractBean
      extended by org.jhotdraw.draw.AbstractFigure
          extended by org.jhotdraw.draw.AbstractCompositeFigure
              extended by org.jhotdraw.draw.GroupFigure
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, CompositeFigure, Figure, DOMStorable
Direct Known Subclasses:
ODGGroupFigure, SVGGroupFigure

public class GroupFigure
extends AbstractCompositeFigure

A Figure which groups a collection of figures.

Version:
$Id: GroupFigure.java 531 2009-06-13 10:20:39Z rawcoder $
Author:
Werner Randelshofer
See Also:
Serialized Form

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.CompositeFigure
LAYOUT_INSETS
 
Constructor Summary
GroupFigure()
          Creates a new instance.
 
Method Summary
 boolean canConnect()
          Checks if this figure can be connected.
 java.awt.geom.Point2D.Double chop(java.awt.geom.Point2D.Double from)
          This is a default implementation that chops the point at the rectangle returned by getBounds() of the figure.
 
Methods inherited from class org.jhotdraw.draw.AbstractCompositeFigure
add, add, addAll, addAll, addCompositeFigureListener, addNotify, basicAdd, basicAdd, basicAddAll, basicRemove, basicRemoveAll, basicRemoveAllChildren, basicRemoveChild, bringToFront, changed, clone, contains, contains, createEventHandler, createHandles, draw, findChild, findChildIndex, findFigureInside, fireFigureAdded, fireFigureRemoved, get, getAttributes, getAttributesRestoreData, getBounds, getChild, getChildCount, getChildren, getChildrenFrontToBack, getDecomposition, getDrawingArea, getLayouter, getPreferredSize, getTransformRestoreData, indexOf, invalidate, layout, read, remove, removeAll, removeAllChildren, removeChild, removeCompositeFigureListener, removeNotify, restoreAttributesTo, restoreTransformTo, sendToBack, set, setBounds, setLayouter, transform, validate, willChange, write
 
Methods inherited from class org.jhotdraw.draw.AbstractFigure
addFigureListener, basicClone, 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, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, requestRemove, setBounds, setRemovable, setSelectable, setTransformable, setVisible, toString
 
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
 
Methods inherited from interface org.jhotdraw.draw.Figure
addFigureListener, findCompatibleConnector, findConnector, getActions, getConnectors, getCursor, getEndPoint, getLayer, getStartPoint, getTool, getToolTipText, handleDrop, handleMouseClick, includes, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, requestRemove
 

Constructor Detail

GroupFigure

public GroupFigure()
Creates a new instance.

Method Detail

canConnect

public boolean canConnect()
Description copied from class: AbstractFigure
Checks if this figure can be connected. By default AbstractFigures can be connected.

Specified by:
canConnect in interface Figure
Overrides:
canConnect in class AbstractFigure

chop

public java.awt.geom.Point2D.Double chop(java.awt.geom.Point2D.Double from)
This is a default implementation that chops the point at the rectangle returned by getBounds() of the figure.

Figures which have a non-rectangular shape need to override this method.

FIXME Invoke chop on each child and return the closest point.


Copyright 1996-2009 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.