com.aspose.slides
Class SmartArtNodeExCollection

java.lang.Object
  extended by com.aspose.slides.SmartArtNodeExCollection
All Implemented Interfaces:
com.aspose.ms.System.Collections.IEnumerable, java.lang.Iterable
Direct Known Subclasses:
DiagramNodeExCollection

public class SmartArtNodeExCollection
extends java.lang.Object
implements com.aspose.ms.System.Collections.IEnumerable

Represents a collection of a SmartArt nodes.


Method Summary
 SmartArtNodeEx addNode()
           Add new smart art node or sub node.
 SmartArtNodeEx addNodeByPosition(int position)
           Add new node in the selected position of nodes collection [C#] SmartArtEx smart = pres.Slides[0].Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.StackedList); SmartArtNodeEx node = smart.AllNodes[0]; SmartArtNodeEx chNode = node.ChildNodes.AddNodeByPosition(2); [Visual Basic] Private smart As SmartArtEx = pres.Slides(0).Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.StackedList) Private node As SmartArtNodeEx = smart.AllNodes(0) Private chNode As SmartArtNodeEx = node.ChildNodes.AddNodeByPosition(2)
 void copyTo(com.aspose.ms.System.Array array, int index)
           Copies all elements from the collection to the specified array.
 SmartArtNodeEx get_Item(int index)
           Returnsnode by index
 int getCount()
           Returns count of nodes in collection
 SmartArtNodeEx getNodeByPosition(int position)
           Get node by selected position [C#] SmartArtEx smart = pres.Slides[0].Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.StackedList); SmartArtNodeEx node = smart.AllNodes[0]; SmartArtNodeEx chNode = node.ChildNodes.GetNodeByPosition(3); [Visual Basic] Private smart As SmartArtEx = pres.Slides(0).Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.StackedList) Private node As SmartArtNodeEx = smart.AllNodes(0) Private chNode As SmartArtNodeEx = node.ChildNodes.GetNodeByPosition(3)
 java.lang.Object getSyncRoot()
           Returns a synchronization root.
 boolean isSynchronized()
           Returns a value indicating whether access to the collection is synchronized (thread-safe).
 com.aspose.ms.System.Collections.IEnumerator iterator()
           Returns an enumerator for the entire collection.
 void removeNode(int index)
           Remove node or sub node by index
 void removeNode(SmartArtNodeEx node)
           Remove node or sub node [C#] PresentationEx pres = new PresentationEx("demo.pptx"); SmartArtEx smart = (SmartArtEx) pres.Slides[0].Shapes[0]; if (smart.AllNodes.Count > 0 ) { SmartArtNodeEx node = smart.AllNodes[0]; smart.AllNodes.RemoveNode(node); } [Visual Basic] Dim pres As New PresentationEx("demo.pptx") Dim smart As SmartArtEx = DirectCast(pres.Slides(0).Shapes(0), SmartArtEx) If smart.AllNodes.Count > 0 Then Dim node As SmartArtNodeEx = smart.AllNodes(0) smart.AllNodes.RemoveNode(node) End If
 boolean removeNodeByPosition(int position)
           Remove node from selected position [C#] SmartArtEx smart = pres.Slides[0].Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.StackedList); SmartArtNodeEx node = smart.AllNodes[0]; if (node.ChildNodes.Count >=5) { node.ChildNodes.RemoveNodeByPosition(3); } [Visual Basic] Dim smart As SmartArtEx = pres.Slides(0).Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.StackedList) Dim node As SmartArtNodeEx = smart.AllNodes(0) If node.ChildNodes.Count >= 5 Then node.ChildNodes.RemoveNodeByPosition(3) End If
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCount

public int getCount()

Returns count of nodes in collection


get_Item

public SmartArtNodeEx get_Item(int index)

Returnsnode by index

Parameters:
index -
Returns:

addNode

public SmartArtNodeEx addNode()

Add new smart art node or sub node.


 
 [C#]
 PresentationEx pres = new PresentationEx("demo.pptx");
 SmartArtEx smart = (SmartArtEx) pres.Slides[0].Shapes[0];
 SmartArtNodeEx exNode = smart.AllNodes[0];
 SmartArtNodeEx newNode = exNode.ChildNodes.AddNode();
 
 [Visual Basic]
 Private pres As New PresentationEx("demo.pptx")
 Private smart As SmartArtEx = DirectCast(pres.Slides(0).Shapes(0), SmartArtEx)
 Private exNode As SmartArtNodeEx = smart.AllNodes(0)
 Private newNode As SmartArtNodeEx = exNode.ChildNodes.AddNode()
 

Returns:

removeNode

public void removeNode(int index)

Remove node or sub node by index

Parameters:
index -

removeNode

public void removeNode(SmartArtNodeEx node)

Remove node or sub node


 
 [C#]
 PresentationEx pres = new PresentationEx("demo.pptx");
 SmartArtEx smart = (SmartArtEx) pres.Slides[0].Shapes[0];
 if (smart.AllNodes.Count > 0 )
        {
            SmartArtNodeEx node =  smart.AllNodes[0];
            smart.AllNodes.RemoveNode(node);
        }
 
 [Visual Basic]
 Dim pres As New PresentationEx("demo.pptx")
 Dim smart As SmartArtEx = DirectCast(pres.Slides(0).Shapes(0), SmartArtEx)
 If smart.AllNodes.Count > 0 Then
        Dim node As SmartArtNodeEx = smart.AllNodes(0)
        smart.AllNodes.RemoveNode(node)
 End If
 

Parameters:
node -

getNodeByPosition

public SmartArtNodeEx getNodeByPosition(int position)

Get node by selected position


 
 [C#]
 SmartArtEx smart = pres.Slides[0].Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.StackedList);
 SmartArtNodeEx node = smart.AllNodes[0];
 SmartArtNodeEx chNode = node.ChildNodes.GetNodeByPosition(3);
 
 [Visual Basic]
 Private smart As SmartArtEx = pres.Slides(0).Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.StackedList)
 Private node As SmartArtNodeEx = smart.AllNodes(0)
 Private chNode As SmartArtNodeEx = node.ChildNodes.GetNodeByPosition(3)
 

Parameters:
position -
Returns:

removeNodeByPosition

public boolean removeNodeByPosition(int position)

Remove node from selected position


 
 [C#]
 SmartArtEx smart = pres.Slides[0].Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.StackedList);
        SmartArtNodeEx node = smart.AllNodes[0];
        if (node.ChildNodes.Count >=5)
       {
            node.ChildNodes.RemoveNodeByPosition(3);
        }
 
 [Visual Basic]
 Dim smart As SmartArtEx = pres.Slides(0).Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.StackedList)
 Dim node As SmartArtNodeEx = smart.AllNodes(0)
 If node.ChildNodes.Count >= 5 Then
        node.ChildNodes.RemoveNodeByPosition(3)
 End If
 

Parameters:
position -
Returns:

addNodeByPosition

public SmartArtNodeEx addNodeByPosition(int position)

Add new node in the selected position of nodes collection


 
 [C#]
 SmartArtEx smart = pres.Slides[0].Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.StackedList);
 SmartArtNodeEx node = smart.AllNodes[0];
 SmartArtNodeEx chNode = node.ChildNodes.AddNodeByPosition(2);
 
 [Visual Basic]
 Private smart As SmartArtEx = pres.Slides(0).Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.StackedList)
 Private node As SmartArtNodeEx = smart.AllNodes(0)
 Private chNode As SmartArtNodeEx = node.ChildNodes.AddNodeByPosition(2)
 

Parameters:
position -
Returns:

iterator

public com.aspose.ms.System.Collections.IEnumerator iterator()

Returns an enumerator for the entire collection.

Specified by:
iterator in interface com.aspose.ms.System.Collections.IEnumerable
Specified by:
iterator in interface java.lang.Iterable
Returns:

copyTo

public void copyTo(com.aspose.ms.System.Array array,
                   int index)

Copies all elements from the collection to the specified array.

Parameters:
array -
index -

isSynchronized

public boolean isSynchronized()

Returns a value indicating whether access to the collection is synchronized (thread-safe).


getSyncRoot

public java.lang.Object getSyncRoot()

Returns a synchronization root. Readonly object.