Page

Inheritance: java.lang.Object, com.aspose.note.Node, com.aspose.note.CompositeNodeBase, com.aspose.note.CompositeNode

public final class Page extends CompositeNode<IPageChildNode>

Represents a page.

Constructors

ConstructorDescription
Page()Initializes a new instance of the Page class.

Methods

MethodDescription
accept(DocumentVisitor visitor)Accepts the visitor of the node.
deepClone()Clones the page.
deepClone(boolean cloneHistory)Clones the page.
getAuthor()Gets or sets the author.
getBackgroundColor()Gets or sets page’s background color.
getCreationTime()Gets or sets the creation time.
getLastModifiedTime()Gets or sets the last modified time.
getLevel()Gets or sets the level.
getMargin()Gets or sets the margin.
getPageContentRevisionSummary()Gets or sets the revision summary for the page and it’s child nodes.
getPageLayoutSize()Gets page’s layout size displayed in the editor.
getSizeType()Gets or sets the size type of a page.
getTitle()Gets or sets the title.
isConflictPage()Gets or sets a value indicating whether this page is a conflict page.
setAuthor(String value)Gets or sets the author.
setBackgroundColor(Color value)Gets or sets page’s background color.
setConflictPage(boolean value)Gets or sets a value indicating whether this page is a conflict page.
setCreationTime(Date value)Gets or sets the creation time.
setLastModifiedTime(Date value)Gets or sets the last modified time.
setLevel(byte value)Gets or sets the level.
setMargin(Margins value)Gets or sets the margin.
setPageContentRevisionSummary(RevisionSummary value)Gets or sets the revision summary for the page and it’s child nodes.
setPageLayoutSize(Dimension2D value)Sets page’s layout size displayed in the editor.
setSizeType(int value)Gets or sets the size type of a page.
setTitle(Title value)Gets or sets the title.

Page()

public Page()

Initializes a new instance of the Page class.

accept(DocumentVisitor visitor)

public void accept(DocumentVisitor visitor)

Accepts the visitor of the node.

Parameters:

ParameterTypeDescription
visitorDocumentVisitorThe object of a class derived from the DocumentVisitor.

deepClone()

public final Page deepClone()

Clones the page.

Returns: Page - A clone of the page.

deepClone(boolean cloneHistory)

public final Page deepClone(boolean cloneHistory)

Clones the page.

Parameters:

ParameterTypeDescription
cloneHistorybooleanSpecifies if page’s history should be cloned..

Returns: Page - A clone of the page.

getAuthor()

public String getAuthor()

Gets or sets the author.

Returns: java.lang.String

getBackgroundColor()

public final Color getBackgroundColor()

Gets or sets page’s background color.

Returns: java.awt.Color

getCreationTime()

public Date getCreationTime()

Gets or sets the creation time.

Returns: java.util.Date

getLastModifiedTime()

public Date getLastModifiedTime()

Gets or sets the last modified time.

Returns: java.util.Date

getLevel()

public byte getLevel()

Gets or sets the level.

Returns: byte

getMargin()

public Margins getMargin()

Gets or sets the margin.

Returns: Margins

getPageContentRevisionSummary()

public RevisionSummary getPageContentRevisionSummary()

Gets or sets the revision summary for the page and it’s child nodes.

Returns: RevisionSummary

getPageLayoutSize()

public final Dimension2D getPageLayoutSize()

Gets page’s layout size displayed in the editor.


This value is used by Microsoft OneNote application to display underlying page layout when document is opened. It doesn’t affect printing and saving of the document anyway. When Page.SizeType property is set to PageSizeType.SizeByContent this property returns real size of the content.

Returns: java.awt.geom.Dimension2D

getSizeType()

public final int getSizeType()

Gets or sets the size type of a page.


By default, a page resizes automatically. The default value is PageSizeType.SizeByContent.

Returns: int

getTitle()

public Title getTitle()

Gets or sets the title.

Value: The Title.

Returns: Title

isConflictPage()

public final boolean isConflictPage()

Gets or sets a value indicating whether this page is a conflict page.


The conflict page arises when two users try to update the same content. In this case the changes of first user are written as usual. But changes of another user can’t be merged. So just a copy of page is created and marked as conflict.

At this version the conflicts are resolved in favor of the first user’s changes. So if document has conflict pages then they will be shown in history but they will be skipped on saving. It is possible to reset this flag to save this pages in history as usual ones.

Detailed sample of manipulating by conflict page can be found in the online documentation.

Returns: boolean

setAuthor(String value)

public void setAuthor(String value)

Gets or sets the author.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setBackgroundColor(Color value)

public final void setBackgroundColor(Color value)

Gets or sets page’s background color.

Parameters:

ParameterTypeDescription
valuejava.awt.Color

setConflictPage(boolean value)

public final void setConflictPage(boolean value)

Gets or sets a value indicating whether this page is a conflict page.


The conflict page arises when two users try to update the same content. In this case the changes of first user are written as usual. But changes of another user can’t be merged. So just a copy of page is created and marked as conflict.

At this version the conflicts are resolved in favor of the first user’s changes. So if document has conflict pages then they will be shown in history but they will be skipped on saving. It is possible to reset this flag to save this pages in history as usual ones.

Detailed sample of manipulating by conflict page can be found in the online documentation.

Parameters:

ParameterTypeDescription
valueboolean

setCreationTime(Date value)

public void setCreationTime(Date value)

Gets or sets the creation time.

Parameters:

ParameterTypeDescription
valuejava.util.Date

setLastModifiedTime(Date value)

public void setLastModifiedTime(Date value)

Gets or sets the last modified time.

Parameters:

ParameterTypeDescription
valuejava.util.Date

setLevel(byte value)

public void setLevel(byte value)

Gets or sets the level.

Parameters:

ParameterTypeDescription
valuebyte

setMargin(Margins value)

public void setMargin(Margins value)

Gets or sets the margin.

Parameters:

ParameterTypeDescription
valueMargins

setPageContentRevisionSummary(RevisionSummary value)

public void setPageContentRevisionSummary(RevisionSummary value)

Gets or sets the revision summary for the page and it’s child nodes.

Parameters:

ParameterTypeDescription
valueRevisionSummary

setPageLayoutSize(Dimension2D value)

public final void setPageLayoutSize(Dimension2D value)

Sets page’s layout size displayed in the editor.


This value is used by Microsoft OneNote application to display underlying page layout when document is opened. It doesn’t affect printing and saving of the document anyway. When Page.SizeType property is set to PageSizeType.SizeByContent this property returns real size of the content.

Parameters:

ParameterTypeDescription
valuejava.awt.geom.Dimension2D

setSizeType(int value)

public final void setSizeType(int value)

Gets or sets the size type of a page.


By default, a page resizes automatically. The default value is PageSizeType.SizeByContent.

Parameters:

ParameterTypeDescription
valueint

setTitle(Title value)

public void setTitle(Title value)

Gets or sets the title.

Value: The Title.

Parameters:

ParameterTypeDescription
valueTitle