Пример #1
0
 public void setMouseActionAttributes(
     String actionName,
     int modifier,
     ActionAttributes.ActionTrigger trigger,
     ActionAttributes.MouseAction[] mouseActions,
     double minValue,
     double maxValue,
     boolean smoothingEnabled,
     double smoothingValue) {
   ActionAttributes actionAttrs = this.getActionAttributes(DEVICE_MOUSE, actionName);
   if (actionAttrs != null) {
     actionAttrs.setValues(minValue, maxValue);
     actionAttrs.setMouseActions(mouseActions);
     actionAttrs.setActionTrigger(trigger);
     actionAttrs.setEnableSmoothing(smoothingEnabled);
     actionAttrs.setSmoothingValue(smoothingValue);
   } else {
     this.addAction(
         DEVICE_MOUSE,
         modifier,
         actionName,
         new ActionAttributes(
             mouseActions, trigger, minValue, maxValue, smoothingEnabled, smoothingValue));
   }
 }
Пример #2
0
 public void setActionTrigger(
     Object device, Object action, ActionAttributes.ActionTrigger trigger) {
   ActionAttributes actionAttrs = getActionAttributes(device, action);
   if (actionAttrs == null) {
     String message = Logging.getMessage("nullValue.AttributesIsNull");
     Logging.logger().severe(message);
     throw new IllegalArgumentException(message);
   } else {
     actionAttrs.setActionTrigger(trigger);
   }
 }