Search in sources :

Example 11 with Node

use of org.eclipse.nebula.widgets.nattable.columnCategories.Node in project nebula.widgets.nattable by eclipse.

the class TreeTest method insertChild.

@Test
public void insertChild() throws Exception {
    Node a = this.tree.find("a");
    a.addChild(newNode("a1"));
    a.addChild(newNode("a2"));
    Assert.assertEquals(2, a.getNumberOfChildren());
    Assert.assertEquals("{UNKNOWN,a,[a1,a2]}", a.toString());
    a.insertChildAt(1, newNode("a11"));
    Assert.assertEquals(3, a.getNumberOfChildren());
    Assert.assertEquals("{UNKNOWN,a,[a1,a11,a2]}", a.toString());
}
Also used : Node(org.eclipse.nebula.widgets.nattable.columnCategories.Node) Test(org.junit.Test)

Aggregations

Node (org.eclipse.nebula.widgets.nattable.columnCategories.Node)11 Test (org.junit.Test)7 ColumnCategoriesModel (org.eclipse.nebula.widgets.nattable.columnCategories.ColumnCategoriesModel)4 TableColumn (org.eclipse.nebula.widgets.nattable.extension.builder.model.TableColumn)3 ArrayList (java.util.ArrayList)1 LinkedHashMap (java.util.LinkedHashMap)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 TreeSelection (org.eclipse.jface.viewers.TreeSelection)1 Tree (org.eclipse.nebula.widgets.nattable.columnCategories.Tree)1 ColumnEntry (org.eclipse.nebula.widgets.nattable.columnChooser.ColumnEntry)1 Before (org.junit.Before)1