Package org.exbin.bined.capability
Interface SelectionCapable
-
@ParametersAreNonnullByDefault public interface SelectionCapableSupport for selection capability.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddSelectionChangedListener(SelectionChangedListener selectionChangedListener)Adds selection change listener.voidclearSelection()Clears selection range - sets empty selection.SelectionRangegetSelection()Returns current selection.CodeAreaSelectiongetSelectionHandler()Returns selection handler.booleanhasSelection()Returns true if there is active selection for clipboard handling.voidremoveSelectionChangedListener(SelectionChangedListener selectionChangedListener)Removes selection change listener.voidsetSelection(long start, long end)Sets current selection range from start to end including the start and not including the end position.voidsetSelection(SelectionRange selection)Sets current selection.
-
-
-
Method Detail
-
getSelection
@Nonnull SelectionRange getSelection()
Returns current selection.- Returns:
- selection range or empty selection range
-
setSelection
void setSelection(SelectionRange selection)
Sets current selection.- Parameters:
selection- selection range or empty selection range
-
setSelection
void setSelection(long start, long end)Sets current selection range from start to end including the start and not including the end position.- Parameters:
start- selection start positionend- selection end position without actual end position itself
-
clearSelection
void clearSelection()
Clears selection range - sets empty selection.
-
hasSelection
boolean hasSelection()
Returns true if there is active selection for clipboard handling.- Returns:
- true if non-empty selection is active
-
getSelectionHandler
@Nonnull CodeAreaSelection getSelectionHandler()
Returns selection handler.- Returns:
- code area selection handler
-
addSelectionChangedListener
void addSelectionChangedListener(SelectionChangedListener selectionChangedListener)
Adds selection change listener.- Parameters:
selectionChangedListener- selection change listener
-
removeSelectionChangedListener
void removeSelectionChangedListener(SelectionChangedListener selectionChangedListener)
Removes selection change listener.- Parameters:
selectionChangedListener- selection change listener
-
-