Example usage for org.apache.poi.hssf.usermodel DummyGraphics2d DummyGraphics2d

List of usage examples for org.apache.poi.hssf.usermodel DummyGraphics2d DummyGraphics2d

Introduction

In this page you can find the example usage for org.apache.poi.hssf.usermodel DummyGraphics2d DummyGraphics2d.

Prototype

public DummyGraphics2d() 

Source Link

Usage

From source file:ubic.basecode.graphics.MatrixDisplayTest.java

License:Apache License

/**
 * //  w w  w  . jav  a2 s  . com
 *
 */
@Test
public void testSaveImageStandardize() {

    DoubleMatrix<String, String> matrix = new DenseDoubleMatrix<String, String>(array);
    matrix.setRowNames(rowNames);
    matrix.setColumnNames(colNames);
    ColorMatrix<String, String> colorMatrix = new ColorMatrix<String, String>(matrix);
    MatrixDisplay<String, String> display = new MatrixDisplay<String, String>(colorMatrix);
    display.setLabelsVisible(true);
    display.setScaleBarVisible(true);
    boolean fail = false;
    try {
        display.saveImage(tmp.getAbsolutePath());
    } catch (IOException e) {
        fail = true;
        e.printStackTrace();
    } finally {
        assertFalse(fail);
    }

    display.paintComponent(new DummyGraphics2d());
}