Examples of ISmartArtNode


Examples of com.aspose.slides.ISmartArtNode

        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())
                .removeNodeByPosition(1);
          }
        }
      }
    }
View Full Code Here

Examples of com.aspose.slides.ISmartArtNode

                                                                                                              
      //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                                                                                              
      chNode.getTextFrame().setText("Sample Text Added");                                                     
                                                                                                              
      //Save Presentation                                                                                     
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.