Package org.exbin.bined.capability
Interface SelectionCapable
-
@ParametersAreNonnullByDefault public interface SelectionCapable
Support for selection capability.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addSelectionChangedListener(SelectionChangedListener selectionChangedListener)
Adds selection change listener.void
clearSelection()
Clears selection range - sets empty selection.SelectionRange
getSelection()
Returns current selection.CodeAreaSelection
getSelectionHandler()
Returns selection handler.boolean
hasSelection()
Returns true if there is active selection for clipboard handling.void
removeSelectionChangedListener(SelectionChangedListener selectionChangedListener)
Removes selection change listener.void
setSelection(long start, long end)
Sets current selection range from start to end including the start and not including the end position.void
setSelection(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
-
-