Example #1
0
  public void load(String key) {
    String idStr = "GPInitialPopulation";

    // Load last GUI settings from preferences
    HashMap settings = PreferencesManager.getAnalyserPageSettings(key + getClass().getName());

    Iterator iterator = settings.keySet().iterator();

    while (iterator.hasNext()) {
      String setting = (String) iterator.next();
      String value = (String) settings.get((Object) setting);

      this.loadCommon(setting, value);
    }

    HashMap settingsInitPop = PreferencesManager.getAnalyserPageSettings(key + idStr);

    Iterator iteratorInitPop = settingsInitPop.keySet().iterator();

    while (iteratorInitPop.hasNext()) {
      String settingInitPop = (String) iteratorInitPop.next();
      String valueInitPop = (String) settingsInitPop.get((Object) settingInitPop);

      GPPageInitialPopulationModule.load(valueInitPop);
    }
  }
Example #2
0
  public void save(String key) {
    String idStr = "GPInitialPopulation";

    HashMap settingsInitPop = PreferencesManager.getAnalyserPageSettings(key + idStr);
    HashMap settingsInitPopCommon = new HashMap();

    GPPageInitialPopulationModule.save(settingsInitPop, idStr);
    settingsInitPopCommon.put("generations_changing_seeds", numberMutationTextRow.getText());
    settingsInitPopCommon.put("generations_random", generateRandomPopTextRow.getText());
    settingsInitPopCommon.put("generations_init_pop", generateInitPopTextRow.getText());

    PreferencesManager.putAnalyserPageSettings(key + idStr, settingsInitPop);
    PreferencesManager.putAnalyserPageSettings(key + getClass().getName(), settingsInitPopCommon);
  }