Inline

Inheritance: java.lang.Object, com.aspose.words.Node

public abstract class Inline extends Node

Base class for inline-level nodes that can have character formatting associated with them, but cannot have child nodes of their own.

To learn more, visit the Logical Levels of Nodes in a Document documentation article.

A class derived from Inline can be a child of Paragraph.

Constructors

Constructor Description
Inline()

Methods

Method Description
accept(DocumentVisitor visitor) Accepts a visitor.
clearRunAttrs()
dd()
deepClone(boolean isCloneChildren) Creates a duplicate of the node.
equals(Object arg0)
fetchInheritedRunAttr(int fontAttr)
getAncestor(int ancestorType)
getAncestor(Class ancestorType) Gets the first ancestor of the specified object type.
getClass()
getCustomNodeId() Specifies custom node identifier.
getDirectRunAttr(int key)
getDirectRunAttr(int key, int revisionsView)
getDocument() Gets the document to which this node belongs.
getDocument_IInline()
getFont() Provides access to the font formatting of this object.
getNextSibling() Gets the node immediately following this node.
getNodeType() Gets the type of this node.
getParentNode() Gets the immediate parent of this node.
getParentParagraph() Retrieves the parent Paragraph of this node.
getParentParagraph_IInline()
getPreviousSibling() Gets the node immediately preceding this node.
getRange() Returns a Range object that represents the portion of a document that is contained in this node.
getText() Gets the text of this node and of all its children.
hashCode()
isComposite() Returns true if this node can contain other nodes.
isDeleteRevision() Returns true if this object was deleted in Microsoft Word while change tracking was enabled.
isFormatRevision() Returns true if formatting of the object was changed in Microsoft Word while change tracking was enabled.
isInsertRevision() Returns true if this object was inserted in Microsoft Word while change tracking was enabled.
isMoveFromRevision() Returns true if this object was moved (deleted) in Microsoft Word while change tracking was enabled.
isMoveToRevision() Returns true if this object was moved (inserted) in Microsoft Word while change tracking was enabled.
nextPreOrder(Node rootNode) Gets next node according to the pre-order tree traversal algorithm.
nodeTypeToString(int nodeType)
notify()
notifyAll()
previousPreOrder(Node rootNode) Gets the previous node according to the pre-order tree traversal algorithm.
remove() Removes itself from the parent.
removeMoveRevisions()
removeRunAttr(int key)
setCustomNodeId(int value) Specifies custom node identifier.
setRunAttr(int fontAttr, Object value)
toString()
toString(SaveOptions saveOptions) Exports the content of the node into a string using the specified save options.
toString(int saveFormat)
wait()
wait(long arg0)
wait(long arg0, int arg1)

Inline()

public Inline()

accept(DocumentVisitor visitor)

public abstract boolean accept(DocumentVisitor visitor)

Accepts a visitor.

Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.

For more info see the Visitor design pattern.

Parameters:

Parameter Type Description
visitor DocumentVisitor The visitor that will visit the nodes.

Returns: boolean - True if all nodes were visited; false if DocumentVisitor stopped the operation before visiting all nodes.

clearRunAttrs()

public void clearRunAttrs()

dd()

public void dd()

deepClone(boolean isCloneChildren)

public Node deepClone(boolean isCloneChildren)

Creates a duplicate of the node.

This method serves as a copy constructor for nodes. The cloned node has no parent, but belongs to the same document as the original node.

This method always performs a deep copy of the node. The isCloneChildren parameter specifies whether to perform copy all child nodes as well.

Parameters:

Parameter Type Description
isCloneChildren boolean True to recursively clone the subtree under the specified node; false to clone only the node itself.

Returns: Node - The cloned node.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

Parameter Type Description
arg0 java.lang.Object

Returns: boolean

fetchInheritedRunAttr(int fontAttr)

public Object fetchInheritedRunAttr(int fontAttr)

Parameters:

Parameter Type Description
fontAttr int

Returns: java.lang.Object

getAncestor(int ancestorType)

public CompositeNode getAncestor(int ancestorType)

Parameters:

Parameter Type Description
ancestorType int

Returns: CompositeNode

getAncestor(Class ancestorType)

public CompositeNode getAncestor(Class ancestorType)

Gets the first ancestor of the specified object type.

Parameters:

Parameter Type Description
ancestorType java.lang.Class The object type of the ancestor to retrieve.

Returns: CompositeNode - The ancestor of the specified type or null if no ancestor of this type was found.

The ancestor type matches if it is equal to ancestorType or derived from ancestorType .

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getCustomNodeId()

public int getCustomNodeId()

Specifies custom node identifier.

Default is zero.

This identifier can be set and used arbitrarily. For example, as a key to get external data.

Important note, specified value is not saved to an output file and exists only during the node lifetime.

Returns: int - The corresponding int value.

getDirectRunAttr(int key)

public Object getDirectRunAttr(int key)

Parameters:

Parameter Type Description
key int

Returns: java.lang.Object

getDirectRunAttr(int key, int revisionsView)

public Object getDirectRunAttr(int key, int revisionsView)

Parameters:

Parameter Type Description
key int
revisionsView int

Returns: java.lang.Object

getDocument()

public DocumentBase getDocument()

Gets the document to which this node belongs.

The node always belongs to a document even if it has just been created and not yet added to the tree, or if it has been removed from the tree.

Returns: DocumentBase - The document to which this node belongs.

getDocument_IInline()

public DocumentBase getDocument_IInline()

Returns: DocumentBase

getFont()

public Font getFont()

Provides access to the font formatting of this object.

Returns: Font - The corresponding Font value.

getNextSibling()

public Node getNextSibling()

Gets the node immediately following this node. If there is no next node, a null is returned.

Returns: Node - The node immediately following this node.

getNodeType()

public abstract int getNodeType()

Gets the type of this node.

Returns: int - The type of this node. The returned value is one of NodeType constants.

getParentNode()

public CompositeNode getParentNode()

Gets the immediate parent of this node.

If a node has just been created and not yet added to the tree, or if it has been removed from the tree, the parent is null .

Returns: CompositeNode - The immediate parent of this node.

getParentParagraph()

public Paragraph getParentParagraph()

Retrieves the parent Paragraph of this node.

Returns: Paragraph - The corresponding Paragraph value.

getParentParagraph_IInline()

public Paragraph getParentParagraph_IInline()

Returns: Paragraph

getPreviousSibling()

public Node getPreviousSibling()

Gets the node immediately preceding this node. If there is no preceding node, a null is returned.

Returns: Node - The node immediately preceding this node.

getRange()

public Range getRange()

Returns a Range object that represents the portion of a document that is contained in this node.

Returns: Range - A Range object that represents the portion of a document that is contained in this node.

getText()

public String getText()

Gets the text of this node and of all its children.

The returned string includes all control and special characters as described in ControlChar.

Returns: java.lang.String

hashCode()

public native int hashCode()

Returns: int

isComposite()

public boolean isComposite()

Returns true if this node can contain other nodes. (31574,6)

Returns: boolean - { true if this node can contain other nodes.

isDeleteRevision()

public boolean isDeleteRevision()

Returns true if this object was deleted in Microsoft Word while change tracking was enabled.

Returns: boolean - True if this object was deleted in Microsoft Word while change tracking was enabled.

isFormatRevision()

public boolean isFormatRevision()

Returns true if formatting of the object was changed in Microsoft Word while change tracking was enabled.

Returns: boolean - True if formatting of the object was changed in Microsoft Word while change tracking was enabled.

isInsertRevision()

public boolean isInsertRevision()

Returns true if this object was inserted in Microsoft Word while change tracking was enabled.

Returns: boolean - True if this object was inserted in Microsoft Word while change tracking was enabled.

isMoveFromRevision()

public boolean isMoveFromRevision()

Returns true if this object was moved (deleted) in Microsoft Word while change tracking was enabled.

Returns: boolean - { true if this object was moved (deleted) in Microsoft Word while change tracking was enabled.

isMoveToRevision()

public boolean isMoveToRevision()

Returns true if this object was moved (inserted) in Microsoft Word while change tracking was enabled.

Returns: boolean - { true if this object was moved (inserted) in Microsoft Word while change tracking was enabled.

nextPreOrder(Node rootNode)

public Node nextPreOrder(Node rootNode)

Gets next node according to the pre-order tree traversal algorithm.

Parameters:

Parameter Type Description
rootNode Node The top node (limit) of traversal.

Returns: Node - Next node in pre-order order. Null if reached the rootNode .

nodeTypeToString(int nodeType)

public static String nodeTypeToString(int nodeType)

Parameters:

Parameter Type Description
nodeType int

Returns: java.lang.String

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

previousPreOrder(Node rootNode)

public Node previousPreOrder(Node rootNode)

Gets the previous node according to the pre-order tree traversal algorithm.

Parameters:

Parameter Type Description
rootNode Node The top node (limit) of traversal.

Returns: Node - Previous node in pre-order order. Null if reached the rootNode .

remove()

public void remove()

Removes itself from the parent.

removeMoveRevisions()

public void removeMoveRevisions()

removeRunAttr(int key)

public void removeRunAttr(int key)

Parameters:

Parameter Type Description
key int

setCustomNodeId(int value)

public void setCustomNodeId(int value)

Specifies custom node identifier.

Default is zero.

This identifier can be set and used arbitrarily. For example, as a key to get external data.

Important note, specified value is not saved to an output file and exists only during the node lifetime.

Parameters:

Parameter Type Description
value int The corresponding int value.

setRunAttr(int fontAttr, Object value)

public void setRunAttr(int fontAttr, Object value)

Parameters:

Parameter Type Description
fontAttr int
value java.lang.Object

toString()

public String toString()

Returns: java.lang.String

toString(SaveOptions saveOptions)

public String toString(SaveOptions saveOptions)

Exports the content of the node into a string using the specified save options.

Parameters:

Parameter Type Description
saveOptions SaveOptions Specifies the options that control how the node is saved.

Returns: java.lang.String - The content of the node in the specified format.

toString(int saveFormat)

public String toString(int saveFormat)

Parameters:

Parameter Type Description
saveFormat int

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

Parameter Type Description
arg0 long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

Parameter Type Description
arg0 long
arg1 int