예제 #1
0
 private void initFeatures(SelectableFeature sFeature, IFeature feature) {
   if (sFeature != null && sFeature.getName() != null) {
     features.add(sFeature);
     table.put(sFeature.getName(), sFeature);
     for (IFeatureStructure child : feature.getStructure().getChildren()) {
       SelectableFeature sChild = new SelectableFeature(this, child.getFeature());
       sFeature.addChild(sChild);
       initFeatures(sChild, child.getFeature());
     }
   }
 }
예제 #2
0
  private SelectableFeature initRoot() {
    final IFeature featureRoot = FeatureUtils.getRoot(featureModel);
    final SelectableFeature root = new SelectableFeature(this, featureRoot);

    if (featureRoot != null) {
      initFeatures(root, featureRoot);
    } else {
      features.add(root);
      table.put(root.getName(), root);
    }

    return root;
  }