Package org.freeplane.features.text

Examples of org.freeplane.features.text.NodeContainsCondition


    public void test_ControllerRO_find_ICondition_condition() {
    map = c.newMap();
    @SuppressWarnings("unused")
    final Node firstChild = map.getRoot().createChild("child 1");
    final Node secondChild = map.getRoot().createChild("child 2");
    final List<Node> found = c.find(new NodeContainsCondition(TextController.FILTER_NODE, "child 2", false));
    assertEquals("one matching node should be found", list(secondChild), found);
  }
View Full Code Here


  @SuppressWarnings("deprecation")
  public void test_Controller_undo_redo_stuff() {
    map = c.newMap();
    map.getRoot().createChild("child 1");
    assertFalse("node should be there before undo", c.find(new NodeContainsCondition(TextController.FILTER_NODE, "child 1", false)).isEmpty());
    c.undo();
    assertTrue("node should be away after undo", c.find(new NodeContainsCondition(TextController.FILTER_NODE, "child 1", false)).isEmpty());
    c.redo();
    assertFalse("node should be there after redo", c.find(new NodeContainsCondition(TextController.FILTER_NODE, "child 1", false)).isEmpty());
    c.deactivateUndo();
    c.undo();
    assertTrue("node should still be there after undo since undo is deactivated", c.find(
        new NodeContainsCondition(TextController.FILTER_NODE, "child 1", false)).isEmpty());
  }
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 void test_NodeRO_find_ICondition_condition() {
    map = c.newMap();
    @SuppressWarnings("unused")
    final Node firstChild = map.getRoot().createChild("child 1");
    final Node secondChild = map.getRoot().createChild("child 2");
    final List<Node> found = c.find(new NodeContainsCondition(TextController.FILTER_NODE, "child 2", false));
    assertEquals("one matching node should be found", list(secondChild), found);
  }
View Full Code Here

TOP

Related Classes of org.freeplane.features.text.NodeContainsCondition

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.