예제 #1
0
  public void addModifierAction(Object device, Integer modifier, ActionAttributes action) {
    this.addModifierActionList(device, modifier);
    DeviceModifierMap modActionMap = this.getModifierActionMap(device);

    ActionAttributesList actionList = (ActionAttributesList) modActionMap.get(modifier);
    actionList.remove(action);
    actionList.add(action);
  }
예제 #2
0
 public void addModifierActionList(Object device, Integer modifier) {
   DeviceModifierMap deviceActionMap = this.getModifierActionMap(device);
   if (deviceActionMap == null) {
     deviceActionMap = new DeviceModifierMap();
     this.setModifierActionMap(device, deviceActionMap);
   }
   ArrayList modifierList = deviceActionMap.get(modifier);
   if (modifierList == null) {
     deviceActionMap.put(modifier, new ActionAttributesList());
   }
 }