public static interface TextSelection.TextSelectionSupport
Component.getTextSelectionSupport() method to provide
text selection support on that component.| Modifier and Type | Method and Description |
|---|---|
String |
getTextForSpan(TextSelection sel,
TextSelection.Span span)
Returns the text for a given span.
|
TextSelection.Spans |
getTextSelectionForBounds(TextSelection sel,
Rectangle bounds)
Gets the spans that should be selected for the given bounds.
|
boolean |
isTextSelectionEnabled(TextSelection sel)
Checks if text selection is enabled for this component.
|
boolean |
isTextSelectionTriggerEnabled(TextSelection sel)
Checks if this component can be used to trigger a text selection.
|
TextSelection.Span |
triggerSelectionAt(TextSelection sel,
int x,
int y)
Trigger a text selection at a given point.
|
TextSelection.Spans getTextSelectionForBounds(TextSelection sel, Rectangle bounds)
sel - The TextSelection instance.bounds - The bounds to check. Relative to TextSelection.getSelectionRoot()boolean isTextSelectionEnabled(TextSelection sel)
sel - The TextSelection instance.boolean isTextSelectionTriggerEnabled(TextSelection sel)
sel - The TextSelection instance.TextSelection.Span triggerSelectionAt(TextSelection sel, int x, int y)
sel - The TextSelection instancex - The x coordinate of the event. Relative to TextSelection.getSelectionRoot()y - The y coordinate of the event. Relative to TextSelection.getSelectionRoot()String getTextForSpan(TextSelection sel, TextSelection.Span span)
sel - The TextSelection instance.span - The span describing the range of text that should be returned.