Search in sources :

Example 1 with TestGraphics

use of kg.apc.emulators.TestGraphics in project jmeter-plugins by undera.

the class GraphPanelChartTest method testPaintComponent.

/**
 * Test of paintComponent method, of class GraphPanelChart.
 */
@Test
public void testPaintComponent() {
    System.out.println("paintComponent");
    Graphics g = new TestGraphics();
    GraphPanelChart instance = new GraphPanelChart();
    instance.setSize(500, 500);
    instance.getChartSettings().setDrawFinalZeroingLines(true);
    instance.getChartSettings().setDrawCurrentX(true);
    instance.getChartSettings().setExpendRows(true);
    final ConcurrentSkipListMap<String, AbstractGraphRow> rows = new ConcurrentSkipListMap<String, AbstractGraphRow>();
    instance.setRows(rows);
    final GraphRowAverages row1 = new GraphRowAverages();
    row1.setDrawThickLines(true);
    row1.setDrawLine(true);
    row1.setDrawBar(true);
    row1.setDrawValueLabel(true);
    row1.setMarkerSize(AbstractGraphRow.MARKER_SIZE_BIG);
    rows.put("test 1", row1);
    row1.add(System.currentTimeMillis(), 20);
    instance.paintComponent(g);
    row1.add(System.currentTimeMillis(), 540);
    instance.setxAxisLabelRenderer(new DateTimeRenderer("HH:mm:ss"));
    instance.paintComponent(g);
    row1.add(System.currentTimeMillis(), 8530);
    instance.paintComponent(g);
}
Also used : TestGraphics(kg.apc.emulators.TestGraphics) GraphRowAverages(kg.apc.charting.rows.GraphRowAverages) TestGraphics(kg.apc.emulators.TestGraphics) ConcurrentSkipListMap(java.util.concurrent.ConcurrentSkipListMap)

Example 2 with TestGraphics

use of kg.apc.emulators.TestGraphics in project jmeter-plugins by undera.

the class GraphPanelChartTest method testPaintComponent_empty.

/**
 */
@Test
public void testPaintComponent_empty() {
    System.out.println("paintComponent_empty");
    Graphics g = new TestGraphics();
    GraphPanelChart instance = new GraphPanelChart();
    instance.setSize(500, 500);
    instance.getChartSettings().setDrawFinalZeroingLines(false);
    final ConcurrentSkipListMap<String, AbstractGraphRow> rows = new ConcurrentSkipListMap<String, AbstractGraphRow>();
    instance.setRows(rows);
    instance.paintComponent(g);
}
Also used : TestGraphics(kg.apc.emulators.TestGraphics) TestGraphics(kg.apc.emulators.TestGraphics) ConcurrentSkipListMap(java.util.concurrent.ConcurrentSkipListMap)

Aggregations

ConcurrentSkipListMap (java.util.concurrent.ConcurrentSkipListMap)2 TestGraphics (kg.apc.emulators.TestGraphics)2 GraphRowAverages (kg.apc.charting.rows.GraphRowAverages)1