public FilteringTreeBuilder(Tree tree, ElementFilter filter, AbstractTreeStructure structure, @Nullable Comparator<NodeDescriptor> comparator) { super(tree, (DefaultTreeModel)tree.getModel(), structure instanceof FilteringTreeStructure ? structure : new FilteringTreeStructure(filter, structure), comparator); myTree = tree; initRootNode(); if (filter instanceof ElementFilter.Active) { ((ElementFilter.Active)filter).addListener(new ElementFilter.Listener() { @Override public ActionCallback update(final Object preferredSelection, final boolean adjustSelection, final boolean now) { return refilter(preferredSelection, adjustSelection, now); } }, this); } myTree.getSelectionModel().addTreeSelectionListener(new TreeSelectionListener() { @Override public void valueChanged(TreeSelectionEvent e) { TreePath newPath = e.getNewLeadSelectionPath(); if (newPath != null) { Object element = getElementFor(newPath.getLastPathComponent()); if (element != null) { myLastSuccessfulSelect = element; } } } }); }
public FilteringTreeStructure(@NotNull ElementFilter filter, @NotNull AbstractTreeStructure originalStructure, boolean initNow) { //noinspection unchecked myFilter = filter; myBaseStructure = originalStructure; myRoot = new FilteringNode(null, myBaseStructure.getRootElement()); if (initNow) { rebuild(); } }
public ListPopupModel(ElementFilter filter, SpeedSearch speedSearch, ListPopupStep step) { myFilter = filter; myStep = step; mySpeedSearch = speedSearch; myOriginalList = new ArrayList<Object>(step.getValues()); rebuildLists(); }
public FilteringTreeBuilder(Tree tree, ElementFilter filter, AbstractTreeStructure structure, @Nullable Comparator<NodeDescriptor> comparator) { super(tree, (DefaultTreeModel)tree.getModel(), structure instanceof FilteringTreeStructure ? structure : new FilteringTreeStructure(filter, structure), comparator); myTree = tree; initRootNode(); if (filter instanceof ElementFilter.Active) { ((ElementFilter.Active)filter).addListener(new ElementFilter.Listener() { public ActionCallback update(final Object preferredSelection, final boolean adjustSelection, final boolean now) { return refilter(preferredSelection, adjustSelection, now); } }, this); } myTree.getSelectionModel().addTreeSelectionListener(new TreeSelectionListener() { public void valueChanged(TreeSelectionEvent e) { TreePath newPath = e.getNewLeadSelectionPath(); if (newPath != null) { Object element = getElementFor(newPath.getLastPathComponent()); if (element != null) { myLastSuccessfulSelect = element; } } } }); }
public FilteringTreeStructure(@Nonnull ElementFilter filter, @Nonnull AbstractTreeStructure originalStructure, boolean initNow) { //noinspection unchecked myFilter = filter; myBaseStructure = originalStructure; myRoot = new FilteringNode(null, myBaseStructure.getRootElement()); if (initNow) { rebuild(); } }
public ListPopupModel(ElementFilter filter, SpeedSearch speedSearch, ListPopupStep step) { myFilter = filter; myStep = step; mySpeedSearch = speedSearch; myOriginalList = new ArrayList<>(step.getValues()); rebuildLists(); }
public FilteringTreeStructure(@NotNull ElementFilter filter, @NotNull AbstractTreeStructure originalStructure) { this(filter, originalStructure, true); }
public OptionsEditorContext(ElementFilter.Active filter) { myFilter = filter; }
@NotNull ElementFilter<Configurable> getFilter() { return myFilter; }
public FilteringTreeStructure(@Nonnull ElementFilter filter, @Nonnull AbstractTreeStructure originalStructure) { this(filter, originalStructure, true); }
@Nonnull ElementFilter<Configurable> getFilter() { return myFilter; }