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 Details

    • LeafShapeGroup

      public LeafShapeGroup​(RoundedPolygon shape)
      Initializes this object to represent a leaf shape group that directly contains the given shape.
  • Method Details

    • getShape

      public RoundedPolygon getShape()
      Returns the shape directly contained by this shape group.
    • getAllShapes

      public List<RoundedPolygon> 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 class ShapeGroup
    • getDrawingCommands

      public String 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, see RoundedPolygon.getDrawingCommands().
      Specified by:
      getDrawingCommands in class ShapeGroup
    • getBoundingBox

      public Extent 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 class ShapeGroup