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
Constructor | Description |
---|---|
Page() | Initializes a new instance of the Page class. |
Methods
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
visitor | DocumentVisitor | The 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:
Parameter | Type | Description |
---|---|---|
cloneHistory | boolean | Specifies 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:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setBackgroundColor(Color value)
public final void setBackgroundColor(Color value)
Gets or sets page’s background color.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.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:
Parameter | Type | Description |
---|---|---|
value | boolean |
setCreationTime(Date value)
public void setCreationTime(Date value)
Gets or sets the creation time.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.util.Date |
setLastModifiedTime(Date value)
public void setLastModifiedTime(Date value)
Gets or sets the last modified time.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.util.Date |
setLevel(byte value)
public void setLevel(byte value)
Gets or sets the level.
Parameters:
Parameter | Type | Description |
---|---|---|
value | byte |
setMargin(Margins value)
public void setMargin(Margins value)
Gets or sets the margin.
Parameters:
Parameter | Type | Description |
---|---|---|
value | Margins |
setPageContentRevisionSummary(RevisionSummary value)
public void setPageContentRevisionSummary(RevisionSummary value)
Gets or sets the revision summary for the page and it’s child nodes.
Parameters:
Parameter | Type | Description |
---|---|---|
value | RevisionSummary |
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:
Parameter | Type | Description |
---|---|---|
value | java.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:
Parameter | Type | Description |
---|---|---|
value | int |
setTitle(Title value)
public void setTitle(Title value)
Gets or sets the title.
Value: The Title
.
Parameters:
Parameter | Type | Description |
---|---|---|
value | Title |