# Class Binding

java.lang.Object
org.jmol.viewer.binding.Binding

Direct Known Subclasses:
  `JmolBinding`

public abstract class Binding extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`ALT`
`static final int`
`BUTTON_MASK`
`static final int`
`BUTTON_MODIFIER_MASK`
`static final int`
`CLICK`
`static final int`
`COUNT_MASK`
`static final int`
`CTRL`
`static final int`
`CTRL_ALT`
`static final int`
`CTRL_SHIFT`
`static final int`
`DOUBLE`
`static final int`
`DOWN`
`static final int`
`DRAG`
`static final int`
`LEFT`
`static final int`
`MAC_COMMAND`
`static final int`
`MIDDLE`
`static final int`
`MODE_MASK`
`String`
`name`
`static final int`
`RIGHT`
`static final int`
`SHIFT`
`static final int`
`SINGLE`
`static final int`
`UP`
`static final int`
`WHEEL`

## Constructor Summary

Constructors
Constructor
Description
`Binding()`

## Method Summary

Modifier and Type
Method
Description
`final void`
`bindAction(int mouseAction, int jmolAction)`
`void`
`bindName(int mouseAction, String name)`
`String`
`getBindingInfo(String[] actionInfo, String[] actionNames, String qualifiers)`
`Map<String,Object>`
`getBindings()`
`static int`
`getButtonMods(int mouseAction)`
`static int`
`getClickCount(int mouseAction)`
`static int`
`getMouseAction(int clickCount, int modifiers, int mode)`
`static String`
`getMouseActionName(int mouseAction, boolean addSortCode)`
`static int`
`getMouseActionStr(String desc)`
create an action code from a string such as "CTRL-LEFT-double click"
`final boolean`
`isBound(int mouseAction, int jmolAction)`
`final boolean`
`isUserAction(int mouseAction)`
`static Binding`
`newBinding(Viewer vwr, String name)`
`final void`
`unbindAction(int mouseAction, int jmolAction)`
`final void`
`unbindJmolAction(int jmolAction)`
`final void`
`unbindMouseAction(int mouseAction)`
`final void`
`unbindName(int mouseAction, String name)`
`final void`
`unbindUserAction(String script)`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### LEFT

public static final int LEFT

See Also:
  - Constant Field Values

### MIDDLE

public static final int MIDDLE

See Also:
  - Constant Field Values

### RIGHT

public static final int RIGHT

See Also:
  - Constant Field Values

### WHEEL

public static final int WHEEL

See Also:
  - Constant Field Values

### ALT

public static final int ALT

See Also:
  - Constant Field Values

### CTRL

public static final int CTRL

See Also:
  - Constant Field Values

### SHIFT

public static final int SHIFT

See Also:
  - Constant Field Values

### CTRL_ALT

public static final int CTRL_ALT

See Also:
  - Constant Field Values

### CTRL_SHIFT

public static final int CTRL_SHIFT

See Also:
  - Constant Field Values

### MAC_COMMAND

public static final int MAC_COMMAND

See Also:
  - Constant Field Values

### BUTTON_MASK

public static final int BUTTON_MASK

See Also:
  - Constant Field Values

### BUTTON_MODIFIER_MASK

public static final int BUTTON_MODIFIER_MASK

See Also:
  - Constant Field Values

### SINGLE

public static final int SINGLE

See Also:
  - Constant Field Values

### DOUBLE

public static final int DOUBLE

See Also:
  - Constant Field Values

### COUNT_MASK

public static final int COUNT_MASK

See Also:
  - Constant Field Values

### DOWN

public static final int DOWN

See Also:
  - Constant Field Values

### DRAG

public static final int DRAG

See Also:
  - Constant Field Values

### UP

public static final int UP

See Also:
  - Constant Field Values

### CLICK

public static final int CLICK

See Also:
  - Constant Field Values

### MODE_MASK

public static final int MODE_MASK

See Also:
  - Constant Field Values

### name

public String name

## Constructor Details

### Binding

public Binding()

## Method Details

### getMouseAction

public static int getMouseAction(int clickCount, int modifiers, int mode)

### getMouseActionStr

public static int getMouseActionStr(String desc)
create an action code from a string such as "CTRL-LEFT-double click"

Parameters:
  `desc` -
Returns:
  action code

### getButtonMods

public static int getButtonMods(int mouseAction)

### getClickCount

public static int getClickCount(int mouseAction)

### getMouseActionName

public static String getMouseActionName(int mouseAction, boolean addSortCode)

### getBindings

public Map<String,Object> getBindings()

### bindAction

public final void bindAction(int mouseAction, int jmolAction)

### bindName

public void bindName(int mouseAction, String name)

### unbindAction

public final void unbindAction(int mouseAction, int jmolAction)

### unbindName

public final void unbindName(int mouseAction, String name)

### unbindJmolAction

public final void unbindJmolAction(int jmolAction)

### unbindUserAction

public final void unbindUserAction(String script)

### unbindMouseAction

public final void unbindMouseAction(int mouseAction)

### isBound

public final boolean isBound(int mouseAction, int jmolAction)

### isUserAction

public final boolean isUserAction(int mouseAction)

### getBindingInfo

public String getBindingInfo(String[] actionInfo, String[] actionNames, String qualifiers)

### newBinding

public static Binding newBinding(Viewer vwr, String name)