Oxygen XML Editor 14.2 Author API

ro.sync.ecss.extensions.api.content
Interface OffsetInformation


@API(type=NOT_EXTENDABLE,
     src=PUBLIC)
public interface OffsetInformation

Information about the node which contains the offset. If the offset is on a marker character the returned result will also contain the node which contains the range indicated by the marker.

The author content contains the entire XML document text and special marker characters. Each author node points in the content to the start and end marker characters which are used to delimit it's range. The start and end offsets pointed to by the AuthorNode can be retrieved using the AuthorNode.getStartOffset() and AuthorNode.getEndOffset() The image represents part of the document content and red markers represent special control characters which represent the node ranges.

Since:
12.2

Field Summary
static int IN_CONTENT
          The offset is in character content.
static int ON_END_MARKER
          The offset is on the marker representing the end range of a node.
static int ON_START_MARKER
          The offset is on the marker representing the start range of a node.
 
Method Summary
 AuthorNode getNodeForMarkerOffset()
          If the offset is on a marker character this method returns the node which contains the marker.
 AuthorNode getNodeForOffset()
          Returns the parent node for the given offset.
 int getPositionType()
          Get the type of position the offset has.
 

Field Detail

IN_CONTENT

static final int IN_CONTENT
The offset is in character content.

See Also:
Constant Field Values

ON_START_MARKER

static final int ON_START_MARKER
The offset is on the marker representing the start range of a node.

See Also:
Constant Field Values

ON_END_MARKER

static final int ON_END_MARKER
The offset is on the marker representing the end range of a node.

See Also:
Constant Field Values
Method Detail

getNodeForMarkerOffset

AuthorNode getNodeForMarkerOffset()
If the offset is on a marker character this method returns the node which contains the marker.

Returns:
If the offset is on a marker character this method returns the node which contains the marker.

getNodeForOffset

AuthorNode getNodeForOffset()
Returns the parent node for the given offset. Never null.

Returns:
the parent node for the given offset. Never null.

getPositionType

int getPositionType()
Get the type of position the offset has. It returns one of the constants: IN_CONTENT or ON_START_MARKER or ON_END_MARKER

Returns:
the type of position for the offset.

Oxygen XML Editor 14.2 Author API

© Copyright SyncRO Soft SRL 2002 - 2013. All rights reserved.