/** * Returns the mouse wheel, or null if no mouse wheel is present. */ public Component getWheel() { return getComponent(Component.Identifier.Axis.Z); }
private final static Mouse createMouseFromDevice(LinuxEventDevice device, Component[] components) throws IOException { Mouse mouse = new LinuxMouse(device, components, new Controller[]{}, device.getRumblers()); if(mouse.getX() != null && mouse.getY() != null && mouse.getPrimaryButton() != null) return mouse; else return null; }
private final static Mouse createMouseFromDevice(LinuxEventDevice device, Component[] components) throws IOException { Mouse mouse = new LinuxMouse(device, components, new Controller[]{}, device.getRumblers()); if (mouse.getX() != null && mouse.getY() != null && mouse.getPrimaryButton() != null) return mouse; else return null; }
/** * Returns forth mouse button, null if the mouse hasn't * got one. */ public Component getButton3() { return getComponent(Component.Identifier.Button._3); }
private final Mouse createMouseFromDevice(IDirectInputDevice device) { Component[] components = createComponents(device, true); Mouse mouse = new DIMouse(device, components, new Controller[]{}, device.getRumblers()); if (mouse.getX() != null && mouse.getY() != null && mouse.getPrimaryButton() != null) return mouse; else return null; }
/** * Returns the mouse wheel, or null if no mouse wheel is present. */ public Component getWheel() { return getComponent(Component.Identifier.Axis.Z); }
private final static Mouse createMouseFromDevice(OSXHIDDevice device, List elements) throws IOException { List components = new ArrayList(); OSXHIDQueue queue = device.createQueue(AbstractController.EVENT_QUEUE_DEPTH); try { addElements(queue, elements, components, true); } catch (IOException e) { queue.release(); throw e; } Component[] components_array = new Component[components.size()]; components.toArray(components_array); Mouse mouse = new OSXMouse(device, queue, components_array, new Controller[]{}, new Rumbler[]{}); if (mouse.getPrimaryButton() != null && mouse.getX() != null && mouse.getY() != null) { return mouse; } else { queue.release(); return null; } }
/** * Returns the left or primary mouse button, never null. */ public Component getPrimaryButton() { Component primaryButton = getComponent(Component.Identifier.Button.LEFT); if(primaryButton==null) { primaryButton = getComponent(Component.Identifier.Button._1); } return primaryButton; }
/** * Returns the side or 4th mouse button, null if the mouse has * fewer than 4 buttons. */ public Component getSide() { return getComponent(Component.Identifier.Button.SIDE); }
/** * Returns the right, null if the mouse is a single-button mouse. */ public Component getRight() { return getComponent(Component.Identifier.Button.RIGHT); }
/** * Returns fifth mouse button, null if the mouse hasn't * got one. */ public Component getButton4() { return getComponent(Component.Identifier.Button._4); }
/** * Returns the left mouse button. */ public Component getLeft() { return getComponent(Component.Identifier.Button.LEFT); }
/** * Returns the right or secondary mouse button, null if the mouse is * a single-button mouse. */ public Component getSecondaryButton() { Component secondaryButton = getComponent(Component.Identifier.Button.RIGHT); if(secondaryButton==null) { secondaryButton = getComponent(Component.Identifier.Button._2); } return secondaryButton; }
/** * Returns the left mouse button. */ public Component getLeft() { return getComponent(Component.Identifier.Button.LEFT); }
/** * Returns the middle, null if the mouse has fewer than three buttons. */ public Component getMiddle() { return getComponent(Component.Identifier.Button.MIDDLE); }
/** * Returns fifth mouse button, null if the mouse hasn't * got one. */ public Component getButton4() { return getComponent(Component.Identifier.Button._4); }
/** * Returns the x-axis for the mouse ball, never null. */ public Component getX() { return getComponent(Component.Identifier.Axis.X); }
/** * Returns the left or primary mouse button, never null. */ public Component getPrimaryButton() { Component primaryButton = getComponent(Component.Identifier.Button.LEFT); if(primaryButton==null) { primaryButton = getComponent(Component.Identifier.Button._1); } return primaryButton; }
/** * Returns the middle, null if the mouse has fewer than three buttons. */ public Component getMiddle() { return getComponent(Component.Identifier.Button.MIDDLE); }
/** * Returns forth mouse button, null if the mouse hasn't * got one. */ public Component getButton3() { return getComponent(Component.Identifier.Button._3); }