Package drawit.shapegroups1
Class NonleafShapeGroup
java.lang.Object
drawit.shapegroups1.ShapeGroup
drawit.shapegroups1.NonleafShapeGroup
public class NonleafShapeGroup extends ShapeGroup
Each instance of this class represents a non-leaf shape group.
-
Constructor Summary
Constructors Constructor Description NonleafShapeGroup(ShapeGroup[] subgroups)
Initializes this object to represent a non-leaf shape group that directly contains the given subgroups, in the given order. -
Method Summary
Modifier and Type Method Description List<RoundedPolygon>
getAllShapes()
Returns a list of all RoundedPolygon objects contained directly or indirectly by this shape group, in some unspecified order.Extent
getBoundingBox()
Returns the smallest axis-aligned rectangle that contains all shapes contained directly or indirectly by this shape group.String
getDrawingCommands()
Returns a textual representation of a sequence of drawing commands for drawing the shapes contained directly or indirectly by this shape group.ShapeGroup
getSubgroup(int index)
Returns the subgroup at the given (zero-based) index in the list of subgroups directly contained by this shape group.ShapeGroup
getSubgroupAt(IntPoint innerCoordinates)
Return the first subgroup in the list of subgroups directly contained by this shape group whose bounding box contains the given point.int
getSubgroupCount()
Returns the number of subgroups directly contained by this non-leaf shape group.List<ShapeGroup>
getSubgroups()
Returns the list of subgroups directly contained by this non-leaf shape group.Methods inherited from class drawit.shapegroups1.ShapeGroup
bringToFront, getAllVertices, getParentGroup, scale, sendToBack, translate
-
Constructor Details
-
NonleafShapeGroup
Initializes this object to represent a non-leaf shape group that directly contains the given subgroups, in the given order. The given shape groups shall not yet be contained by any shape group.
-
-
Method Details
-
getSubgroups
Returns the list of subgroups directly contained by this non-leaf shape group. -
getSubgroupCount
public int getSubgroupCount()Returns the number of subgroups directly contained by this non-leaf shape group. -
getSubgroup
Returns the subgroup at the given (zero-based) index in the list of subgroups directly contained by this shape group. -
getDrawingCommands
Description copied from class:ShapeGroup
Returns a textual representation of a sequence of drawing commands for drawing the shapes contained directly or indirectly by this shape group. For the syntax of the drawing commands, seeRoundedPolygon.getDrawingCommands()
.- Specified by:
getDrawingCommands
in classShapeGroup
-
getBoundingBox
Description copied from class:ShapeGroup
Returns the smallest axis-aligned rectangle that contains all shapes contained directly or indirectly by this shape group.- Specified by:
getBoundingBox
in classShapeGroup
-
getSubgroupAt
Return the first subgroup in the list of subgroups directly contained by this shape group whose bounding box contains the given point. -
getAllShapes
Description copied from class:ShapeGroup
Returns a list of all RoundedPolygon objects contained directly or indirectly by this shape group, in some unspecified order.- Specified by:
getAllShapes
in classShapeGroup
-