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 Details

    • NonleafShapeGroup

      public NonleafShapeGroup​(ShapeGroup[] subgroups)
      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

      public List<ShapeGroup> 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

      public ShapeGroup getSubgroup​(int index)
      Returns the subgroup at the given (zero-based) index in the list of subgroups directly contained by this shape group.
    • 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
    • getSubgroupAt

      public 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.
    • 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