Package swingtree

Enum Class UI.DragAction

All Implemented Interfaces:
Serializable, Comparable<UI.DragAction>, Constable, UIEnum<UI.DragAction>
Enclosing class:
UI

@Immutable public static enum UI.DragAction extends Enum<UI.DragAction> implements UIEnum<UI.DragAction>
This enum contains constant values representing the type of action(s) to be performed by a Drag and Drop operation. These constants are a direct mapping to the constants defined in the TransferHandler class as well as the DnDConstants class.
  • Enum Constant Details

    • NONE

      public static final UI.DragAction NONE
      An int representing no transfer action.
    • COPY

      public static final UI.DragAction COPY
      An int representing a "copy" transfer action. This value is used when data is copied to a clipboard or copied elsewhere in a drag and drop operation.
    • MOVE

      public static final UI.DragAction MOVE
      An int representing a "move" transfer action. This value is used when data is moved to a clipboard (i.e. a cut) or moved elsewhere in a drag and drop operation.
    • COPY_OR_MOVE

      public static final UI.DragAction COPY_OR_MOVE
      An int representing a source action capability of either "copy" or "move".
  • Method Details

    • values

      public static UI.DragAction[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UI.DragAction valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • toIntCode

      public int toIntCode()
    • is

      public boolean is(int action)
      Use this to check if this enum action is a particular DnDConstants action.
      Parameters:
      action - The action to check against.
      Returns:
      true if this enum action is the same as the given action, false otherwise.