|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.slides.SmartArtNode
public class SmartArtNode
Represents node of SmartArt object
Method Summary | |
---|---|
IFillFormat |
getBulletFillFormat()
Returns the FillFormat object that contains fill formatting properties for a node bullet Read-only FillFormat . |
ISmartArtNodeCollection |
getChildNodes()
Returns collections of all child nodes of the current node Read-only SmartArtNodeCollection . |
int |
getLevel()
Nesting level of node Read-only int |
int |
getPosition()
Zero-based position of node among sibling nodes. |
ITextFrame |
getTextFrame()
Return or set text of the SmartArt node. |
boolean |
isAssistant()
Return or set node as assistant. |
boolean |
remove()
Remove current node. |
void |
setAssistant(boolean value)
|
void |
setPosition(int value)
|
void |
setTextFrame(ITextFrame value)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public ISmartArtNodeCollection getChildNodes()
Returns collections of all child nodes of the current node
Read-only SmartArtNodeCollection
.
[C#] Presentation pres = new Presentation("demo.pptx"); SmartArt smart = (SmartArt)pres.Slides[0].Shapes[0]; SmartArtNode node0 = smart.AllNodes[0]; for ( int i = 0; i < node0.ChildNodes.Count; i++) { SmartArtNode node = node0.ChildNodes[i]; string outString = string.Format("i = {0}, Text = {1}, Level = {2}, Position = {3}", i, node.TextFrame.Text, node.Level, node.Position); Console.WriteLine(outString); }[Visual Basic] Dim pres As New Presentation("demo.pptx") Dim smart As SmartArt = DirectCast(pres.Slides(0).Shapes(0), SmartArt) Dim node0 As SmartArtNode = smart.AllNodes(0); Dim i As Integer = 0 While i < node0.ChildNodes.Count Dim node As SmartArtNode = node0.ChildNodes(i) Dim outString As String = String.Format("i = {0}, Text = {1}, Level = {2}, Position = {3}", i, node.TextFrame.Text, node.Level, node.Position) Console.WriteLine(outString) System.Math.Max(System.Threading.Interlocked.Increment(i),i - 1) End While
getChildNodes
in interface ISmartArtNode
public ITextFrame getTextFrame()
Return or set text of the SmartArt node.
Read/write TextFrame
[C#] Presentation pres = new Presentation("demo.pptx"); SmartArt smart = (SmartArt)pres.Slides[0].Shapes[0]; SmartArtNode node0 = smart.AllNodes[0]; for ( int i = 0; i < node0.ChildNodes.Count; i++) { SmartArtNode node = node0.ChildNodes[i]; Console.WriteLine(node.TextFrame.Text); node.TextFrame.Text = "New text " + i; }[Visual Basic] Dim pres As New Presentation("demo.pptx") Dim smart As SmartArt = DirectCast(pres.Slides(0).Shapes(0), SmartArt) Dim node0 As SmartArtNode = smart.AllNodes(0) Dim i As Integer = 0 While i < node0.ChildNodes.Count Dim node As SmartArtNode = node0.ChildNodes(i) Console.WriteLine(node.TextFrame.Text) node.TextFrame.Text = "New text " + i System.Math.Max(System.Threading.Interlocked.Increment(i),i - 1) End While
getTextFrame
in interface ISmartArtNode
public void setTextFrame(ITextFrame value)
setTextFrame
in interface ISmartArtNode
public boolean isAssistant()
Return or set node as assistant.
Read/write bool
[C#] Presentation pres = new Presentation(); Slide slide = pres.Slides[0]; SmartArt smart = slide.Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.Hierarchy); foreach (SmartArtNode node in smart.AllNodes) { if (node.IsAssistant) node.IsAssistant = false; }[Visual Basic] Dim pres As New Presentation() Dim slide As SlideE = pres.Slides(0) Dim smart As SmartArt = slide.Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.Hierarchy) For Each node As SmartArtNode In smart.AllNodes If node.IsAssistant Then node.IsAssistant = False End If Next
isAssistant
in interface ISmartArtNode
public void setAssistant(boolean value)
setAssistant
in interface ISmartArtNode
public int getLevel()
Nesting level of node
Read-only int
[C#] Presentation pres = new Presentation("demo.pptx"); SmartArt smart = (SmartArt)pres.Slides[0].Shapes[0]; for ( int i = 0; i < smart.AllNodes.Count; i++) { if (smart.AllNodes[i].Level == 2) Console.WriteLine(smart.AllNodes[i].Level + " " + smart.AllNodes[i].TextFrame.Text); }[Visual Basic] Dim pres As New Presentation("demo.pptx") Dim smart As SmartArt = DirectCast(pres.Slides(0).Shapes(0), SmartArt) Dim i As Integer = 0 While i < smart.AllNodes.Count If smart.AllNodes(i).Level = 2 Then Console.WriteLine(smart.AllNodes(i).Level + " " + smart.AllNodes(i).TextFrame.Text) End If System.Math.Max(System.Threading.Interlocked.Increment(i),i - 1) End While
getLevel
in interface ISmartArtNode
public IFillFormat getBulletFillFormat()
Returns the FillFormat object that contains fill formatting properties for a node bullet
Read-only FillFormat
.
Note: can return null for certain types of SmartArt layout which does not provide bullets for nodes
getBulletFillFormat
in interface ISmartArtNode
public int getPosition()
Zero-based position of node among sibling nodes.
Read/write int
[C#] Presentation pres = new Presentation("demo.pptx"); SmartArt smart = (SmartArt)pres.Slides[0].Shapes[0]; SmartArtNode node = smart.AllNodes[0]; if (node.ChildNodes.Count > 3) node.ChildNodes[0].Position = node.ChildNodes[0].Position + 1;[Visual Basic] Dim pres As New Presentation("demo.pptx") Dim smart As SmartArt = DirectCast(pres.Slides(0).Shapes(0), SmartArt) Dim node As SmartArtNode = smart.AllNodes(0) If node.ChildNodes.Count > 3 Then node.ChildNodes(0).Position = node.ChildNodes(0).Position + 1 End If
getPosition
in interface ISmartArtNode
com.aspose.ms.System.ArgumentOutOfRangeException
- value is less than 0. -or- value is equal to or greater than siblings countpublic void setPosition(int value)
setPosition
in interface ISmartArtNode
public boolean remove()
Remove current node.
Presentation pres = new Presentation("demo.pptx"); SmartArt smart = (SmartArt)pres.Slides[0].Shapes[0]; SmartArtNode node = smart.AllNodes[0]; node.Remove();[Visual Basic] Dim pres As New Presentation("demo.pptx") Dim smart As SmartArt = DirectCast(pres.Slides(0).Shapes(0), SmartArt) Dim node As SmartArtNode = smart.AllNodes(0) node.Remove()
remove
in interface ISmartArtNode
True
if removed succesfully, otherwise false
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |