Package com.aspose.slides

Examples of com.aspose.slides.ISmartArt


   
    //Get first slide
    ISlide slide = pres.getSlides().get_Item(0);
   
    //Add Smart Art Shape
    ISmartArt smart = slide.getShapes().addSmartArt(0, 0, 400, 400, SmartArtLayoutType.BasicBlockList);
   
    //Saving presentation
    pres.save("data/AsposeSmartArt.pptx", SaveFormat.Pptx);
         
    //=====================
    //Accessing Smart Art
    //=====================
    //Get first slide
    ISlide slide0 = pres.getSlides().get_Item(0);
   
    //Traverse through every shape inside first slide
    for(IShape shape : slide0.getShapes())
    {
        //Check if shape is of SmartArt type
        if (shape instanceof ISmartArt)
        {
            //Typecast shape to SmartArtEx
            ISmartArt smartArt = (ISmartArt)shape;
        }
    }
    System.out.println("Smart Art added and Accessed.");
  }
View Full Code Here


   
    //Get first slide
    ISlide slide = pres.getSlides().get_Item(0);
   
    //Add Smart Art Shape
    ISmartArt smart = slide.getShapes().addSmartArt(0, 0, 400, 400, SmartArtLayoutType.BasicBlockList);
   
    //Saving presentation
    pres.save("data/AsposeSmartArt.pptx", SaveFormat.Pptx);
         
    //=====================
    //Accessing Smart Art
    //=====================
    //Get first slide
    ISlide slide0 = pres.getSlides().get_Item(0);
   
    //Traverse through every shape inside first slide
    for(IShape shape : slide0.getShapes())
    {
        //Check if shape is of SmartArt type
        if (shape instanceof ISmartArt)
        {
            //Typecast shape to SmartArtEx
            ISmartArt smartArt = (ISmartArt)shape;
        }
    }

    System.out.println("Smart Art added and Accessed.");
  }
View Full Code Here

      // Check if shape is of SmartArt type
      if (shape instanceof ISmartArt)
      {
        // Typecast shape to SmartArtEx
        ISmartArt smart = (ISmartArt) shape;

        if (smart.getAllNodes().getCount() > 0)
        {
          // Accessing SmartArt node at index 0
          ISmartArtNode node = smart.getAllNodes().get_Item(0);

          // Removing the selected node
          smart.getAllNodes().removeNode(node);

        }
      }
    }

    // Save Presentation
    pres.save("data/AsposeRemoveSmartArtNode.pptx", SaveFormat.Pptx);

    //============================================
    // Removing Smart Art from Specific Location
    //============================================
       
    // Load the desired the presentation
    Presentation pres1 = new Presentation(
        "data/AsposeAddSmartArtNodeByPosition.pptx");

    // Traverse through every shape inside first slide
    for (IShape shape : pres1.getSlides().get_Item(0).getShapes())
    {

      // Check if shape is of SmartArt type
      if (shape instanceof SmartArt)
      {
        // Typecast shape to SmartArt
        SmartArt smart = (SmartArt) shape;

        if (smart.getAllNodes().getCount() > 0)
        {
          // Accessing SmartArt node at index 0
          ISmartArtNode node = smart.getAllNodes().get_Item(0);

          if (node.getChildNodes().getCount() >= 2)
          {
            // Removing the child node at position 1
            ((SmartArtNodeCollection) node.getChildNodes())
View Full Code Here

                                                                                                              
      //Access the presentation slide                                                                         
      ISlide slide = pres1.getSlides().get_Item(0);                                                            
                                                                                                              
      //Add Smart Art IShape                                                                                  
      ISmartArt smart = slide.getShapes().addSmartArt(0, 0, 400, 400, SmartArtLayoutType.StackedList);        
                                                                                                              
      //Accessing the SmartArt node at index 0                                                                
      ISmartArtNode node = smart.getAllNodes().get_Item(0);                                                   
                                                                                                              
      //Adding new child node at position 2 in parent node                                                    
      SmartArtNode chNode = (SmartArtNode)((SmartArtNodeCollection)node.getChildNodes()).addNodeByPosition(2);
                                                                                                              
      //Add Text                                                                                              
View Full Code Here

TOP

Related Classes of com.aspose.slides.ISmartArt

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.