EntrySupport origSupport = original.getChildren().entrySupport(); synchronized (org.openide.nodes.Children.class) { if (getEntrySupport() == support && support.originalSupport() != origSupport) {
@Override public int getNodesCount(boolean optimalResult) { return filterSupport().callGetNodesCount(optimalResult); }
@Override Entry createEntryForKey(Node key) { return filterSupport().createEntryForKey(key); }
@Override public Node findChild(String name) { return filterSupport().findChild(name); }
/** Called when the filter node reorders its children. * The default implementation makes a corresponding change. * @param ev info about the change */ protected void filterChildrenReordered(NodeReorderEvent ev) { filterSupport().filterChildrenReordered(ev); }
/** Called when the filter node adds a new child. * The default implementation makes a corresponding change. * @param ev info about the change */ protected void filterChildrenAdded(NodeMemberEvent ev) { if (checkSupportChanged()) { // support was changed, we should be already updated return; } filterSupport().filterChildrenAdded(ev); }
private boolean checkSupportChanged() { FilterChildrenSupport support = (FilterChildrenSupport) entrySupport(); EntrySupport origSupport = original.getChildren().entrySupport(); if (support.originalSupport() != origSupport) { assert Children.MUTEX.isWriteAccess() : "Should be called only under write access"; // NOI18N changeSupport(null); return true; } else { return false; } }
private void addNotifyImpl() { // add itself to reflect to changes children of original node nodeL = new ChildrenAdapter(this); original.addNodeListener(nodeL); filterSupport().update(); }
/** Called when the filter node removes a child. * The default implementation makes a corresponding change. * @param ev info about the change */ protected void filterChildrenRemoved(NodeMemberEvent ev) { if (checkSupportChanged()) { // support was changed, we should be already updated return; } filterSupport().filterChildrenRemoved(ev); }
/** * Implementation that ensures the original node is fully initialized * if optimal result is requested. * * @param optimalResult if <code>true</code>, the method will block * until the original node is fully initialized. * @since 3.9 */ @Override public Node[] getNodes(boolean optimalResult) { return filterSupport().callGetNodes(optimalResult); }