Example usage for java.awt Color orange

List of usage examples for java.awt Color orange

Introduction

In this page you can find the example usage for java.awt Color orange.

Prototype

Color orange

To view the source code for java.awt Color orange.

Click Source Link

Document

The color orange.

Usage

From source file:jmbench.plots.OperationsVersusSizePlot.java

public static Color getColor(int num) {
    switch (num) {
    case 0:/*from www.  ja v  a2  s. co m*/
        return new Color(0f, 0f, 1f, 0.6f);

    case 1:
        return new Color(0.5f, 0.7f, 0f, 0.6f);

    case 2:
        return Color.BLACK;

    case 3:
        return Color.RED;

    case 4:
        return Color.CYAN;

    case 5:
        return Color.ORANGE;

    case 6:
        return Color.GREEN;

    case 7:
        return Color.lightGray;

    case 8:
        return Color.blue;

    case 9:
        return new Color(255, 0, 255, 190); //magenta with translucent

    case 10:
        return new Color(230, 150, 0); // darker orange

    case 11:
        return new Color(255, 0, 255, 190);

    case 12:
        return new Color(120, 255, 0);

    default:
        throw new RuntimeException("add some more");
    }
}

From source file:com.xilinx.kintex7.ThermoPlot.java

public void createPlot() {
    dset = new DefaultValueDataset(50);
    plot = new ThermometerPlot(dset);
    plot.setRange(0, 125);//from   w  ww .jav  a2 s  . c om
    //plot.setFollowDataInSubranges(true);
    //plot.setUseSubrangePaint(false);
    plot.setThermometerStroke(new BasicStroke(2.0f));
    plot.setSubrange(ThermometerPlot.NORMAL, 0, 60);
    plot.setSubrange(ThermometerPlot.WARNING, 60, 85);
    plot.setSubrange(ThermometerPlot.CRITICAL, 86, 125);

    plot.setThermometerPaint(Color.BLACK);
    plot.setOutlineVisible(false);
    plot.setBackgroundAlpha(0);
    plot.setMercuryPaint(Color.ORANGE);
    plot.setUnits(ThermometerPlot.UNITS_NONE);
    chart = new JFreeChart("", plot);
    TextTitle ttitle = new TextTitle("Temperature (\u2103)", new Font("Temperature (\u2103)", Font.BOLD, 15));
    ttitle.setPaint(Color.WHITE);
    chart.setTitle(ttitle);
    chart.setBackgroundPaint(new Color(133, 133, 133));
    //chart.setTitle("");
}

From source file:de.fub.maps.project.plugins.tasks.eval.OverviewChart.java

private void initRenderer(CategoryItemRenderer renderer) {
    Color[] colors = new Color[] { Color.red, Color.blue, Color.orange, Color.cyan, Color.yellow, Color.magenta,
            Color.green, Color.pink, Color.black, Color.gray };

    if (!this.roadNetworkStatisticsList.isEmpty()) {
        for (int i = 0; i < this.roadNetworkStatisticsList.size(); i++) {
            renderer.setSeriesPaint(i, colors[i % colors.length]);
        }/*  ww w .java2  s .  c o  m*/
    }
}

From source file:org.openmrs.module.vcttrac.web.view.chart.VCTCreateBarChartView.java

/**
 * Returns an array of paint objects that will be used for the bar colors.
 * // w  w w . ja va2 s .  c  om
 * @return An array of paint objects.
 */
private static Paint[] createPaint() {
    Paint[] colors = new Paint[5];

    colors[0] = new GradientPaint(0.0f, 0.0f, Color.red, 0.0f, 0.0f, new Color(64, 0, 0));
    colors[1] = new GradientPaint(0.0f, 0.0f, Color.blue, 0.0f, 0.0f, new Color(0, 0, 64));
    colors[2] = new GradientPaint(0.0f, 0.0f, Color.green, 0.0f, 0.0f, new Color(0, 64, 0));
    colors[3] = new GradientPaint(0f, 0f, Color.orange, 0.0f, 0.0f, new Color(250, 128, 114));
    colors[4] = new GradientPaint(0f, 0f, Color.yellow, 0.0f, 0.0f, new Color(255, 215, 0));
    return colors;
}

From source file:fr.esecure.banking.PDFTransactionRapport.java

private Style createHeaderStyle() {
    StyleBuilder sb = new StyleBuilder(true);
    sb.setFont(Font.VERDANA_MEDIUM_BOLD);
    sb.setBorder(Border.THIN());/*from  www  . ja v  a  2 s  .c  o m*/
    sb.setBorderBottom(Border.PEN_2_POINT());
    sb.setBorderColor(Color.BLACK);
    sb.setBackgroundColor(Color.ORANGE);
    sb.setTextColor(Color.BLACK);
    sb.setHorizontalAlign(HorizontalAlign.CENTER);
    sb.setVerticalAlign(VerticalAlign.MIDDLE);
    sb.setTransparency(Transparency.OPAQUE);
    return sb.build();
}

From source file:org.jfree.chart.demo.MarkerDemo1.java

/**
 * Creates a sample chart./*w  ww .j  av  a 2 s. c  o  m*/
 *
 * @param data  the sample data.
 *
 * @return A configured chart.
 */
private JFreeChart createChart(final XYDataset data) {

    final JFreeChart chart = ChartFactory.createScatterPlot("Marker Demo 1", "X", "Y", data,
            PlotOrientation.VERTICAL, true, true, false);
    //    chart.getLegend().setAnchor(Legend.EAST);

    // customise...
    final XYPlot plot = chart.getXYPlot();
    plot.getRenderer().setToolTipGenerator(StandardXYToolTipGenerator.getTimeSeriesInstance());

    // set axis margins to allow space for marker labels...
    final DateAxis domainAxis = new DateAxis("Time");
    domainAxis.setUpperMargin(0.50);
    plot.setDomainAxis(domainAxis);

    final ValueAxis rangeAxis = plot.getRangeAxis();
    rangeAxis.setUpperMargin(0.30);
    rangeAxis.setLowerMargin(0.50);

    // add a labelled marker for the bid start price...
    final Marker start = new ValueMarker(200.0);
    start.setPaint(Color.green);
    start.setLabel("Bid Start Price");
    start.setLabelAnchor(RectangleAnchor.BOTTOM_RIGHT);
    start.setLabelTextAnchor(TextAnchor.TOP_RIGHT);
    plot.addRangeMarker(start);

    // add a labelled marker for the target price...
    final Marker target = new ValueMarker(175.0);
    target.setPaint(Color.red);
    target.setLabel("Target Price");
    target.setLabelAnchor(RectangleAnchor.TOP_RIGHT);
    target.setLabelTextAnchor(TextAnchor.BOTTOM_RIGHT);
    plot.addRangeMarker(target);

    // add a labelled marker for the original closing time...
    final Hour hour = new Hour(2, new Day(22, 5, 2003));
    double millis = hour.getFirstMillisecond();
    final Marker originalEnd = new ValueMarker(millis);
    originalEnd.setPaint(Color.orange);
    originalEnd.setLabel("Original Close (02:00)");
    originalEnd.setLabelAnchor(RectangleAnchor.TOP_LEFT);
    originalEnd.setLabelTextAnchor(TextAnchor.TOP_RIGHT);
    plot.addDomainMarker(originalEnd);

    // add a labelled marker for the current closing time...
    final Minute min = new Minute(15, hour);
    millis = min.getFirstMillisecond();
    final Marker currentEnd = new ValueMarker(millis);
    currentEnd.setPaint(Color.red);
    currentEnd.setLabel("Close Date (02:15)");
    currentEnd.setLabelAnchor(RectangleAnchor.TOP_RIGHT);
    currentEnd.setLabelTextAnchor(TextAnchor.TOP_LEFT);
    plot.addDomainMarker(currentEnd);

    // ****************************************************************************
    // * JFREECHART DEVELOPER GUIDE                                               *
    // * The JFreeChart Developer Guide, written by David Gilbert, is available   *
    // * to purchase from Object Refinery Limited:                                *
    // *                                                                          *
    // * http://www.object-refinery.com/jfreechart/guide.html                     *
    // *                                                                          *
    // * Sales are used to provide funding for the JFreeChart project - please    * 
    // * support us so that we can continue developing free software.             *
    // ****************************************************************************

    // label the best bid with an arrow and label...
    final Hour h = new Hour(2, new Day(22, 5, 2003));
    final Minute m = new Minute(10, h);
    millis = m.getFirstMillisecond();
    final CircleDrawer cd = new CircleDrawer(Color.red, new BasicStroke(1.0f), null);
    final XYAnnotation bestBid = new XYDrawableAnnotation(millis, 163.0, 11, 11, cd);
    plot.addAnnotation(bestBid);
    final XYPointerAnnotation pointer = new XYPointerAnnotation("Best Bid", millis, 163.0, 3.0 * Math.PI / 4.0);
    pointer.setBaseRadius(35.0);
    pointer.setTipRadius(10.0);
    pointer.setFont(new Font("SansSerif", Font.PLAIN, 9));
    pointer.setPaint(Color.blue);
    pointer.setTextAnchor(TextAnchor.HALF_ASCENT_RIGHT);
    plot.addAnnotation(pointer);

    return chart;

}

From source file:WeatherWizard.java

void setupText(String s1, String s2) {
    if (temperature <= 32) {
        textColor = Color.blue;/*  w ww.  java2  s . c  o m*/
        feels = "Freezing";
    } else if (temperature <= 50) {
        textColor = Color.green;
        feels = "Cold";
    } else if (temperature <= 65) {
        textColor = Color.yellow;
        feels = "Cool";
    } else if (temperature <= 75) {
        textColor = Color.orange;
        feels = "Warm";
    } else {
        textColor = Color.red;
        feels = "Hot";
    }
    condStr = s1;
    if (s2 != null) {
        condStr += "/" + s2;
    }
}

From source file:j2se.jfreechart.barchart.BarChartDemo3.java

/**
 * Creates a sample chart./*from  w  w w  .j a v  a 2s.  co m*/
 * 
 * @param dataset  the dataset.
 * 
 * @return a sample chart.
 */
private JFreeChart createChart(final CategoryDataset dataset) {

    final JFreeChart chart = ChartFactory.createBarChart("Bar Chart Demo 3", // chart title
            "Category", // domain axis label
            "Value", // range axis label
            dataset, // data
            PlotOrientation.VERTICAL, // the plot orientation
            false, // include legend
            true, false);

    chart.setBackgroundPaint(Color.lightGray);

    // get a reference to the plot for further customisation...
    final CategoryPlot plot = chart.getCategoryPlot();
    plot.setNoDataMessage("NO DATA!");

    final CategoryItemRenderer renderer = new CustomRenderer(new Paint[] { Color.red, Color.blue, Color.green,
            Color.yellow, Color.orange, Color.cyan, Color.magenta, Color.blue });
    //        renderer.setLabelGenerator(new StandardCategoryLabelGenerator());
    renderer.setItemLabelsVisible(true);
    final ItemLabelPosition p = new ItemLabelPosition(ItemLabelAnchor.CENTER, TextAnchor.CENTER,
            TextAnchor.CENTER, 45.0);
    renderer.setPositiveItemLabelPosition(p);
    plot.setRenderer(renderer);

    // change the margin at the top of the range axis...
    final ValueAxis rangeAxis = plot.getRangeAxis();
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    rangeAxis.setLowerMargin(0.15);
    rangeAxis.setUpperMargin(0.15);

    return chart;

}

From source file:hudson.plugins.testlink.TestLinkGraph.java

/**
 * Creates TestLink trend graph./*from w ww  . j a  v a2 s  . c om*/
 * 
 * @return the JFreeChart graph object.
 */
protected JFreeChart createGraph() {
    final JFreeChart chart = ChartFactory.createLineChart(null, null, yLabel, categoryDataset,
            PlotOrientation.VERTICAL, true, true, false);

    final LegendTitle legend = chart.getLegend();
    legend.setPosition(RectangleEdge.RIGHT);

    chart.setBackgroundPaint(Color.white);

    final CategoryPlot plot = (CategoryPlot) chart.getPlot();
    plot.setForegroundAlpha(0.8f);
    plot.setBackgroundPaint(Color.white);
    plot.setRangeGridlinePaint(Color.darkGray);

    final CategoryAxis domainAxis = new ShiftedCategoryAxis(xLabel);
    domainAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_45);
    domainAxis.setLowerMargin(0.0);
    domainAxis.setUpperMargin(0.0);
    domainAxis.setCategoryMargin(0.0);
    plot.setDomainAxis(domainAxis);

    final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    rangeAxis.setAutoRange(true);
    rangeAxis.setAutoRangeMinimumSize(5);
    rangeAxis.setLowerBound(0);

    final CategoryItemRenderer renderer = plot.getRenderer();

    renderer.setSeriesStroke(0, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.CAP_BUTT, 1.0f,
            new float[] { 1.0f, 1.0f }, 0.0f));
    renderer.setSeriesPaint(0, new Color(35, 20, 89));

    renderer.setSeriesStroke(1, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.CAP_BUTT, 1.0f,
            new float[] { 1.0f, 1.0f }, 0.0f));
    renderer.setSeriesPaint(1, new Color(0, 145, 0));

    renderer.setSeriesStroke(2, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.CAP_BUTT, 1.0f,
            new float[] { 1.0f, 1.0f }, 0.0f));
    renderer.setSeriesPaint(2, new Color(207, 69, 21));

    renderer.setSeriesStroke(3, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.CAP_BUTT, 1.0f,
            new float[] { 1.0f, 1.0f }, 0.0f));
    renderer.setSeriesPaint(3, Color.orange);

    plot.setInsets(new RectangleInsets(5.0, 0, 0, 5.0));

    return chart;
}

From source file:com.att.aro.ui.view.diagnostictab.plot.NetworkTypePlot.java

private void setRenderingColorForDataSeries(XYItemRenderer renderer,
        final XYIntervalSeriesCollection dataSeries) {
    renderer.setSeriesPaint(dataSeries.indexOf(NetworkType.none), Color.WHITE);
    renderer.setSeriesPaint(dataSeries.indexOf(NetworkType.LTE), Color.RED);
    renderer.setSeriesPaint(dataSeries.indexOf(NetworkType.WIFI), Color.BLUE);
    renderer.setSeriesPaint(dataSeries.indexOf(NetworkType.UMTS), Color.PINK);
    renderer.setSeriesPaint(dataSeries.indexOf(NetworkType.ETHERNET), Color.BLACK);
    renderer.setSeriesPaint(dataSeries.indexOf(NetworkType.HSDPA), Color.YELLOW);
    renderer.setSeriesPaint(dataSeries.indexOf(NetworkType.HSPA), Color.ORANGE);
    renderer.setSeriesPaint(dataSeries.indexOf(NetworkType.HSPAP), Color.MAGENTA);
    renderer.setSeriesPaint(dataSeries.indexOf(NetworkType.HSUPA), Color.CYAN);
    renderer.setSeriesPaint(dataSeries.indexOf(NetworkType.GPRS), Color.GRAY);
    renderer.setSeriesPaint(dataSeries.indexOf(NetworkType.EDGE), Color.LIGHT_GRAY);
}