public static enum NavigationActions.SelectionPolicy extends java.lang.Enum<NavigationActions.SelectionPolicy>
Enum Constant | Description |
---|---|
ADJUST |
Moves the caret only without also moving the anchor, thereby making a selection
|
CLEAR |
Move the caret and anchor to the same given position, thereby clearing any existing selection
|
EXTEND |
Extends the selection by updating the "boundary" of the selection that is closest to the new position
(i.e.
|
Modifier and Type | Method | Description |
---|---|---|
static NavigationActions.SelectionPolicy |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static NavigationActions.SelectionPolicy[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NavigationActions.SelectionPolicy CLEAR
public static final NavigationActions.SelectionPolicy ADJUST
public static final NavigationActions.SelectionPolicy EXTEND
Using the following example, where "||" is the anchor, "|" is the caret" and "_" is the new position, EXTEND updates the values to:
"A text ||with| a _selection" -> "A text ||with a |selection"
"A _text ||with| a selection" -> "A |text with|| a selection"
public static NavigationActions.SelectionPolicy[] values()
for (NavigationActions.SelectionPolicy c : NavigationActions.SelectionPolicy.values()) System.out.println(c);
public static NavigationActions.SelectionPolicy valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null