Enum MouseKeys

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<MouseKeys>

    public enum MouseKeys
    extends java.lang.Enum<MouseKeys>
    Enum providing support for keys pressed when mouse event occurs
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ALT_KEY
      Indicates whether the Alt key is pressed.
      CTRL_KEY
      Indicates whether the Ctrl key is pressed.
      LEFT_CLICK
      Indicates whether the left button is clicked.
      META_KEY
      Indicates whether the Meta key is pressed.
      MIDDLE_CLICK
      Indicates whether the middle button is clicked.
      RIGHT_CLICK
      Indicates whether the right button is clicked.
      SHIFT_KEY
      Indicates whether the Shift key is pressed.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Set<MouseKeys> fromMouseEvent​(org.zkoss.zk.ui.event.MouseEvent event)
      Extracts keys pressed from zk MouseEvent
      static java.util.Set<MouseKeys> fromMouseEventMask​(int mask)
      Extracts keys pressed from zk MouseEvent
      static MouseKeys valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static MouseKeys[] 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
    • Enum Constant Detail

      • ALT_KEY

        public static final MouseKeys ALT_KEY
        Indicates whether the Alt key is pressed.
      • CTRL_KEY

        public static final MouseKeys CTRL_KEY
        Indicates whether the Ctrl key is pressed.
      • SHIFT_KEY

        public static final MouseKeys SHIFT_KEY
        Indicates whether the Shift key is pressed.
      • META_KEY

        public static final MouseKeys META_KEY
        Indicates whether the Meta key is pressed.
      • LEFT_CLICK

        public static final MouseKeys LEFT_CLICK
        Indicates whether the left button is clicked.
      • RIGHT_CLICK

        public static final MouseKeys RIGHT_CLICK
        Indicates whether the right button is clicked.
      • MIDDLE_CLICK

        public static final MouseKeys MIDDLE_CLICK
        Indicates whether the middle button is clicked.
    • Method Detail

      • values

        public static MouseKeys[] 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 (MouseKeys c : MouseKeys.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MouseKeys valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • fromMouseEvent

        public static java.util.Set<MouseKeys> fromMouseEvent​(org.zkoss.zk.ui.event.MouseEvent event)
        Extracts keys pressed from zk MouseEvent
        Parameters:
        event - zk MouseEvent to extract keys
        Returns:
        set of keys pressed
      • fromMouseEventMask

        public static java.util.Set<MouseKeys> fromMouseEventMask​(int mask)
        Extracts keys pressed from zk MouseEvent
        Parameters:
        mask - mask of keys defined in zk MouseEvent
        Returns:
        set of keys pressed