public final class NodeMark extends Mark
properties
Modifier and Type | Method and Description |
---|---|
Node |
getNode()
Returns marked node if the type of this mark is
Mark.Type.NODE_MARK . |
Node |
getPreviouslyMarkedChild(int index) |
int |
getPreviouslyMarkedChildCount() |
Mark.Type |
getType()
Returns the type of this mark:
Mark.Type.NODE_MARK or Mark.Type.TEXT_LOCATION . |
boolean |
moveTo(Node node)
Moves this mark to specified node.
|
boolean |
moveToChild()
Moves this mark to previously marked child of marked node (that is,
undo last
moveToParent() ) or if marked node has no previously
marked child (that is, there is no last moveToParent to
undo), moves this mark to first child of marked node. |
boolean |
moveToNextSibling()
Moves this mark to following sibling of marked node.
|
boolean |
moveToParent()
Moves this mark to parent of marked node.
|
boolean |
moveToPreviousSibling()
Moves this mark to preceding sibling of marked node.
|
getId, getManager, isRemoved, remove, toString
getProperties, getProperty, getPropertyCount, hasProperty, putProperties, putProperty, removeAllProperties, removeProperty
public Mark.Type getType()
Mark
Mark.Type.NODE_MARK
or Mark.Type.TEXT_LOCATION
.public Node getNode()
Mark
Mark.Type.NODE_MARK
.
Returns textual node containing marked character if the type of this
mark is Mark.Type.TEXT_LOCATION
.public boolean moveTo(Node node)
node
- node to be markedtrue
if marked node has successfully been changed;
false
if specified node is already the marked nodepublic boolean moveToParent()
true
if marked node has successfully been changed;
false
if marked node is root elementpublic boolean moveToChild()
moveToParent()
) or if marked node has no previously
marked child (that is, there is no last moveToParent
to
undo), moves this mark to first child of marked node.true
if marked node has successfully been changed;
false
if marked node has no childpublic boolean moveToPreviousSibling()
true
if marked node has successfully been changed;
false
if marked node has no preceding sibling or if marked
node is the root elementpublic boolean moveToNextSibling()
true
if marked node has successfully been changed;
false
if marked node has no following sibling or if marked
node is the root elementpublic int getPreviouslyMarkedChildCount()
public Node getPreviouslyMarkedChild(int index)