Class MouseButton

java.lang.Object
com.luciad.input.mouse.MouseButton

public class MouseButton extends Object
Represents a mouse button in the controller API.
  • Field Details Link icon

    • Unknown Link icon

      public static final MouseButton Unknown
      Returns an unknown mouse button.
    • Left Link icon

      public static final MouseButton Left
      Returns the left mouse button.
    • Middle Link icon

      public static final MouseButton Middle
      Returns the middle mouse button.
  • Constructor Details Link icon

    • MouseButton Link icon

      public MouseButton(long index)
      Creates a new MouseButton with the given index.

      The mouse button index maps to mouse buttons as follows:

      • 0 => unknown button
      • 1 => left mouse button (primary button)
      • 2 => middle mouse button
      • 3 => right mouse button

      Unmapped values can be used to express a custom mouse button.

      Parameters:
      index - the mouse button index.
  • Method Details Link icon

    • getIndex Link icon

      public long getIndex()
      The mouse button index.
    • isUnknown Link icon

      public boolean isUnknown()
      Returns whether the button is unknown.
      Returns:
      whether the button is unknown.
    • isLeft Link icon

      public boolean isLeft()
      Returns whether the button is the left mouse button.
      Returns:
      whether the button is the left mouse button.
    • isMiddle Link icon

      public boolean isMiddle()
      Returns whether the button is the middle mouse button.
      Returns:
      whether the button is the middle mouse button.
    • isRight Link icon

      public boolean isRight()
      Returns whether the button is the right mouse button.
      Returns:
      whether the button is the right mouse button.
    • equals Link icon

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode Link icon

      public int hashCode()
      Overrides:
      hashCode in class Object