Package ro.sync.ecss.extensions.api
Class AuthorCaretEvent
- java.lang.Object
-
- ro.sync.ecss.extensions.api.AuthorCaretEvent
-
@API(type=NOT_EXTENDABLE, src=PUBLIC) public class AuthorCaretEvent extends java.lang.Object
AuthorCaretEvent is used to notify interestedAuthorCaretListener
that the position of the caret has changed in the Author editor page.
-
-
Constructor Summary
Constructors Constructor Description AuthorCaretEvent(int offset, java.util.List<int[]> selectionIntervals, AuthorNode node)
Constructor for the AuthorCaretEvent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthorNode
getNode()
int
getOffset()
int
getSelectionEnd()
java.util.List<int[]>
getSelectionIntervals()
Get the selection [start offset, end offset] intervals list.int
getSelectionStart()
java.lang.String
toString()
-
-
-
Constructor Detail
-
AuthorCaretEvent
public AuthorCaretEvent(int offset, java.util.List<int[]> selectionIntervals, AuthorNode node)
Constructor for the AuthorCaretEvent.- Parameters:
offset
- The absolute caret position inside the Author page.selectionIntervals
- The selection [start offset, end offset] intervals list. If there is no selection the list contains a single entry with [caret offset, caret offset].node
- The node holding the caret offset.
-
-
Method Detail
-
getOffset
public int getOffset()
- Returns:
- Returns the absolute caret offset.
-
getNode
public AuthorNode getNode()
- Returns:
- Returns the node holding the caret position.
-
getSelectionStart
public int getSelectionStart()
- Returns:
- Returns the selection start offset, inclusive. If no selection the selection start is equals with caret offset.
-
getSelectionEnd
public int getSelectionEnd()
- Returns:
- Returns the selection end offset, exclusive. If no selection the selection end is equals with caret offset.
-
getSelectionIntervals
public java.util.List<int[]> getSelectionIntervals()
Get the selection [start offset, end offset] intervals list. If there is no selection the list contains a single [caret offset, caret offset] entry.- Returns:
- Returns the list of selection intervals.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-