com.aspose.words
Class Frameset

java.lang.Object
    extended by com.aspose.words.Frameset

public class Frameset 
extends java.lang.Object

Represents a frames page or a single frame on a frames page.

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

If the ChildFramesets property contains items, this instance is a frames page, otherwise it is a single frame.

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
Frameset()
          
 
Property Getters/Setters Summary
FramesetCollectiongetChildFramesets()
           Gets the collection of child frames and frames pages.
java.lang.StringgetFrameDefaultUrl()
voidsetFrameDefaultUrl(java.lang.String value)
           Gets or sets the web page URL or document file name to display in this frame.
booleanisFrameLinkToFile()
voidisFrameLinkToFile(boolean value)
           Gets or sets a value indicating whether the web page or document file name specified in the FrameDefaultUrl property is an external resource the frame is linked with.
 

Constructor Detail

Frameset

public Frameset()

Property Getters/Setters Detail

getChildFramesets

public FramesetCollection getChildFramesets()
Gets the collection of child frames and frames pages.

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);

getFrameDefaultUrl/setFrameDefaultUrl

public java.lang.String getFrameDefaultUrl() / public void setFrameDefaultUrl(java.lang.String value)
Gets or sets the web page URL or document file name to display in this frame.

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);

isFrameLinkToFile/isFrameLinkToFile

public boolean isFrameLinkToFile() / public void isFrameLinkToFile(boolean value)
Gets or sets a value indicating whether the web page or document file name specified in the FrameDefaultUrl property is an external resource the frame is linked with.

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);

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