Example usage for org.jfree.chart ChartColor DARK_BLUE

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

Introduction

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

Prototype

Color DARK_BLUE

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

Click Source Link

Document

A dark blue 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  w  w.  jav a 2  s  .com
            //            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:org.codehaus.mojo.dashboard.report.plugin.chart.time.SurefirePercentAxisDecorator.java

/**
 *
 *///from   w w  w.j a  v  a 2 s.  c  o m
public void createChart() {

    XYPlot xyplot = (XYPlot) report.getPlot();
    if (this.decoratedChart instanceof TimeChartRenderer && this.results != null && !this.results.isEmpty()) {

        Iterator iter = this.results.iterator();
        TimeSeriesCollection defaultdataset = new TimeSeriesCollection();
        TimeSeries s1 = new TimeSeries("% success", Day.class);

        while (iter.hasNext()) {
            SurefireReportBean surefire = (SurefireReportBean) iter.next();
            Date date = surefire.getDateGeneration();
            s1.addOrUpdate(new Day(TimePeriod.DAY.normalize(date)), surefire.getSucessRate() / PCENT);

        }

        defaultdataset.addSeries(s1);

        XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
        renderer.setBaseShapesVisible(true);
        renderer.setBaseShapesFilled(true);
        renderer.setSeriesPaint(0, ChartColor.DARK_BLUE);
        renderer.setBaseShapesVisible(true);
        renderer.setDrawOutlines(true);
        StandardXYItemLabelGenerator labelgenerator = new StandardXYItemLabelGenerator(
                StandardXYItemLabelGenerator.DEFAULT_ITEM_LABEL_FORMAT, TimePeriod.DAY.getDateFormat(),
                NumberFormat.getPercentInstance(Locale.getDefault()));
        renderer.setBaseItemLabelGenerator(labelgenerator);
        renderer.setBaseItemLabelFont(new Font("SansSerif", Font.BOLD, ITEM_LABEL_FONT_SIZE));
        renderer.setBaseItemLabelsVisible(true);
        renderer.setBasePositiveItemLabelPosition(
                new ItemLabelPosition(ItemLabelAnchor.OUTSIDE10, TextAnchor.BASELINE_RIGHT));

        renderer.setBaseStroke(new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));

        LegendTitle legendtitle = new LegendTitle(xyplot.getRenderer(0));
        legendtitle.setMargin(new RectangleInsets(2D, 2D, 2D, 2D));
        legendtitle.setFrame(new BlockBorder());
        legendtitle.setBackgroundPaint(ChartColor.WHITE);

        LegendTitle legendtitle1 = new LegendTitle(renderer);
        legendtitle1.setMargin(new RectangleInsets(2D, 2D, 2D, 2D));
        legendtitle1.setFrame(new BlockBorder());
        legendtitle1.setBackgroundPaint(ChartColor.WHITE);

        BlockContainer blockcontainer = new BlockContainer(new BorderArrangement());
        blockcontainer.add(legendtitle, RectangleEdge.LEFT);
        blockcontainer.add(legendtitle1, RectangleEdge.RIGHT);
        blockcontainer.add(new EmptyBlock(BLOCK_CONTAINER_WIDTH, 0.0D));

        CompositeTitle compositetitle = new CompositeTitle(blockcontainer);
        compositetitle.setPosition(RectangleEdge.BOTTOM);

        report.clearSubtitles();
        report.addSubtitle(compositetitle);

        xyplot.setDataset(1, defaultdataset);

        NumberAxis valueaxis = new NumberAxis("% success");
        valueaxis.setLowerMargin(0.0D);
        valueaxis.setUpperMargin(AXIS_UPPER_MARGIN);
        valueaxis.setRangeWithMargins(0.0D, 1.0D);
        valueaxis.setNumberFormatOverride(NumberFormat.getPercentInstance());
        xyplot.setRangeAxis(1, valueaxis);
        xyplot.mapDatasetToRangeAxis(1, 1);
        xyplot.setRenderer(1, renderer);
    }

}

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  ww  .  j a va 2s . co  m*/
    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 plotTrace() {
    XYSeriesCollection dataset = new XYSeriesCollection();

    XYSeries xyBoundsPositive = null;// w  w w. ja va2s  .c om
    XYSeries xyBoundsNegative = null;
    Trace[] posNeg = null;

    dataset.addSeries(Plotter.traceToSeries(trace));
    dataset.addSeries(Plotter.valueToSeries(trace.getMax(), "Max", trace.getSampleSize()));
    dataset.addSeries(Plotter.valueToSeries(trace.getAverage(), "Average", trace.getSampleSize()));
    dataset.addSeries(Plotter.valueToSeries(trace.getMin(), "Min", trace.getSampleSize()));

    int rows = tableWindowSize.getRowCount();
    double coverage;
    int wsize;
    for (int i = 0; i < rows; i++) {
        try {
            wsize = (Integer) tableWindowSize.getValueAt(i, 0);
            coverage = (Double) tableWindowSize.getValueAt(i, 1);

            if (trace.hasNegativeValues()) {
                posNeg = trace.splitPositiveNegative();
                xyBoundsPositive = Plotter.arrayToSeries(posNeg[0].getDynamicBound(coverage, wsize),
                        "c=" + coverage + ",w=" + wsize, wsize - 1);
                xyBoundsNegative = Plotter.arrayToSeriesInvert(posNeg[1].getDynamicBound(coverage, wsize),
                        "c=" + coverage + ",w=" + wsize + "(neg)", wsize - 1);
                dataset.addSeries(xyBoundsPositive);
                dataset.addSeries(xyBoundsNegative);
            } else {
                dataset.addSeries(Plotter.arrayToSeries(trace.getDynamicBound(coverage, wsize),
                        "c=" + coverage + ",w=" + wsize, wsize - 1));
            }
        } catch (NullPointerException e) {
            //Ignore: cell value is null
            ;
        }
    }

    // Generate the graph
    JFreeChart chart = ChartFactory.createXYLineChart(trace.getName(),
            // 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_BLUE);
    renderer.setSeriesPaint(2, ChartColor.DARK_GRAY);
    renderer.setSeriesPaint(3, ChartColor.DARK_BLUE);
    renderer.setSeriesPaint(4, 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);
}

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

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

    XYSeries xyBoundsPositive = null;//  w ww  .ja  v a2 s  .  c o m
    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);
}