/** * Sets the values that will be used to transform raw input events into view movements. ViewInputAttributes * define a calibration value for each combination of device and action, and a general sensitivity value * for each device. * * @param attributes values that will be used to transform raw input into view movement. * * @throws ArgumentException if <code>attributes</code> is null. * * @see ViewInputAttributes */ public void setAttributes(ViewInputAttributes attributes) { if (attributes == null) { String message = Logging.getMessage("nullValue.AttributesIsNull"); Logging.logger().severe(message); throw new ArgumentException(message); } this.attributes = attributes; }
public AbstractViewInputHandler() { this.enableSmoothing = true; this.lockHeading = true; this.stopOnFocusLost = true; this.attributes = new ViewInputAttributes(); // Actions for the pointer device this.mouseActionMap = this.attributes.getActionMap(ViewInputAttributes.DEVICE_MOUSE); this.keyActionMap = this.attributes.getActionMap(ViewInputAttributes.DEVICE_KEYBOARD); this.keyModsActionMap = this.attributes.getModifierActionMap(ViewInputAttributes.DEVICE_KEYBOARD); this.mouseModsActionMap = this.attributes.getModifierActionMap(ViewInputAttributes.DEVICE_MOUSE); this.mouseWheelModsActionMap = this.attributes.getModifierActionMap(ViewInputAttributes.DEVICE_MOUSE_WHEEL); }