Search in sources :

Example 16 with TreeMapNode

use of net.sf.jtreemap.swing.TreeMapNode in project beakerx by twosigma.

the class TreeMapSerializerTest method initTestStubData.

@Before
public void initTestStubData() throws IOException {
    KernelManager.register(new KernelTest());
    sw = new StringWriter();
    jgen = mapper.getJsonFactory().createJsonGenerator(sw);
    treeMap = new TreeMap(new TreeMapNode("label", 1, new DefaultValue(1.5)));
}
Also used : DefaultValue(net.sf.jtreemap.swing.DefaultValue) StringWriter(java.io.StringWriter) KernelTest(com.twosigma.beakerx.KernelTest) TreeMapNode(net.sf.jtreemap.swing.TreeMapNode) TreeMap(com.twosigma.beakerx.chart.treemap.TreeMap) Before(org.junit.Before)

Example 17 with TreeMapNode

use of net.sf.jtreemap.swing.TreeMapNode in project beakerx by twosigma.

the class TreeMapTest method createWidget.

@Override
public TreeMap createWidget() {
    TreeMapNode node = new TreeMapNode("0");
    TreeMapNode node01 = new TreeMapNode("01");
    node01.add(new TreeMapNode("011", 1, new DefaultValue(1)));
    node.add(node01);
    TreeMap treeMap = new TreeMap(node);
    treeMap.display();
    kernel.clearMessages();
    return treeMap;
}
Also used : DefaultValue(net.sf.jtreemap.swing.DefaultValue) TreeMapNode(net.sf.jtreemap.swing.TreeMapNode)

Example 18 with TreeMapNode

use of net.sf.jtreemap.swing.TreeMapNode in project beakerx by twosigma.

the class GradientColorProviderTest method initStubData.

@Before
public void initStubData() {
    KernelManager.register(new KernelTest());
    treeMap = new TreeMap();
    treeMap.setRoot(new TreeMapNode("020", 2, new DefaultValue(2)));
    node01 = new TreeMapNode("010", 1, new DefaultValue(1));
}
Also used : DefaultValue(net.sf.jtreemap.swing.DefaultValue) KernelTest(com.twosigma.beakerx.KernelTest) TreeMapNode(net.sf.jtreemap.swing.TreeMapNode) TreeMap(com.twosigma.beakerx.chart.treemap.TreeMap) Before(org.junit.Before)

Aggregations

TreeMapNode (net.sf.jtreemap.swing.TreeMapNode)18 Test (org.junit.Test)11 DefaultValue (net.sf.jtreemap.swing.DefaultValue)10 JsonNode (com.fasterxml.jackson.databind.JsonNode)8 DefaultSerializerProvider (com.fasterxml.jackson.databind.ser.DefaultSerializerProvider)8 KernelTest (com.twosigma.beakerx.KernelTest)3 TreeMap (com.twosigma.beakerx.chart.treemap.TreeMap)3 Before (org.junit.Before)3 ChartTest (com.twosigma.beakerx.chart.ChartTest)2 IToolTipBuilder (com.twosigma.beakerx.chart.treemap.util.IToolTipBuilder)2 Color (com.twosigma.beakerx.chart.Color)1 StringWriter (java.io.StringWriter)1 Enumeration (java.util.Enumeration)1 HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1 Map (java.util.Map)1