com.aspose.words
Class FramesetCollection

java.lang.Object
    extended by com.aspose.words.FramesetCollection
All Implemented Interfaces:
java.lang.Iterable

public class FramesetCollection 
extends java.lang.Object

Represents a collection of instances of the Frameset class.

To learn more, visit the Programming with Documents documentation article.

Example:

Shows how to access frames on-page.
// Document contains several frames with links to other documents.
Document doc = new Document(getMyDir() + "Frameset.docx");

// We can check the default URL (a web page URL or local document) or if the frame is an external resource.
Assert.assertEquals("https://file-examples-com.github.io/uploads/2017/02/file-sample_100kB.docx",
        doc.getFrameset().getChildFramesets().get(0).getChildFramesets().get(0).getFrameDefaultUrl());
Assert.assertTrue(doc.getFrameset().getChildFramesets().get(0).getChildFramesets().get(0).isFrameLinkToFile());

Assert.assertEquals("Document.docx", doc.getFrameset().getChildFramesets().get(1).getFrameDefaultUrl());
Assert.assertFalse(doc.getFrameset().getChildFramesets().get(1).isFrameLinkToFile());

// Change properties for one of our frames.
doc.getFrameset().getChildFramesets().get(0).getChildFramesets().get(0).setFrameDefaultUrl("https://github.com/aspose-words/Aspose.Words-for-.NET/blob/master/Examples/Data/Absolute%20position%20tab.docx");
doc.getFrameset().getChildFramesets().get(0).getChildFramesets().get(0).isFrameLinkToFile(false);

Constructor Summary
FramesetCollection()
          
 
Property Getters/Setters Summary
intgetCount()
           Gets the number of frames or frames pages contained in the collection.
Framesetget(int index)
           Gets a frame or frames page at the specified index.
 
Method Summary
java.util.Iterator<Frameset>iterator()
           Returns an enumerator that iterates through the collection.
 

Constructor Detail

FramesetCollection

public FramesetCollection()

Property Getters/Setters Detail

getCount

public int getCount()
Gets the number of frames or frames pages contained in the collection.

Example:

Shows how to access frames on-page.
// Document contains several frames with links to other documents.
Document doc = new Document(getMyDir() + "Frameset.docx");

// We can check the default URL (a web page URL or local document) or if the frame is an external resource.
Assert.assertEquals("https://file-examples-com.github.io/uploads/2017/02/file-sample_100kB.docx",
        doc.getFrameset().getChildFramesets().get(0).getChildFramesets().get(0).getFrameDefaultUrl());
Assert.assertTrue(doc.getFrameset().getChildFramesets().get(0).getChildFramesets().get(0).isFrameLinkToFile());

Assert.assertEquals("Document.docx", doc.getFrameset().getChildFramesets().get(1).getFrameDefaultUrl());
Assert.assertFalse(doc.getFrameset().getChildFramesets().get(1).isFrameLinkToFile());

// Change properties for one of our frames.
doc.getFrameset().getChildFramesets().get(0).getChildFramesets().get(0).setFrameDefaultUrl("https://github.com/aspose-words/Aspose.Words-for-.NET/blob/master/Examples/Data/Absolute%20position%20tab.docx");
doc.getFrameset().getChildFramesets().get(0).getChildFramesets().get(0).isFrameLinkToFile(false);

get

public Frameset get(int index)
Gets a frame or frames page at the specified index.

Example:

Shows how to access frames on-page.
// Document contains several frames with links to other documents.
Document doc = new Document(getMyDir() + "Frameset.docx");

// We can check the default URL (a web page URL or local document) or if the frame is an external resource.
Assert.assertEquals("https://file-examples-com.github.io/uploads/2017/02/file-sample_100kB.docx",
        doc.getFrameset().getChildFramesets().get(0).getChildFramesets().get(0).getFrameDefaultUrl());
Assert.assertTrue(doc.getFrameset().getChildFramesets().get(0).getChildFramesets().get(0).isFrameLinkToFile());

Assert.assertEquals("Document.docx", doc.getFrameset().getChildFramesets().get(1).getFrameDefaultUrl());
Assert.assertFalse(doc.getFrameset().getChildFramesets().get(1).isFrameLinkToFile());

// Change properties for one of our frames.
doc.getFrameset().getChildFramesets().get(0).getChildFramesets().get(0).setFrameDefaultUrl("https://github.com/aspose-words/Aspose.Words-for-.NET/blob/master/Examples/Data/Absolute%20position%20tab.docx");
doc.getFrameset().getChildFramesets().get(0).getChildFramesets().get(0).isFrameLinkToFile(false);

Method Detail

iterator

public java.util.Iterator<Framesetiterator()
Returns an enumerator that iterates through the collection.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.