Esempio n. 1
0
  public void replaceMacroList(List<MacroButtonProperties> newMacroList) {
    // used by the token edit dialog, which will handle resetting panels and putting token to zone
    macroPropertiesMap.clear();
    for (MacroButtonProperties macro : newMacroList) {
      if (macro.getLabel() == null
          || macro.getLabel().trim().length() == 0
          || macro.getCommand().trim().length() == 0) {
        continue;
      }
      macroPropertiesMap.put(macro.getIndex(), macro);

      // Allows the token macro panels to update only if a macro changes
      fireModelChangeEvent(new ModelChangeEvent(this, ChangeEvent.MACRO_CHANGED, id));
    }
  }