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

Page()

public Page()

Initializes a new instance of the Page class.

getPageContentRevisionSummary()

public RevisionSummary getPageContentRevisionSummary()

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

Returns: RevisionSummary

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

getTitle()

public Title getTitle()

Gets or sets the title.

Value: The Title .

Returns: Title

setTitle(Title value)

public void setTitle(Title value)

Gets or sets the title.

Value: The Title .

Parameters:

ParameterTypeDescription
valueTitle

getLastModifiedTime()

public Date getLastModifiedTime()

Gets or sets the last modified time.

Returns: java.util.Date

setLastModifiedTime(Date value)

public void setLastModifiedTime(Date value)

Gets or sets the last modified time.

Parameters:

ParameterTypeDescription
valuejava.util.Date

getCreationTime()

public Date getCreationTime()

Gets or sets the creation time.

Returns: java.util.Date

setCreationTime(Date value)

public void setCreationTime(Date value)

Gets or sets the creation time.

Parameters:

ParameterTypeDescription
valuejava.util.Date

getLevel()

public byte getLevel()

Gets or sets the level.

Returns: byte

setLevel(byte value)

public void setLevel(byte value)

Gets or sets the level.

Parameters:

ParameterTypeDescription
valuebyte

getMargin()

public Margins getMargin()

Gets or sets the margin.

Returns: Margins

setMargin(Margins value)

public void setMargin(Margins value)

Gets or sets the margin.

Parameters:

ParameterTypeDescription
valueMargins

getAuthor()

public String getAuthor()

Gets or sets the author.

Returns: java.lang.String

setAuthor(String value)

public void setAuthor(String value)

Gets or sets the author.

Parameters:

ParameterTypeDescription
valuejava.lang.String

getBackgroundColor()

public final Color getBackgroundColor()

Gets or sets page’s background color.

Returns: java.awt.Color

setBackgroundColor(Color value)

public final void setBackgroundColor(Color value)

Gets or sets page’s background color.

Parameters:

ParameterTypeDescription
valuejava.awt.Color

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

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

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

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

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

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

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(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.

deepClone()

public final Page deepClone()

Clones the page.

Returns: Page - A clone of the page.