Enum NavigationActions.SelectionPolicy

    • Enum Constant Detail

      • EXTEND

        public static final NavigationActions.SelectionPolicy EXTEND
        Extends the selection by updating the "boundary" of the selection that is closest to the new position (i.e. either the selection's start or end position) to that new position and keeping the other position the same. In either case, the caret position is updated to that new position while the anchor is updated to the opposite boundary.

        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"
         
    • Method Detail

      • values

        public static NavigationActions.SelectionPolicy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (NavigationActions.SelectionPolicy c : NavigationActions.SelectionPolicy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static NavigationActions.SelectionPolicy valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null