Class AbstractGestureInput

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<Key> getKeys()  
      boolean hasAltKey()
      Determines whether an Alt key was pressed when this input occurred.
      boolean hasControlKey()
      Determines whether a Control key was pressed when this input occurred.
      boolean hasShiftKey()
      Determines whether a Shift key was pressed when this input occurred.
      • Methods inherited from class com.globalmentor.model.AbstractHashObject

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AbstractGestureInput

        public AbstractGestureInput​(Key... keys)
        Keys constructor.
        Parameters:
        keys - The keys that were pressed when this input occurred.
        Throws:
        java.lang.NullPointerException - if the given keys is null.
    • Method Detail

      • getKeys

        public java.util.Set<Key> getKeys()
        Specified by:
        getKeys in interface GestureInput
        Returns:
        The keys that were pressed when this input occurred.
      • hasAltKey

        public boolean hasAltKey()
        Description copied from interface: GestureInput
        Determines whether an Alt key was pressed when this input occurred.
        Specified by:
        hasAltKey in interface GestureInput
        Returns:
        true if one of the Alt keys were pressed when this input occurred.
        See Also:
        GestureInput.getKeys()
      • hasControlKey

        public boolean hasControlKey()
        Description copied from interface: GestureInput
        Determines whether a Control key was pressed when this input occurred.
        Specified by:
        hasControlKey in interface GestureInput
        Returns:
        true if one of the Control keys were pressed when this input occurred.
        See Also:
        GestureInput.getKeys()
      • hasShiftKey

        public boolean hasShiftKey()
        Description copied from interface: GestureInput
        Determines whether a Shift key was pressed when this input occurred.
        Specified by:
        hasShiftKey in interface GestureInput
        Returns:
        true if one of the Shift keys were pressed when this input occurred.
        See Also:
        GestureInput.getKeys()