@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public interface AuthorSelectionModel
Modifier and Type | Method and Description |
---|---|
void |
addSelection(int startOffset,
int endOffset)
Select the interval between start and end offset.
|
void |
addSelectionIntervals(java.util.List<ContentInterval> intervals,
boolean scrollToVisible)
Add Author editor page selection intervals.
|
void |
clearSelection()
Clears all selections from Author editor page and resets the selection interpretation mode (see
getSelectionInterpretationMode() ). |
SelectionInterpretationMode |
getSelectionInterpretationMode()
Get the interpretation mode of the actual selection from the Author
editor page.
|
ContentInterval |
getSelectionInterval()
Get the current selection interval.
|
java.util.List<ContentInterval> |
getSelectionIntervals()
Get all Author editor page selection intervals.
|
boolean |
hasMultipleSelection()
Check if the Author editor page has multiple selections.
|
boolean |
hasSelection()
Check if the Author editor page has selection.
|
void |
setSelection(int startOffset,
int endOffset)
Select the interval between start and end offset.
|
void |
setSelectionInterpretationMode(SelectionInterpretationMode interpretationMode)
Impose the interpretation mode of the actual selection from the Author
editor page.
|
void |
setSelectionIntervals(java.util.List<ContentInterval> intervals,
boolean scrollToVisible)
Sets the Author editor page selection intervals.
|
void setSelectionInterpretationMode(SelectionInterpretationMode interpretationMode)
SelectionInterpretationMode
for more details about the interpretation
of selection in Author mode.
interpretationMode
- The selection interpretation mode.SelectionInterpretationMode getSelectionInterpretationMode()
SelectionInterpretationMode
for more details about the interpretation
of selection in Author mode.
java.util.List<ContentInterval> getSelectionIntervals()
ContentInterval
contains the inclusive
start selection offset and the exclusive end selection offset.
ContentInterval.getStartOffset()
and ContentInterval.getEndOffset()
will return the caret position). Otherwise, the last ContentInterval
from the list corresponds with the last selection made in the editor.
null
. If there is no selection,
the list contains a single ContentInterval
that points to the caret offset.ContentInterval getSelectionInterval()
getSelectionIntervals()
selections list). If the caret offset is not included in a selection range,
the selection interval points to the caret offset (both ContentInterval.getStartOffset()
and ContentInterval.getEndOffset()
will return the caret position).
ContentInterval
contains the inclusive start selection
offset and the exclusive end selection offset.
null
. If there is no selection,
both the start and end offset of the interval will be the caret position.boolean hasSelection()
true
if there is a selection in Author editor page.boolean hasMultipleSelection()
true
if there are at least two selections in
Author editor page.void setSelection(int startOffset, int endOffset)
getSelectionInterval()
method).
startOffset
- Inclusive start offsetendOffset
- Exclusive end offsetvoid addSelection(int startOffset, int endOffset)
getSelectionInterval()
method).
getSelectionIntervals()
method to get all
the selection intervals from Author editor page.startOffset
- Inclusive start offsetendOffset
- Exclusive end offsetvoid clearSelection()
getSelectionInterpretationMode()
).
The caret will remain in the same position.
getSelectionIntervals()
will return a single
selection interval that points to the caret offset (both ContentInterval.getStartOffset()
and ContentInterval.getEndOffset()
will return the caret position).void setSelectionIntervals(java.util.List<ContentInterval> intervals, boolean scrollToVisible)
ContentInterval
contains the inclusive
start selection offset and the exclusive end selection offset.
intervals
- the list containing all the Author editor page selection intervals.scrollToVisible
- If true
the start offset of the last interval will be scrolled to visible.void addSelectionIntervals(java.util.List<ContentInterval> intervals, boolean scrollToVisible)
ContentInterval
contains the inclusive
start selection offset and the exclusive end selection offset.
intervals
- the list containing all the Author editor page selection intervals.scrollToVisible
- If true
the start offset of the last interval will be scrolled to visible.Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.
© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.