org.scijava.input
Class Accelerator

java.lang.Object
  extended by org.scijava.input.Accelerator

public class Accelerator
extends Object

A keyboard shortcut, consisting of a KeyCode plus InputModifiers.

Author:
Curtis Rueden, Barry DeZonia

Constructor Summary
Accelerator(KeyCode keyCode, InputModifiers modifiers)
           
 
Method Summary
static Accelerator create(String acc)
          Creates an accelerator from the given string representation.
 boolean equals(Object o)
           
 KeyCode getKeyCode()
           
 InputModifiers getModifiers()
           
 int hashCode()
           
static boolean isCtrlReplacedWithMeta()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Accelerator

public Accelerator(KeyCode keyCode,
                   InputModifiers modifiers)
Method Detail

getKeyCode

public KeyCode getKeyCode()

getModifiers

public InputModifiers getModifiers()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

create

public static Accelerator create(String acc)
Creates an accelerator from the given string representation. The string must have the following syntax:
            <modifiers>* <keyCode>
 
            modifiers := alt | altGraph | control | meta | shift
            keyCode := KeyCode field (e.g., COMMA or UP)
 
For convenience: Here are some example strings:

See Also:
for the syntax from which this one is derived., for the complete list of special character codes.

isCtrlReplacedWithMeta

public static boolean isCtrlReplacedWithMeta()


Copyright © 2009–2015 SciJava. All rights reserved.