Package org.freeplane.features.filter

Examples of org.freeplane.features.filter.Filter


    final FilterController filterController = FilterController.getCurrentFilterController();
    if (closure == null) {
      filterController.applyNoFiltering();
    }
    else {
      final Filter filter = new Filter(ProxyUtils.createCondition(closure, getScriptContext()), false, false,
          true);
      filterController.applyFilter(filter, getDelegate(), true);
    }
  }
View Full Code Here


    final FilterController filterController = FilterController.getCurrentFilterController();
    if (closure == null) {
      filterController.applyNoFiltering();
    }
    else {
      final Filter filter = new Filter(ProxyUtils.createCondition(closure, getScriptContext()), showAncestors,
          showDescendants, true);
      filterController.applyFilter(filter, getDelegate(), true);
    }
  }
View Full Code Here

                return node.isLeaf();
            }
        };
        final int nodeTotalNodeCount = getNodeCount(rootNode, trueCondition);
        final int nodeTotalLeafCount = getNodeCount(rootNode, isLeafCondition);
        final Filter filter = map.getFilter();
        final int nodeTotalFiltered;
        if(filter != null && filter.getCondition() != null){
            final ICondition matchesFilterCondition = new ICondition() {
                public boolean checkNode(NodeModel node) {
                    return filter.matches(node);
                }
            };
            nodeTotalFiltered = getNodeCount(rootNode, matchesFilterCondition);
        }
        else{
View Full Code Here

  public void test_NodeRO_isVisible() {
    map = c.newMap();
    map.getRoot().createChild("first node");
    map.getRoot().createChild("second node");
    assertTrue("initially all nodes should be visible", firstChild().isVisible());
    new Filter(new NodeContainsCondition(TextController.FILTER_NODE, "first", false), true, true, true).applyFilter(this, Controller
        .getCurrentController().getMap(), true);
    assertTrue("first node should be  matched by the filter", firstChild().isVisible());
    assertFalse("second node should not be matched by the filter", map.getRoot().getChildren().get(1).isVisible());
    c.setStatusInfo("filter", (String) null);
  }
View Full Code Here

  public boolean isRoot() {
    return getMap().getRootNode() == this;
  }

  public boolean isVisible() {
    final Filter filter = getMap().getFilter();
    return filter == null || filter.isVisible(this);
  }
View Full Code Here

TOP

Related Classes of org.freeplane.features.filter.Filter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.