Interface SyTextSelectionServiceType
- All Superinterfaces:
com.io7m.repetoir.core.RPServiceType, SyServiceType
The text selection service.
The text selection service tracks the selected text on a given screen.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA piece of text is selected in the given component.static enumNo text is selected.static interfaceThe type of component-owned text selections -
Method Summary
Modifier and TypeMethodDescriptionisComponentSelected(SyComponentReadableType component) Determine if the given component has text selected.voidClear the screen's current text selection.default booleanClear the selection if the given component is the component that has text selected.voidselectionSet(SyComponentReadableType component, SyTextSelection selection) Set the screen's current text selection, stating thatselectionis owned by the givencomponent.Methods inherited from interface com.io7m.repetoir.core.RPServiceType
description
-
Method Details
-
selectionClear
void selectionClear()Clear the screen's current text selection. -
selectionSet
Set the screen's current text selection, stating thatselectionis owned by the givencomponent.- Parameters:
component- The component that owns the selectionselection- The selection
-
isComponentSelected
SyTextSelectionServiceType.SyTextSelectionStatusType isComponentSelected(SyComponentReadableType component) Determine if the given component has text selected.- Parameters:
component- The component- Returns:
- The selection status
-
selectionClearIfComponentSelected
Clear the selection if the given component is the component that has text selected.- Parameters:
component- The component- Returns:
trueif a selection was cleared
-