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 ConstantDescriptionAnint
representing a "copy" transfer action.Anint
representing a source action capability of either "copy" or "move".Anint
representing a "link" transfer action.Anint
representing a "move" transfer action.Anint
representing no transfer action. -
Method Summary
Modifier and TypeMethodDescriptionboolean
is
(int action) Use this to check if this enum action is a particularDnDConstants
action.int
static UI.DragAction
Returns 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
Anint
representing no transfer action. -
COPY
Anint
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
Anint
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
Anint
representing a source action capability of either "copy" or "move". -
LINK
Anint
representing 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 particularDnDConstants
action.- Parameters:
action
- The action to check against.- Returns:
true
if this enum action is the same as the givenaction
,false
otherwise.
-