com.vaadin.shared.ui.grid.

Enum DropMode

  • All Implemented Interfaces:

    Serializable, Comparable<DropMode>

    public enum DropMode
    extends Enum<DropMode>

    Defines the locations within the Grid row where an element can be dropped.

    Since:

    8.1

    Author:

    Vaadin Ltd.

    • Enum Constant Detail

      • BETWEEN

        public static final DropMode BETWEEN

        The drop event can happen between Grid rows. The drop is above a row when the cursor is over the top 50% of a row, otherwise below the row.

      • ON_TOP

        public static final DropMode ON_TOP

        The drop event can happen on top of Grid rows. The target of the drop is the row under the cursor at the time of the drop event.

      • ON_TOP_OR_BETWEEN

        public static final DropMode ON_TOP_OR_BETWEEN

        The drop event can happen either on top of or between Grid rows. The drop is either

        • above a row when the cursor is over a specified portion of the top part of the row,
        • below when the cursor is over a specified portion of the bottom part of the row, or
        • on top when the cursor is over the row but doesn't match the above conditions.

      • ON_GRID

        public static final DropMode ON_GRID

        The drop event will not happen on any specific row, it will show the drop target outline around the whole grid. For this drop target, the drop event will not contain any target row information. This is the drop target used when the grid is completely empty. It can also be configured to be used automatically when the user has sorted the grid.

        When this mode is used, it also recommended to automatically scroll the dropped data (new rows) to be visible for the user.

        Since:

        8.2

    • Method Detail

      • values

        public static DropMode[] 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 (DropMode c : DropMode.values())
            System.out.println(c);
        

        Returns:

        an array containing the constants of this enum type, in the order they are declared

      • valueOf

        public static DropMode 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