Example usage for org.jfree.chart ChartColor DARK_GREEN

List of usage examples for org.jfree.chart ChartColor DARK_GREEN

Introduction

In this page you can find the example usage for org.jfree.chart ChartColor DARK_GREEN.

Prototype

Color DARK_GREEN

To view the source code for org.jfree.chart ChartColor DARK_GREEN.

Click Source Link

Document

A dark green color.

Usage

From source file:org.gumtree.vis.awt.DefaultChartTheme.java

public static Paint[] createDefaultPaintArray() {

    return new Paint[] { ChartColor.DARK_BLUE, ChartColor.DARK_GREEN, ChartColor.DARK_MAGENTA,
            ChartColor.DARK_CYAN, ChartColor.DARK_RED, ChartColor.DARK_YELLOW, Color.darkGray,
            new Color(0xFF, 0x55, 0x55), new Color(0x55, 0x55, 0xFF), new Color(0x00, 0x77, 0x00),
            new Color(0x77, 0x77, 0x00), new Color(0xCA, 0x00, 0xCA), new Color(0x00, 0x88, 0x88),
            //            Color.pink,
            Color.gray,/*from w ww.  j ava2s .c o m*/
            //            ChartColor.LIGHT_RED,
            //            ChartColor.LIGHT_BLUE,
            //            ChartColor.LIGHT_GREEN,
            //            ChartColor.LIGHT_YELLOW,
            //            ChartColor.LIGHT_MAGENTA,
            //            ChartColor.LIGHT_CYAN,
            //            Color.lightGray,
            ChartColor.VERY_DARK_RED, ChartColor.VERY_DARK_BLUE, ChartColor.VERY_DARK_GREEN,
            ChartColor.VERY_DARK_YELLOW, ChartColor.VERY_DARK_MAGENTA, ChartColor.VERY_DARK_CYAN,
            ChartColor.VERY_LIGHT_RED, ChartColor.VERY_LIGHT_BLUE, ChartColor.VERY_LIGHT_GREEN,
            ChartColor.VERY_LIGHT_YELLOW, ChartColor.VERY_LIGHT_MAGENTA, ChartColor.VERY_LIGHT_CYAN };
}

From source file:com.itemanalysis.jmetrik.swing.JmetrikXYLineAndShapeRenderer.java

public Paint getItemPaint(int row, int col) {
    Paint[] altColors = { Color.BLACK, ChartColor.RED, ChartColor.DARK_BLUE, ChartColor.DARK_GREEN,
            ChartColor.DARK_MAGENTA, ChartColor.DARK_CYAN, ChartColor.LIGHT_RED, ChartColor.LIGHT_BLUE,
            ChartColor.LIGHT_GREEN, ChartColor.LIGHT_MAGENTA, ChartColor.LIGHT_CYAN, ChartColor.VERY_DARK_RED,
            ChartColor.VERY_DARK_BLUE, ChartColor.VERY_DARK_GREEN, ChartColor.VERY_DARK_YELLOW,
            ChartColor.VERY_DARK_MAGENTA, ChartColor.VERY_DARK_CYAN, ChartColor.VERY_LIGHT_RED,
            ChartColor.VERY_LIGHT_BLUE, ChartColor.VERY_LIGHT_GREEN, ChartColor.VERY_LIGHT_MAGENTA,
            ChartColor.VERY_LIGHT_CYAN };

    return altColors[row];
}

From source file:net.sf.mzmine.chartbasics.chartthemes.ChartThemeFactory.java

public static EStandardChartTheme createBlackNWhiteTheme() {
    EStandardChartTheme theme = new EStandardChartTheme(THEME.BNW_PRINT, "BnW");
    // Fonts/*from   w w w.j  av  a2s.  c om*/
    theme.setExtraLargeFont(new Font("Arial", Font.BOLD, 16));
    theme.setLargeFont(new Font("Arial", Font.BOLD, 11));
    theme.setRegularFont(new Font("Arial", Font.PLAIN, 11));
    theme.setSmallFont(new Font("Arial", Font.PLAIN, 11));

    // Paints
    theme.setTitlePaint(Color.black);
    theme.setSubtitlePaint(Color.black);
    theme.setLegendItemPaint(Color.black);
    theme.setPlotOutlinePaint(Color.black);
    theme.setBaselinePaint(Color.black);
    theme.setCrosshairPaint(Color.black);
    theme.setLabelLinkPaint(Color.black);
    theme.setTickLabelPaint(Color.black);
    theme.setAxisLabelPaint(Color.black);
    theme.setShadowPaint(Color.black);
    theme.setItemLabelPaint(Color.black);

    theme.setLegendBackgroundPaint(Color.white);
    theme.setChartBackgroundPaint(Color.white);
    theme.setPlotBackgroundPaint(Color.white);

    // paint sequence: add black
    Paint[] colors = new Paint[] { Color.BLACK, new Color(0xFF, 0x55, 0x55), new Color(0x55, 0x55, 0xFF),
            new Color(0x55, 0xFF, 0x55), new Color(0xFF, 0xFF, 0x55), new Color(0xFF, 0x55, 0xFF),
            new Color(0x55, 0xFF, 0xFF), Color.pink, Color.gray, ChartColor.DARK_RED, ChartColor.DARK_BLUE,
            ChartColor.DARK_GREEN, ChartColor.DARK_YELLOW, ChartColor.DARK_MAGENTA, ChartColor.DARK_CYAN,
            Color.darkGray, ChartColor.LIGHT_RED, ChartColor.LIGHT_BLUE, ChartColor.LIGHT_GREEN,
            ChartColor.LIGHT_YELLOW, ChartColor.LIGHT_MAGENTA, ChartColor.LIGHT_CYAN, Color.lightGray,
            ChartColor.VERY_DARK_RED, ChartColor.VERY_DARK_BLUE, ChartColor.VERY_DARK_GREEN,
            ChartColor.VERY_DARK_YELLOW, ChartColor.VERY_DARK_MAGENTA, ChartColor.VERY_DARK_CYAN,
            ChartColor.VERY_LIGHT_RED, ChartColor.VERY_LIGHT_BLUE, ChartColor.VERY_LIGHT_GREEN,
            ChartColor.VERY_LIGHT_YELLOW, ChartColor.VERY_LIGHT_MAGENTA, ChartColor.VERY_LIGHT_CYAN };

    theme.setDrawingSupplier(
            new DefaultDrawingSupplier(colors, DefaultDrawingSupplier.DEFAULT_FILL_PAINT_SEQUENCE,
                    DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE,
                    DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE,
                    DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
                    DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE));
    theme.setErrorIndicatorPaint(Color.black);
    theme.setGridBandPaint(new Color(255, 255, 255, 20));
    theme.setGridBandAlternatePaint(new Color(255, 255, 255, 40));

    // axis
    Color transp = new Color(0, 0, 0, 200);
    theme.setRangeGridlinePaint(transp);
    theme.setDomainGridlinePaint(transp);

    theme.setAxisLinePaint(Color.black);

    // axis offset
    theme.setAxisOffset(new RectangleInsets(0, 0, 0, 0));

    return theme;
}

From source file:it.unifi.rcl.chess.traceanalysis.gui.TracePanel.java

private void plotCompare() {
    XYSeriesCollection dataset = new XYSeriesCollection();

    XYSeries xyBoundsPositive = null;//from   w  ww  .j  av  a 2 s.c om
    XYSeries xyBoundsNegative = null;
    Trace[] posNeg = null;

    Component[] siblings = this.getParent().getComponents();
    Trace[] allTraces = new Trace[siblings.length];

    int rows = tableWindowSize.getRowCount();
    double coverage = 0.99;
    int wsize = 100;
    for (int i = 0; i < rows; i++) {
        try {
            wsize = (Integer) tableWindowSize.getValueAt(i, 0);
            coverage = (Double) tableWindowSize.getValueAt(i, 1);
        } catch (NullPointerException e) {
            //Ignore: cell value is null
            ;
        }
    }

    for (int i = 0; i < siblings.length; i++) {
        allTraces[i] = ((TracePanel) siblings[i]).getTrace();

        if (allTraces[i].hasNegativeValues()) {
            posNeg = allTraces[i].splitPositiveNegative();
            xyBoundsPositive = Plotter.arrayToSeries(posNeg[0].getDynamicBound(coverage, wsize),
                    allTraces[i].getName(), wsize - 1);
            xyBoundsNegative = Plotter.arrayToSeriesInvert(posNeg[1].getDynamicBound(coverage, wsize),
                    allTraces[i].getName() + "(neg)", wsize - 1);
            dataset.addSeries(xyBoundsPositive);
            dataset.addSeries(xyBoundsNegative);
        } else {
            dataset.addSeries(Plotter.arrayToSeries(allTraces[i].getDynamicBound(coverage, wsize),
                    allTraces[i].getName(), wsize - 1));
        }
    }

    // Generate the graph
    JFreeChart chart = ChartFactory.createXYLineChart("Comparative Plot (c=" + coverage + ",w=" + wsize + ")",
            // Title
            "Time Point",
            // x-axis Labels
            "Value",
            // y-axis Label
            dataset,
            // Dataset
            PlotOrientation.VERTICAL, // Plot Orientation
            true,
            // Show Legend
            true,
            // Use tooltips
            false
    // Configure chart to generate URLs?
    );

    chart.setBackgroundPaint(Color.WHITE);
    chart.getXYPlot().setBackgroundPaint(ChartColor.VERY_LIGHT_YELLOW);
    chart.getXYPlot().setBackgroundAlpha(0.05f);
    chart.getXYPlot().setRangeGridlinePaint(Color.LIGHT_GRAY);
    chart.getXYPlot().setDomainGridlinePaint(Color.LIGHT_GRAY);

    chart.getTitle().setFont(new Font("Dialog", Font.BOLD, 14));

    XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
    renderer.setDrawSeriesLineAsPath(true);
    chart.getXYPlot().setRenderer(renderer);

    renderer.setSeriesPaint(0, Color.BLACK);
    renderer.setSeriesPaint(1, ChartColor.DARK_GREEN);
    renderer.setSeriesPaint(2, ChartColor.DARK_BLUE);
    renderer.setSeriesPaint(3, ChartColor.RED);

    int nSeries = chart.getXYPlot().getSeriesCount();
    for (int i = 0; i < nSeries; i++) {
        renderer.setSeriesShapesVisible(i, false);
    }
    if (posNeg != null) {
        renderer.setSeriesVisibleInLegend(5, false);
        renderer.setSeriesPaint(5, renderer.getSeriesPaint(4));
    }

    //      Stroke plainStroke = new BasicStroke(
    //                    1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1.0f
    //                );
    //      
    //      renderer.setSeriesStroke(0, plainStroke);
    //      renderer.setSeriesStroke(1, 
    //            new BasicStroke(
    //                 1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1.0f, new float[] { 6.0f, 3.0f }, 0.0f
    //             ));
    //      renderer.setSeriesStroke(2, 
    //            new BasicStroke(
    //                 1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1.0f, new float[] { 3.0f, 0.5f, 3.0f }, 0.0f
    //             ));
    //      renderer.setSeriesStroke(3, 
    //            new BasicStroke(
    //                 1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1.0f, new float[] { 6.0f, 3.0f }, 0.0f
    //             ));

    JPanel plotPanel = new ChartPanel(chart);
    JFrame plotFrame = new JFrame();
    plotFrame.add(plotPanel);
    plotFrame.setVisible(true);
    plotFrame.pack();
    plotFrame.setTitle(TracePanel.this.trace.getName());
    plotFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
}