Ejemplo n.º 1
0
 /**
  * Selektiert ein Item im TreeView.
  *
  * @param component
  */
 public void selectItem(ModelComponent component) {
   if (component != null && component.isTreeViewVisible()) {
     fTreeView.selectItem(component);
     Set<ModelComponent> comps = new HashSet<>(1);
     comps.add(component);
     OpenTCSView.instance().editingOptions(comps);
   }
 }
Ejemplo n.º 2
0
  /**
   * Selects multiple items in the tree view.
   *
   * @param components The components to select. Pass <code>null</code> to deselect everything
   *     currently selected.
   */
  public void selectItems(Set<ModelComponent> components) {
    Set<ModelComponent> visibleComponents = new HashSet<>();

    if (components != null) {
      for (ModelComponent comp : components) {
        if (comp.isTreeViewVisible()) {
          visibleComponents.add(comp);
        }
      }
    }

    fTreeView.selectItems(visibleComponents);
    OpenTCSView.instance().editingOptions(components);
  }