Binding
Date: 2019-10-22

org.jmol.viewer.binding

## Class Binding

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

- Direct Known Subclasses:
    JmolBinding

      public abstract class Binding
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ALT`
    `private java.util.Map<java.lang.String,java.lang.Object>` | `bindings`
    `static int` | `BUTTON_MASK`
    `static int` | `BUTTON_MODIFIER_MASK`
    `static int` | `CLICK`
    `static int` | `COUNT_MASK`
    `static int` | `CTRL`
    `static int` | `CTRL_ALT`
    `static int` | `CTRL_SHIFT`
    `static int` | `DOUBLE`
    `static int` | `DOWN`
    `static int` | `DRAG`
    `static int` | `LEFT`
    `static int` | `MAC_COMMAND`
    `static int` | `MIDDLE`
    `static int` | `MODE_MASK`
    `java.lang.String` | `name`
    `static int` | `RIGHT`
    `static int` | `SHIFT`
    `static int` | `SINGLE`
    `static int` | `UP`
    `static int` | `WHEEL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Binding()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `addBinding(java.lang.String key, java.lang.Object value)`
    `private void` | `addInfo(javajs.util.SB sb, java.lang.String[] list, java.lang.String name, java.lang.String info)`
    `void` | `bindAction(int mouseAction, int jmolAction)`
    `void` | `bindName(int mouseAction, java.lang.String name)`
    `java.lang.String` | `getBindingInfo(java.lang.String[] actionInfo, java.lang.String[] actionNames, java.lang.String qualifiers)`
    `java.util.Map<java.lang.String,java.lang.Object>` | `getBindings()`
    `static int` | `getButtonMods(int mouseAction)`
    `static int` | `getClickCount(int mouseAction)`
    `static int` | `getMouseAction(int clickCount, int modifiers, int mode)`
    `static java.lang.String` | `getMouseActionName(int mouseAction, boolean addSortCode)`
    `static int` | `getMouseActionStr(java.lang.String desc)` create an action code from a string such as "CTRL-LEFT-double click"
    `private static boolean` | `includes(int mouseAction, int mod)`
    `boolean` | `isBound(int mouseAction, int jmolAction)`
    `boolean` | `isUserAction(int mouseAction)`
    `static Binding` | `newBinding(Viewer vwr, java.lang.String name)`
    `private void` | `removeBinding(java.util.Iterator<java.lang.String> e, java.lang.String key)`
    `void` | `unbindAction(int mouseAction, int jmolAction)`
    `void` | `unbindJmolAction(int jmolAction)`
    `void` | `unbindMouseAction(int mouseAction)`
    `void` | `unbindName(int mouseAction, java.lang.String name)`
    `void` | `unbindUserAction(java.lang.String script)`

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### 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 java.lang.String name

    - #### bindings

          private java.util.Map<java.lang.String,java.lang.Object> bindings

  - ### Constructor Detail

    - #### Binding

          public Binding()

  - ### Method Detail

    - #### getMouseAction

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

    - #### getMouseActionStr

          public static int getMouseActionStr(java.lang.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 java.lang.String getMouseActionName(int mouseAction,
                                                            boolean addSortCode)

    - #### getBindings

          public java.util.Map<java.lang.String,java.lang.Object> getBindings()

    - #### bindAction

          public final void bindAction(int mouseAction,
                                       int jmolAction)

    - #### bindName

          public void bindName(int mouseAction,
                               java.lang.String name)

    - #### unbindAction

          public final void unbindAction(int mouseAction,
                                         int jmolAction)

    - #### unbindName

          public final void unbindName(int mouseAction,
                                       java.lang.String name)

    - #### unbindJmolAction

          public final void unbindJmolAction(int jmolAction)

    - #### addBinding

          private void addBinding(java.lang.String key,
                                  java.lang.Object value)

    - #### removeBinding

          private void removeBinding(java.util.Iterator<java.lang.String> e,
                                     java.lang.String key)

    - #### unbindUserAction

          public final void unbindUserAction(java.lang.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 java.lang.String getBindingInfo(java.lang.String[] actionInfo,
                                                 java.lang.String[] actionNames,
                                                 java.lang.String qualifiers)

    - #### addInfo

          private void addInfo(javajs.util.SB sb,
                               java.lang.String[] list,
                               java.lang.String name,
                               java.lang.String info)

    - #### includes

          private static boolean includes(int mouseAction,
                                          int mod)

    - #### newBinding

          public static Binding newBinding(Viewer vwr,
                                           java.lang.String name)