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:com.floreantpos.swing.ShopTableButton.java

public void update() {
    if (shopTable != null && shopTable.isServing()) {
        //setEnabled(false);
        setBackground(Color.red);
        setForeground(Color.BLACK);
    } else if (shopTable != null && shopTable.isBooked()) {
        setEnabled(false);//ww w. j  a  v a2  s . co m
        setOpaque(true);
        setBackground(Color.orange);
        setForeground(Color.BLACK);
    } else {
        setEnabled(true);
        setBackground(Color.white);
        setForeground(Color.black);
    }
}

From source file:com.github.nbyl.xfdcontrol.plugins.notification.blink1.Blink1NotificationPlugin.java

@VisibleForTesting
Color mapStatusToColor(JobStatus.Status status) {
    switch (status) {
    case SUCCESS:
        return Color.green;
    case TESTS_FAILING:
        return Color.YELLOW;
    case FAILED://from   w  w w .  j a v  a2 s.  c om
        return Color.RED;
    }

    return Color.ORANGE;
}

From source file:image.writer.ImageWriterExample1.java

/**
 * Paints a few things on a Graphics2D instance.
 * @param g2d the Graphics2D instance/*from  w  ww  .  j ava  2 s. c  o  m*/
 * @param pageNum a page number
 */
protected void paintSome(Graphics2D g2d, int pageNum) {
    //Paint a bounding box
    g2d.drawRect(0, 0, 400, 200);

    //A few rectangles rotated and with different color
    Graphics2D copy = (Graphics2D) g2d.create();
    int c = 12;
    for (int i = 0; i < c; i++) {
        float f = ((i + 1) / (float) c);
        Color col = new Color(0.0f, 1 - f, 0.0f);
        copy.setColor(col);
        copy.fillRect(70, 90, 50, 50);
        copy.rotate(-2 * Math.PI / (double) c, 70, 90);
    }
    copy.dispose();

    //Some text
    copy = (Graphics2D) g2d.create();
    copy.rotate(-0.25);
    copy.setColor(Color.RED);
    copy.setFont(new Font("sans-serif", Font.PLAIN, 36));
    copy.drawString("Hello world!", 140, 140);
    copy.setColor(Color.RED.darker());
    copy.setFont(new Font("serif", Font.PLAIN, 36));
    copy.drawString("Hello world!", 140, 180);
    copy.dispose();

    //Try attributed text
    AttributedString aString = new AttributedString("This is attributed text.");
    aString.addAttribute(TextAttribute.FAMILY, "SansSerif");
    aString.addAttribute(TextAttribute.FAMILY, "Serif", 8, 18);
    aString.addAttribute(TextAttribute.FOREGROUND, Color.orange, 8, 18);
    g2d.drawString(aString.getIterator(), 250, 170);

    g2d.drawString("Page: " + pageNum, 250, 190);
}

From source file:test.uk.co.modularaudio.util.audio.gui.buffervis.BufferVisualiser.java

public void regenerateFromBuffers(final String labelOne, final float[] buffer, final int numSamples,
        final String labelTwo, final float[] bufferTwo) {
    biG2d.setColor(Color.BLACK);/*from www .  j  av a2  s . c om*/
    biG2d.fillRect(0, 0, GRAPH_WIDTH, GRAPH_HEIGHT);

    //      biG2d.setColor( Color.RED );
    //      biG2d.drawRect( 1, 1, GRAPH_WIDTH - 2, GRAPH_HEIGHT - 2 );

    computeMinMax(bufferTwo, numSamples);

    drawAxes(labelOne, Color.orange, labelTwo, Color.pink);

    plotCurve(Color.orange, buffer, numSamples);
    plotCurve(Color.pink, bufferTwo, numSamples);
}

From source file:net.bioclipse.chart.ScatterPlotRenderer.java

@Override
public Paint getItemPaint(int row, int column) {
    Iterator<Point> iter = markedPoints.iterator();
    while (iter.hasNext()) {
        Point p = iter.next();/*from   ww w . ja v a  2  s . c o m*/
        if (p != null && p.x == column && p.y == row) {
            return Color.orange;
        }
    }

    return super.getItemPaint(row, column);
}

From source file:de.berlios.statcvs.xml.chart.AbstractTimeSeriesChart.java

/**
 * @param filename/*www.ja  v  a2s  . c  o m*/
 * @param title
 */
public AbstractTimeSeriesChart(ReportSettings settings, String filename, String title, String rangeLabel) {
    super(settings, filename, title);

    tsc = new TimeSeriesCollection();

    setChart(ChartFactory.createTimeSeriesChart(settings.getProjectName(), I18n.tr("Date"), rangeLabel, tsc,
            true, true, false));

    //Paint[] colors = new Paint[1];
    //colors[0] = Color.blue;
    //getChart().getPlot().setSeriesPaint(colors);

    // setup axis
    XYPlot plot = getChart().getXYPlot();
    ValueAxis axis = plot.getDomainAxis();
    axis.setVerticalTickLabels(true);
    plot.setRenderer(new XYStepRenderer());

    // the 4th color is yellow which has almost no contrast to the white 
    // background color, therefore we use a different color
    plot.getRenderer().setSeriesPaint(0, Color.red);
    plot.getRenderer().setSeriesPaint(1, Color.blue);
    plot.getRenderer().setSeriesPaint(2, Color.green);
    plot.getRenderer().setSeriesPaint(3, Color.magenta);
    plot.getRenderer().setSeriesPaint(4, Color.orange);
    plot.getRenderer().setSeriesPaint(5, Color.cyan);
    plot.getRenderer().setSeriesPaint(6, Color.pink);
}

From source file:org.smart.migrate.ui.ImportThread.java

private void addStylesToDocument(StyledDocument doc) {
    //Initialize some styles.
    Style def = StyleContext.getDefaultStyleContext().getStyle(StyleContext.DEFAULT_STYLE);

    Style regular = doc.addStyle("regular", def);
    StyleConstants.setFontFamily(def, "SansSerif");

    Style s = doc.addStyle("italic", regular);
    StyleConstants.setItalic(s, true);

    s = doc.addStyle("bold", regular);
    StyleConstants.setBold(s, true);

    s = doc.addStyle("small", regular);
    StyleConstants.setFontSize(s, 10);

    s = doc.addStyle("large", regular);
    StyleConstants.setFontSize(s, 16);

    s = doc.addStyle("icon", regular);
    StyleConstants.setAlignment(s, StyleConstants.ALIGN_CENTER);

    s = doc.addStyle("info", regular);
    StyleConstants.setForeground(s, Color.blue);

    s = doc.addStyle("error", regular);
    StyleConstants.setForeground(s, Color.red);

    s = doc.addStyle("warning", regular);
    StyleConstants.setForeground(s, Color.orange);

    s = doc.addStyle("gray", regular);
    StyleConstants.setForeground(s, Color.gray);

    s = doc.addStyle("success", regular);
    StyleConstants.setForeground(s, Color.green);
}

From source file:org.drugis.addis.gui.wizard.TreatmentCategorizationOverviewWizardStep.java

public static VisualizationViewer<DecisionTreeNode, DecisionTreeEdge> buildDecisionTreeView(
        final DecisionTree tree) {
    // Crazy hack because sizes start at 600x600 by default.
    final Layout<DecisionTreeNode, DecisionTreeEdge> layout = new TreeLayout<DecisionTreeNode, DecisionTreeEdge>(
            new DecisionTree(new LeafNode()), 150, 75);
    layout.getSize().height = 1;// w  w w .  ja  v  a  2 s  .  co  m
    layout.getSize().width = 1;
    layout.setGraph(tree);

    final VisualizationViewer<DecisionTreeNode, DecisionTreeEdge> vv = new VisualizationViewer<DecisionTreeNode, DecisionTreeEdge>(
            layout);

    vv.setVertexToolTipTransformer(new ToStringLabeller<DecisionTreeNode>());
    vv.getRenderContext().setVertexFillPaintTransformer(new Transformer<DecisionTreeNode, Paint>() {
        public Paint transform(final DecisionTreeNode node) {
            return (node instanceof LeafNode) ? new Color(0.55f, 0.55f, 1.0f) : Color.ORANGE;
        }
    });

    vv.getRenderContext().setVertexShapeTransformer(new Transformer<DecisionTreeNode, Shape>() {
        public Shape transform(final DecisionTreeNode input) {
            final FontMetrics fontMetrics = vv.getGraphics().getFontMetrics();
            final double width = fontMetrics.stringWidth(input.toString()) + 6;
            final double height = fontMetrics.getHeight() + 2;
            final double arc = 5;
            return new RoundRectangle2D.Double(-width / 2, -height / 2, width, height, arc, arc);
        }
    });

    vv.getRenderer().getVertexLabelRenderer().setPosition(Position.CNTR);
    vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller<DecisionTreeNode>());

    vv.getRenderContext().setEdgeLabelTransformer(new ToStringLabeller<DecisionTreeEdge>());
    vv.getRenderContext().getEdgeLabelRenderer().setRotateEdgeLabels(false);
    vv.getRenderContext().setEdgeLabelClosenessTransformer(
            new ConstantDirectionalEdgeValueTransformer<DecisionTreeNode, DecisionTreeEdge>(0.5, 0.4));
    return vv;
}

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

private static Paint[] createPaint() {
    Paint apaint[] = new Paint[5];
    apaint[0] = new GradientPaint(0.0F, 0.0F, Color.white, 0.0F, 0.0F, Color.red);
    apaint[1] = new GradientPaint(0.0F, 0.0F, Color.white, 0.0F, 0.0F, Color.green);
    apaint[2] = new GradientPaint(0.0F, 0.0F, Color.white, 0.0F, 0.0F, Color.blue);
    apaint[3] = new GradientPaint(0.0F, 0.0F, Color.white, 0.0F, 0.0F, Color.orange);
    apaint[4] = new GradientPaint(0.0F, 0.0F, Color.white, 0.0F, 0.0F, Color.magenta);
    return apaint;
}

From source file:gov.nih.nci.cma.web.graphing.CMAPrincipalComponentAnalysisPlot.java

public CMAPrincipalComponentAnalysisPlot(Collection<CMAPCADataPoint> dataPoints, PCAcomponent component1,
        PCAcomponent component2, Map<String, String> sampleGroupNames) { //, ColorByType colorBy) {
    //this.colorBy = colorBy;
    this.component1 = component1;
    this.component2 = component2;
    this.dataPoints = dataPoints;
    this.nf.setMaximumFractionDigits(1);
    this.sampleGroupNames = sampleGroupNames;
    colorMap.put("1", Color.GREEN);
    colorMap.put("2", Color.BLUE);
    colorMap.put("3", Color.YELLOW);
    colorMap.put("4", Color.CYAN);
    colorMap.put("5", Color.MAGENTA);
    colorMap.put("6", Color.ORANGE);
    colorMap.put("7", Color.PINK);
    colorMap.put("8", Color.RED);
    colorMap.put("9", Color.GRAY);

    createChart();//from   w w w  .j  ava2 s.c o m

}