Package drawit.shapegroups1
Class LeafShapeGroup
java.lang.Object
drawit.shapegroups1.ShapeGroup
drawit.shapegroups1.LeafShapeGroup
public class LeafShapeGroup extends ShapeGroup
Each instance of this class represents a leaf shape group.
-
Constructor Summary
Constructors Constructor Description LeafShapeGroup(RoundedPolygon shape)
Initializes this object to represent a leaf shape group that directly contains the given shape. -
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.RoundedPolygon
getShape()
Returns the shape directly contained by this shape group.Methods inherited from class drawit.shapegroups1.ShapeGroup
bringToFront, getAllVertices, getParentGroup, scale, sendToBack, translate
-
Constructor Details
-
LeafShapeGroup
Initializes this object to represent a leaf shape group that directly contains the given shape.
-
-
Method Details
-
getShape
Returns the shape directly contained by this shape group. -
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
-
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
-