/** * 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); } }
/** * 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); }