Package org.freeplane.plugin.script.proxy.Proxy

Examples of org.freeplane.plugin.script.proxy.Proxy.Node


    return new NodeProxy(newNodeModel, getScriptContext());
  }
 
  // Node: R/W
  public Proxy.Node createChild(final Object value) {
    final Node child = createChild();
    child.setObject(value);
    return child;
  }
View Full Code Here


  //   
  //  }
  public void test_ControllerRO_getSelected() {
    map = c.newMap();
    assertEquals("new root node should be selected", map.getRoot(), c.getSelected());
    final Node firstChild = map.getRoot().createChild("child 1");
    final Node secondChild = map.getRoot().createChild("child 2");
    // FIXME: why aren't the new node selected?
    assertEquals("root node should still be selected after adding nodes", map.getRoot(), c.getSelected());
    c.selectMultipleNodes(list(firstChild, secondChild));
    // what's the rule?
    assertEquals("last selected node should be returned", secondChild, c.getSelected());
View Full Code Here

  }

  public void test_ControllerRO_getSelecteds() {
    map = c.newMap();
    assertEquals("new root node should be selected", map.getRoot(), c.getSelected());
    final Node firstChild = map.getRoot().createChild("child 1");
    final Node secondChild = map.getRoot().createChild("child 2");
    assertEquals("root node should still be selected after adding nodes", set(map.getRoot()), set(c
        .getSelecteds()));
    c.selectMultipleNodes(list(firstChild, secondChild));
    assertEquals("only the nodes selected via selectMultipleNodes should be returned",
        set(firstChild, secondChild), set(c.getSelecteds()));
View Full Code Here

  }

  @SuppressWarnings("deprecation")
    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

   
  }

  public void test_Controller_centerOnNode_Node_center() {
    map = c.newMap();
    final Node firstChild = map.getRoot().createChild("child 1");
    // no actual test
    c.centerOnNode(firstChild);
  }
View Full Code Here

    c.centerOnNode(firstChild);
  }

  public void test_Controller_select_Node_toSelect() {
    map = c.newMap();
    final Node firstChild = map.getRoot().createChild("child 1");
    final Node secondChild = map.getRoot().createChild("child 2");
    final Node thirdChild = map.getRoot().createChild("child 3");
    c.select(secondChild);
    final Set<Node> set = set(secondChild);
    final Set<Node> selected = set(c.getSelecteds());
    assertEquals("one node should be selected", set, selected);
    c.select(firstChild);
View Full Code Here

    assertEquals("one node should be selected", set(thirdChild), set(c.getSelecteds()));
  }

  public void test_Controller_selectBranch_Node_branchRoot() {
    map = c.newMap();
    final Node child1 = map.getRoot().createChild("child 1");
    final Node child2 = map.getRoot().createChild("child 2");
    final Node grandchild1 = child1.createChild("child 1.1");
    final Node grandchild2 = child1.createChild("child 1.2");
    final Node grandGrandChild = child1.createChild("child 1.1.1");
    c.selectBranch(child1);
    assertEquals("all node of the branch should be selected",
        set(child1, grandchild1, grandchild2, grandGrandChild), set(c.getSelecteds()));
    c.selectBranch(child2);
    assertEquals("one node should be selected", set(child2), set(c.getSelecteds()));
View Full Code Here

    assertEquals("the root node shouldn't have a parent", null, map.getRoot().getParent());
  }

  public void test_MapRO_node_String_id() {
    map = c.newMap();
    final Node firstChild = map.getRoot().createChild("child 1");
    final String id = firstChild.getId();
    assertEquals("get by id returned wrong node", firstChild, map.node(id));
  }
View Full Code Here

    assertEquals("value should be found", "va1", map.getRoot().getAttributes().get(0));
  }

  public void test_NodeRO_getChildPosition_Node_childNode() {
    map = c.newMap();
    final Node child1 = map.getRoot().createChild("child 1");
    final Node child2 = map.getRoot().createChild("child 2");
    assertEquals("wrong position", 0, map.getRoot().getChildPosition(child1));
    assertEquals("wrong position", 1, map.getRoot().getChildPosition(child2));
  }
View Full Code Here

    assertEquals("wrong position", 1, map.getRoot().getChildPosition(child2));
  }

  public void test_NodeRO_getChildren() {
    map = c.newMap();
    final Node child1 = map.getRoot().createChild("child 1");
    final Node child2 = map.getRoot().createChild("child 2");
    final List<Node> children = map.getRoot().getChildren();
    assertEquals("wrong children count", 2, children.size());
    assertEquals("wrong order", child1, children.get(0));
    assertEquals("wrong order", child2, children.get(1));
  }
View Full Code Here

TOP

Related Classes of org.freeplane.plugin.script.proxy.Proxy.Node

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.