|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.slides.SmartArtNodeCollection
public class SmartArtNodeCollection
Represents a collection of a SmartArt nodes.
Method Summary | |
---|---|
ISmartArtNode |
addNode()
Add new smart art node or sub node. |
ISmartArtNode |
addNodeByPosition(int position)
Add new node in the selected position of nodes collection |
void |
copyTo(com.aspose.ms.System.Array array,
int index)
Copies all elements from the collection to the specified array. |
ISmartArtNode |
get_Item(int index)
Returns node by index |
int |
getCount()
Returns count of nodes in collection |
ISmartArtNode |
getNodeByPosition(int position)
Get node by position between siblings |
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(ISmartArtNode node)
Remove node or sub node |
boolean |
removeNodeByPosition(int position)
Remove node from selected position |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public int getCount()
Returns count of nodes in collection
getCount
in interface ISmartArtNodeCollection
public ISmartArtNode get_Item(int index)
Returns node by index
get_Item
in interface ISmartArtNodeCollection
index
- The zero-based index of the element
public ISmartArtNode getNodeByPosition(int position)
Get node by position between siblings
[C#] SmartArt smart = pres.Slides[0].Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutType.StackedList); SmartArtNode node = smart.AllNodes[0]; SmartArtNode chNode = node.ChildNodes.GetNodeByPosition(3);[Visual Basic] Private smart As SmartArt = pres.Slides(0).Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutType.StackedList) Private node As SmartArtNode = smart.AllNodes(0) Private chNode As SmartArtNode = node.ChildNodes.GetNodeByPosition(3)
getNodeByPosition
in interface ISmartArtNodeCollection
position
- Zero-based position
public ISmartArtNode addNode()
Add new smart art node or sub node.
[C#] Presentation pres = new Presentation("demo.pptx"); SmartArt smart = (SmartArt) pres.Slides[0].Shapes[0]; SmartArtNode exNode = smart.AllNodes[0]; SmartArtNode newNode = exNode.ChildNodes.AddNode();[Visual Basic] Private pres As New Presentation("demo.pptx") Private smart As SmartArt = DirectCast(pres.Slides(0).Shapes(0), SmartArt) Private exNode As SmartArtNode = smart.AllNodes(0) Private newNode As SmartArtNode = exNode.ChildNodes.AddNode()
addNode
in interface ISmartArtNodeCollection
public void removeNode(int index)
Remove node or sub node by index
removeNode
in interface ISmartArtNodeCollection
index
- Zero-based index of node
com.aspose.ms.System.ArgumentOutOfRangeException
- index is less than 0. -or- index is equal to or greater than siblings countpublic void removeNode(ISmartArtNode node)
Remove node or sub node
[C#] Presentation pres = new Presentation("demo.pptx"); SmartArt smart = (SmartArt) pres.Slides[0].Shapes[0]; if (smart.AllNodes.Count > 0 ) { SmartArtNode node = smart.AllNodes[0]; smart.AllNodes.RemoveNode(node); }[Visual Basic] Dim pres As New Presentation("demo.pptx") Dim smart As SmartArt = DirectCast(pres.Slides(0).Shapes(0), SmartArt) If smart.AllNodes.Count > 0 Then Dim node As SmartArtNode = smart.AllNodes(0) smart.AllNodes.RemoveNode(node) End If
removeNode
in interface ISmartArtNodeCollection
node
- Node to removepublic boolean removeNodeByPosition(int position)
Remove node from selected position
[C#] SmartArt smart = pres.Slides[0].Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutType.StackedList); SmartArtNode node = smart.AllNodes[0]; if (node.ChildNodes.Count >=5) { node.ChildNodes.RemoveNodeByPosition(3); }[Visual Basic] Dim smart As SmartArt = pres.Slides(0).Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutType.StackedList) Dim node As SmartArtNode = smart.AllNodes(0) If node.ChildNodes.Count >= 5 Then node.ChildNodes.RemoveNodeByPosition(3) End If
removeNodeByPosition
in interface ISmartArtNodeCollection
position
-
public ISmartArtNode addNodeByPosition(int position)
Add new node in the selected position of nodes collection
[C#] SmartArt smart = pres.Slides[0].Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutType.StackedList); SmartArtNode node = smart.AllNodes[0]; SmartArtNode chNode = node.ChildNodes.AddNodeByPosition(2);[Visual Basic] Private smart As SmartArt = pres.Slides(0).Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutType.StackedList) Private node As SmartArtNode = smart.AllNodes(0) Private chNode As SmartArtNode = node.ChildNodes.AddNodeByPosition(2)
addNodeByPosition
in interface ISmartArtNodeCollection
position
- Zero-base node position
com.aspose.ms.System.ArgumentOutOfRangeException
- position is less than 0public com.aspose.ms.System.Collections.IEnumerator iterator()
Returns an enumerator for the entire collection.
iterator
in interface com.aspose.ms.System.Collections.IEnumerable
iterator
in interface java.lang.Iterable
public void copyTo(com.aspose.ms.System.Array array, int index)
Copies all elements from the collection to the specified array.
array
- index
- public boolean isSynchronized()
Returns a value indicating whether access to the collection is synchronized (thread-safe).
public java.lang.Object getSyncRoot()
Returns a synchronization root.
Readonly object
.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |