예제 #1
0
 public List<SelectableFeature> getManualFeatures() {
   final List<SelectableFeature> featureList = new LinkedList<SelectableFeature>();
   for (SelectableFeature selectableFeature : features) {
     if (selectableFeature.getAutomatic() == Selection.UNDEFINED
         && !selectableFeature.getFeature().getStructure().hasHiddenParent()) {
       featureList.add(selectableFeature);
     }
   }
   return featureList;
 }
예제 #2
0
 /**
  * Turns all automatic into manual values
  *
  * @param discardDeselected if {@code true} all automatic deselected features get undefined
  *     instead of manual deselected
  */
 public void makeManual(boolean discardDeselected) {
   for (SelectableFeature feature : features) {
     final Selection autoSelection = feature.getAutomatic();
     if (autoSelection != Selection.UNDEFINED) {
       feature.setAutomatic(Selection.UNDEFINED);
       if (!discardDeselected || autoSelection == Selection.SELECTED) {
         feature.setManual(autoSelection);
       }
     }
   }
 }
예제 #3
0
  /**
   * This method creates a clone of the given {@link Configuration}
   *
   * @param configuration The configuration to clone
   */
  protected Configuration(Configuration configuration) {
    this.featureModel = configuration.featureModel;
    this.ignoreAbstractFeatures = configuration.ignoreAbstractFeatures;
    this.propagator = configuration.propagator.clone(this);
    propagate = false;
    this.root = initRoot();

    for (SelectableFeature f : configuration.features) {
      setManual(f.getName(), f.getManual());
      setAutomatic(f.getName(), f.getAutomatic());
    }
    this.propagate = configuration.propagate;
  }