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.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAnintrepresenting a "copy" transfer action.Anintrepresenting a source action capability of either "copy" or "move".Anintrepresenting a "link" transfer action.Anintrepresenting a "move" transfer action.Anintrepresenting no transfer action. -
Method Summary
Modifier and TypeMethodDescriptionbooleanis(int action) Use this to check if this enum action is a particularDnDConstantsaction.intstatic UI.DragActionReturns the enum constant of this class with the specified name.static UI.DragAction[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
Anintrepresenting no transfer action. -
COPY
Anintrepresenting 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
Anintrepresenting 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
Anintrepresenting a source action capability of either "copy" or "move". -
LINK
Anintrepresenting a "link" transfer action. This value is used to specify that data should be linked in a drag and drop operation.- See Also:
-
-
Method Details
-
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
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 nameNullPointerException- 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 particularDnDConstantsaction.- Parameters:
action- The action to check against.- Returns:
trueif this enum action is the same as the givenaction,falseotherwise.
-