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:UserInterface.AdministrativeRole.RequestAnalysis.java

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
    // TODO add your handling code here:
    Organization organization = null;/*from  w  w  w  .j  a  v a 2  s  .c  o  m*/
    //System.out.println(enterprise.getOrganizationDirectory().getOrganizationList().size());
    for (Organization org : enterprise.getOrganizationDirectory().getOrganizationList()) {
        if (org instanceof ProcurementOrganization) {
            organization = org;
            //System.out.println(organization);
            break;
        }
    }
    DefaultCategoryDataset dataset = new DefaultCategoryDataset();
    if (organization != null) {
        for (WorkRequest request : organization.getWorkQueue().getWorkRequestList()) {
            if (request.getStatus().equalsIgnoreCase("Serviced")) {
                //System.out.println(organization.getName());
                long i = request.getResolveDate().getTime() - request.getRequestDate().getTime();
                System.out.println(i);
                float j = i / (100 * 24);
                dataset.setValue(j, request.getSensorStatusOld(),
                        "Request Id: " + request.getWorkRequestId() + "time " + j);
            }

            //dataset.setValue(i,"test",i);
        }
        JFreeChart chart = ChartFactory.createBarChart("All Request", "Time(Seconds)", "Value", dataset,
                PlotOrientation.VERTICAL.VERTICAL, true, true, false);
        //JFreeChart chart = ChartFactory.createPieChart("Sample Pie Chart"+vitalsign.getTimeStamp(),dataset,true,true,false );
        ChartPanel chartPanel = new ChartPanel(chart, false);
        chartPanel.setPreferredSize(new Dimension(500, 270));
        CategoryPlot plot = (CategoryPlot) chart.getPlot();
        ChartFrame cFrame = new ChartFrame("Name", chart);
        BarRenderer renderer = (BarRenderer) plot.getRenderer();
        renderer.setSeriesPaint(0, Color.orange);
        cFrame.pack();
        cFrame.setVisible(true);
    } else {
        JOptionPane.showMessageDialog(null, "No Request Present");
    }

}

From source file:org.cytoscape.graph.render.immed.GraphGraphicsTest.java

private long drawOldFull(Random rand) {
    final float nodeSizeFactor = 50f;
    float size = (float) canvasSize;

    long begin = System.nanoTime();
    for (int i = 0; i < numNodes; i++) {
        float x = rand.nextFloat() * (rand.nextBoolean() ? size : -size);
        float y = rand.nextFloat() * (rand.nextBoolean() ? size : -size);
        oldGraphGraphics.drawNodeFull((byte) (i % (int) OldGraphGraphics.s_last_shape), x, y,
                (x + (rand.nextFloat() * nodeSizeFactor)), (y + (rand.nextFloat() * nodeSizeFactor)),
                Color.blue, 1.0f + (i % 10), Color.yellow);
    }//from ww w.j av a 2 s  .c o  m
    long end = System.nanoTime();
    long nodeDur = end - begin;

    BasicStroke edgeStroke = new BasicStroke(1f);

    begin = System.nanoTime();
    for (int i = 0; i < numEdges; i++) {
        oldGraphGraphics.drawEdgeFull((byte) ((i % 7) - 8), rand.nextFloat() * (20f), Color.red,
                (byte) ((i % 7) - 8), rand.nextFloat() * (20f), Color.orange,
                rand.nextFloat() * (rand.nextBoolean() ? size : -size),
                rand.nextFloat() * (rand.nextBoolean() ? size : -size), oldGraphGraphics.m_noAnchors,
                rand.nextFloat() * (rand.nextBoolean() ? size : -size),
                rand.nextFloat() * (rand.nextBoolean() ? size : -size), 1f, Color.green, 0f);
    }
    end = System.nanoTime();

    long duration = (end - begin) + nodeDur;
    return duration;
}

From source file:org.wmediumd.WmediumdGraphView.java

private void setupVisualization() {
    // Create a Layout to display our graph data
    Layout<MyNode, MyLink> layout = new FRLayout<MyNode, MyLink>(graph);
    layout.setSize(new Dimension(640, 480)); // Sets the initial size of the space

    Transformer<MyNode, Paint> vertexPaint = new Transformer<MyNode, Paint>() {

        @Override//from   w w  w .  java  2s.c  o m
        public Paint transform(MyNode arg0) {
            // TODO Auto-generated method stub
            return Color.ORANGE;
        }
    };
    // Transformer to draw links with dark blue color
    //      Transformer<MyLink,Paint> edgePaint = new Transformer<MyLink, Paint>() {
    //
    //         @Override
    //         public Paint transform(MyLink arg0) {
    //            // TODO Auto-generated method stub
    //            return new Color(68, 68, 68);
    //         }
    //      };

    // Set up a new stroke Transformer for the edges
    Transformer<MyLink, Stroke> edgeStrokeTransformer = new Transformer<MyLink, Stroke>() {

        @Override
        public Stroke transform(MyLink s) {

            float plossSum = s.getPlossSumFloat();

            if (plossSum > 0.0f) {
                // For each Link estimate the quality and create a custom stroke
                float dash[] = { 12.5f - s.getPlossSumFloat(), s.getPlossSumFloat() };
                return new BasicStroke(1.5f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1.0f, dash, 0.0f);
            } else {
                return new BasicStroke(1.5f);
            }
        }
    };

    // Create a Visualization viewer to draw our Layout
    vViewer = new VisualizationViewer<MyNode, MyLink>(layout);
    vViewer.setPreferredSize(new Dimension(640, 480)); //Sets the viewing area size
    vViewer.getRenderContext().setVertexFillPaintTransformer(vertexPaint);
    //vViewer.getRenderContext().setEdgeDrawPaintTransformer(edgePaint);
    vViewer.getRenderContext().setEdgeStrokeTransformer(edgeStrokeTransformer);
    vViewer.getRenderContext().setVertexLabelTransformer(new ToStringLabeller<MyNode>());
    vViewer.getRenderer().getVertexLabelRenderer().setPosition(Position.CNTR);

}

From source file:pt.lsts.neptus.console.plugins.ImageLayers.java

@Override
public void paint(Graphics2D g, StateRenderer2D renderer) {
    g.setColor(Color.orange);
    g.drawString(note, 50, 20);//from  w w  w . j  a  va2  s.  c  o m
    for (ImageLayer il : layers)
        il.paint((Graphics2D) g.create(), renderer);
}

From source file:no.uio.medicine.virsurveillance.charts.StackedChart_AWT.java

private Color getColor(int index) {
    int index2 = index + this.colorOffset;
    switch (index2) {
    case 0://w w  w.  j a va2 s  . co  m
        return Color.RED;
    case 1:
        return Color.BLUE;
    case 2:
        return Color.GREEN;
    case 3:
        return Color.YELLOW;
    case 4:
        return Color.DARK_GRAY;
    case 5:
        return Color.ORANGE;
    case 6:
        return Color.BLACK;
    case 7:
        return Color.CYAN;
    case 8:
        return Color.GRAY;
    case 9:
        return Color.LIGHT_GRAY;
    case 10:
        return Color.MAGENTA;
    case 11:
        return Color.PINK;
    case 12:
        return Color.WHITE;
    default:
        return getColor((int) Math.floor(Math.random() * 14));
    }

}

From source file:uk.ac.ncl.aries.entanglement.cli.export.MongoGraphToGDF.java

private static Map<String, Color> loadColorMappings(File propFile) throws IOException {
    FileInputStream is = new FileInputStream(propFile);
    Properties props = new Properties();
    props.load(is);//from  ww w . j  av a  2 s  .c  o  m
    is.close();

    Map<String, Color> nodeTypeToColour = new HashMap<>();
    for (String nodeType : props.stringPropertyNames()) {
        String colorString = props.getProperty(nodeType);
        Color color;

        switch (colorString) {
        case "BLACK":
            color = Color.BLACK;
            break;
        case "BLUE":
            color = Color.BLUE;
            break;
        case "CYAN":
            color = Color.CYAN;
            break;
        case "DARK_GRAY":
            color = Color.DARK_GRAY;
            break;
        case "GRAY":
            color = Color.GRAY;
            break;
        case "GREEN":
            color = Color.GREEN;
            break;
        case "LIGHT_GRAY":
            color = Color.LIGHT_GRAY;
            break;
        case "MAGENTA":
            color = Color.MAGENTA;
            break;
        case "ORANGE":
            color = Color.ORANGE;
            break;
        case "PINK":
            color = Color.PINK;
            break;
        case "RED":
            color = Color.RED;
            break;
        case "WHITE":
            color = Color.WHITE;
            break;
        case "YELLOW":
            color = Color.YELLOW;
            break;
        default:
            color = DEFAULT_COLOR;
        }

        nodeTypeToColour.put(nodeType, color);
    }
    return nodeTypeToColour;
}

From source file:org.pentaho.reporting.engine.classic.demo.ancient.demo.layouts.BandInBandStackingDemoHandler.java

/**
 * Create a report with a single report header band. This band contains several sub bands.
 *
 * @return the created report./*  w w w .ja  v  a2  s.c o m*/
 */
public MasterReport createReport() {
    final Band levelA1 = createBand("A1", Color.magenta, 0, 0, 100, 100);
    levelA1.addElement(createBand("A1-B1", Color.blue, 0, 50, 50, 50));
    levelA1.addElement(createBand("A1-B2", Color.yellow, 50, 0, 150, 50));
    // x=55%, y=5%, width=40%, height=100%
    final Band levelA2 = createBand("A2", Color.green, -50, 0, -50, -100);
    // x=5%, y=55%, width=40%, height=40%
    levelA2.addElement(createBand("A2-B1", Color.red, 0, -50, -50, -50));
    // x=55%, y=5%, width=40%, height=40%
    levelA2.addElement(createBand("A2-B2", Color.darkGray, -55, -5, -40, -40));

    final ReportHeader header = new ReportHeader();
    header.setName("Report-Header");
    header.getStyle().setStyleProperty(ElementStyleKeys.MIN_WIDTH, new Float(-100));
    header.getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(100));
    header.getStyle().setStyleProperty(ElementStyleKeys.MAX_WIDTH, new Float(Short.MAX_VALUE));
    header.getStyle().setStyleProperty(ElementStyleKeys.MAX_HEIGHT, new Float(100));

    header.getStyle().setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, Color.ORANGE);

    header.addElement(levelA1);
    header.addElement(levelA2);

    final ContentFieldElementFactory cfef = new ContentFieldElementFactory();
    cfef.setFieldname("CreateComponent");
    cfef.setMinimumSize(new FloatDimension(400, 400));
    cfef.setAbsolutePosition(new Point2D.Float(0, 0));

    final ReportFooter footer = new ReportFooter();
    footer.addElement(cfef.createElement());

    final MasterReport report = new MasterReport();
    report.setReportHeader(header);
    report.setReportFooter(footer);
    report.setName("Band in Band stacking");

    report.addExpression(new ComplexComponentExpression("CreateComponent"));
    return report;
}

From source file:TextBouncer.java

protected void setPaint(Graphics2D g2) {
    if (mGradient) {
        GradientPaint gp = new GradientPaint(0, 0, Color.blue, 50, 25, Color.green, true);
        g2.setPaint(gp);//from   w  w w  .j  av  a  2s  . c  om
    } else
        g2.setPaint(Color.orange);
}

From source file:com.seagate.kinetic.monitor.view.KineticSpecifiedNodeView.java

private void createStatChart() {
    TimeSeriesCollection putOpsTsc = new TimeSeriesCollection(putOpsTs);
    TimeSeriesCollection putTrgTsc = new TimeSeriesCollection(putTrgTs);
    TimeSeriesCollection getOpsTsc = new TimeSeriesCollection(getOpsTs);
    TimeSeriesCollection getTrgTsc = new TimeSeriesCollection(getTrgTs);
    TimeSeriesCollection deleteOpsTsc = new TimeSeriesCollection(deleteOpsTs);
    TimeSeriesCollection deleteTrgTsc = new TimeSeriesCollection(deleteTrgTs);

    statChart = ChartFactory.createTimeSeriesChart("", "Time", "put kvop/s", putOpsTsc, true, true, false);
    XYPlot xyplot = (XYPlot) statChart.getPlot();
    xyplot.setOrientation(PlotOrientation.VERTICAL);
    xyplot.setDomainPannable(true);/*from  ww  w.  j av a  2 s.c  o m*/
    xyplot.setRangePannable(true);

    ValueAxis yAxis = xyplot.getDomainAxis();
    yAxis.setAutoRange(true);
    yAxis.setFixedAutoRange(60000.0);

    NumberAxis numberaxis1 = new NumberAxis("get kvop/s");
    xyplot.setRangeAxis(1, numberaxis1);
    xyplot.setDataset(1, getOpsTsc);
    xyplot.mapDatasetToRangeAxis(1, 1);
    StandardXYItemRenderer standardxyitemrenderer1 = new StandardXYItemRenderer();
    xyplot.setRenderer(1, standardxyitemrenderer1);

    NumberAxis numberaxis2 = new NumberAxis("delete kvop/s");
    numberaxis2.setAutoRangeIncludesZero(false);
    xyplot.setRangeAxis(2, numberaxis2);
    xyplot.setRangeAxisLocation(1, AxisLocation.BOTTOM_OR_LEFT);
    xyplot.setDataset(2, deleteOpsTsc);
    xyplot.mapDatasetToRangeAxis(2, 2);
    StandardXYItemRenderer standardxyitemrenderer2 = new StandardXYItemRenderer();
    xyplot.setRenderer(2, standardxyitemrenderer2);

    NumberAxis numberaxis3 = new NumberAxis("put MB/s");
    xyplot.setRangeAxis(3, numberaxis3);
    xyplot.setDataset(3, putTrgTsc);
    xyplot.mapDatasetToRangeAxis(3, 3);
    StandardXYItemRenderer standardxyitemrenderer3 = new StandardXYItemRenderer();
    xyplot.setRenderer(3, standardxyitemrenderer3);

    NumberAxis numberaxis4 = new NumberAxis("get MB/s");
    numberaxis4.setAutoRangeIncludesZero(false);
    xyplot.setRangeAxis(4, numberaxis4);
    xyplot.setRangeAxisLocation(2, AxisLocation.BOTTOM_OR_LEFT);
    xyplot.setDataset(4, getTrgTsc);
    xyplot.mapDatasetToRangeAxis(4, 4);
    StandardXYItemRenderer standardxyitemrenderer4 = new StandardXYItemRenderer();
    xyplot.setRenderer(4, standardxyitemrenderer4);

    NumberAxis numberaxis5 = new NumberAxis("delete MB/s");
    xyplot.setRangeAxis(5, numberaxis5);
    xyplot.setDataset(5, deleteTrgTsc);
    xyplot.mapDatasetToRangeAxis(5, 5);
    StandardXYItemRenderer standardxyitemrenderer5 = new StandardXYItemRenderer();
    xyplot.setRenderer(5, standardxyitemrenderer5);

    ChartUtilities.applyCurrentTheme(statChart);
    xyplot.getRenderer().setSeriesPaint(0, Color.black);
    standardxyitemrenderer1.setSeriesPaint(0, Color.red);
    numberaxis1.setLabelPaint(Color.red);
    numberaxis1.setTickLabelPaint(Color.red);
    standardxyitemrenderer2.setSeriesPaint(0, Color.green);
    numberaxis2.setLabelPaint(Color.green);
    numberaxis2.setTickLabelPaint(Color.green);
    standardxyitemrenderer3.setSeriesPaint(0, Color.orange);
    numberaxis3.setLabelPaint(Color.orange);
    numberaxis3.setTickLabelPaint(Color.orange);
    standardxyitemrenderer4.setSeriesPaint(0, Color.blue);
    numberaxis4.setLabelPaint(Color.blue);
    numberaxis4.setTickLabelPaint(Color.blue);
    standardxyitemrenderer5.setSeriesPaint(0, Color.cyan);
    numberaxis5.setLabelPaint(Color.cyan);
    numberaxis5.setTickLabelPaint(Color.cyan);

    final JPanel main = new JPanel(new BorderLayout());
    final JPanel optionsPanel = new JPanel();

    String[] options = { SYSTEM_TOTAL_IOPS_AND_THROUGHPUT_STATISTICS };
    this.orientationComboBox = new JComboBox<String>(options);
    this.orientationComboBox.setSize(600, 50);
    this.orientationComboBox.addActionListener(this);
    optionsPanel.add(this.orientationComboBox);

    chartPanel = new ChartPanel(statChart);
    chartPanel.setMouseWheelEnabled(false);
    chartPanel.setPreferredSize(new Dimension(900, 450));
    chartPanel.setDomainZoomable(true);
    chartPanel.setRangeZoomable(true);

    main.add(optionsPanel, BorderLayout.NORTH);
    main.add(this.chartPanel);
    setContentPane(main);
}

From source file:org.ow2.clif.jenkins.chart.MovingStatChart.java

private XYLineAndShapeRenderer getGlobalRenderer() {
    final XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
    renderer.setSeriesShapesVisible(0, false);
    renderer.setSeriesPaint(0, Color.BLUE);
    renderer.setSeriesStroke(0, new BasicStroke(1));
    renderer.setSeriesShapesVisible(1, false);
    renderer.setSeriesPaint(1, Color.RED);
    renderer.setSeriesStroke(1, new BasicStroke(1));
    renderer.setSeriesShapesVisible(2, false);
    renderer.setSeriesPaint(2, Color.GREEN);
    renderer.setSeriesStroke(2, new BasicStroke(1));
    renderer.setSeriesShapesVisible(3, false);
    renderer.setSeriesPaint(3, Color.YELLOW);
    renderer.setSeriesStroke(3, new BasicStroke(1));
    renderer.setSeriesShapesVisible(4, false);
    renderer.setSeriesPaint(4, Color.ORANGE);
    renderer.setSeriesStroke(4, new BasicStroke(1));
    return renderer;
}