com.aspose.diagram

Class ShapeCollection

  • java.lang.Object
  • All Implemented Interfaces:
    java.lang.Iterable
    public class ShapeCollection 
    extends Collection

Collection of Shapes.

Property Getters/Setters Summary
intgetCount()
Gets the number of elements actually contained in the collection.
Shapeget(intindex)
Gets the element at the specified index.
 
Method Summary
intadd(Shape item)
Add the shape in the collection.
voidclear()
Removes all elements from collection.
ShapegetShape(java.lang.Stringname)
Gets the element at the specified name.
ShapegetShape(longID)
Gets the element at the specified ID.
Shapegroup(com.aspose.diagram.Shape[]groupItems)
Group the shapes.
booleanisExist(intindex)
Is exist item in the collection.
java.util.Iteratoriterator()
Supports a simple iteration over a nongeneric collection.
voidremove(Shape item)
Remove the shape from the collection.
 

    • Property Getters/Setters Detail

      • getCount

        public int getCount()
        
        Gets the number of elements actually contained in the collection.
      • get

        public Shape get(int index)
        
        Gets the element at the specified index.
        Parameters:
        index -
        Returns:
    • Method Detail

      • add

        public int add(Shape item)
        Add the shape in the collection.
        Parameters:
        item -
        Returns:
        ID
      • remove

        public void remove(Shape item)
        Remove the shape from the collection.
        Parameters:
        item - Shape
      • group

        public Shape group(com.aspose.diagram.Shape[] groupItems)
                   throws java.lang.Exception
        Group the shapes. The shape in the groupItems should not be grouped. The shape must be in this Shapes collection.
        Parameters:
        groupItems - the group items.
        Returns:
        Return the group shape.
      • getShape

        public Shape getShape(java.lang.String name)
        Gets the element at the specified name.
        Parameters:
        name -
        Returns:
      • getShape

        public Shape getShape(long ID)
        Gets the element at the specified ID.
        Parameters:
        ID -
        Returns:
      • iterator

        public java.util.Iterator iterator()
        Supports a simple iteration over a nongeneric collection.
        Returns:
      • isExist

        public boolean isExist(int index)
        Is exist item in the collection.
        Parameters:
        index - index of element.
        Returns:
      • clear

        public void clear()
        Removes all elements from collection.