org.graffiti.plugin.view.interactive
Enum MouseButton

java.lang.Object
  extended by java.lang.Enum<MouseButton>
      extended by org.graffiti.plugin.view.interactive.MouseButton
All Implemented Interfaces:
Serializable, Comparable<MouseButton>, SlotEditableEnum

public enum MouseButton
extends Enum<MouseButton>
implements SlotEditableEnum

Enumeration of mouse buttons, which, when used by triggers as a parameter type, is prepared to be used for the graphical configuration of tools.

Version:
$Revision$ $Date$
Author:
Andreas Gleißner

Enum Constant Summary
IGNORE
          While not representing a specific mouse button, this value can be used to indicate that a Trigger should match any button.
LEFT
          Left mouse button.
MIDDLE
          Middle mouse button.
RIGHT
          Right mouse button.
 
Method Summary
 String getName(Bundle bundle)
          Returns a localized description of this button as obtained from the passed bundle.
 List<? extends SlotEditableEnum> getValues()
          Returns a List containing all MouseButton enum constants.
static MouseButton valueOf(String name)
          Returns the enum constant of this type with the specified name.
static MouseButton[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.graffiti.plugin.view.interactive.SlotEditableEnum
ordinal
 

Enum Constant Detail

IGNORE

public static final MouseButton IGNORE
While not representing a specific mouse button, this value can be used to indicate that a Trigger should match any button.


LEFT

public static final MouseButton LEFT
Left mouse button.


MIDDLE

public static final MouseButton MIDDLE
Middle mouse button.


RIGHT

public static final MouseButton RIGHT
Right mouse button.

Method Detail

values

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

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

valueOf

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

getName

public String getName(Bundle bundle)
Returns a localized description of this button as obtained from the passed bundle.

Specified by:
getName in interface SlotEditableEnum
Parameters:
bundle - the bundle containing the localized description of this button.
Returns:
the name of this enumeration constant as seen by the user when graphically editing the tools.

getValues

public List<? extends SlotEditableEnum> getValues()
Returns a List containing all MouseButton enum constants.

Specified by:
getValues in interface SlotEditableEnum
Returns:
a List containing all MouseButton enum constants.


Generated at 2012-05-30 11:00:36 PM CEST