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:net.sourceforge.processdash.ui.web.reports.DashboardChartDefaults.java

public static void initialize() {
    // install the legacy theme for chart colors
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    // turn off shadows on bar charts by default
    BarRenderer.setDefaultShadowsVisible(false);
    XYBarRenderer.setDefaultShadowsVisible(false);
    // the standard set of colors includes yellow, which is nearly
    // impossible to see on a white background. Replace those yellows with
    // variations on orange.
    DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE[3] = Color.orange;
    DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE[18] = new Color(215, 170, 0);
    DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE[31] = new Color(255, 200, 128);
}

From source file:Main.java

public Main() {
    UIManager.put("TabbedPane.contentBorderInsets", new InsetsUIResource(1, 0, 0, 0));
    UIManager.put("TabbedPane.contentAreaColor", new ColorUIResource(Color.GREEN));
    UIManager.put("TabbedPane.focus", new ColorUIResource(Color.ORANGE));
    UIManager.put("TabbedPane.selected", new ColorUIResource(Color.YELLOW));
    UIManager.put("TabbedPane.darkShadow", new ColorUIResource(Color.DARK_GRAY));
    UIManager.put("TabbedPane.borderHightlightColor", new ColorUIResource(Color.LIGHT_GRAY));
    UIManager.put("TabbedPane.light", new ColorUIResource(Color.WHITE));
    UIManager.put("TabbedPane.tabAreaBackground", new ColorUIResource(Color.CYAN));
    UIManager.put("ToolTip.background", Color.WHITE);
    UIManager.put("ToolTip.border", new BorderUIResource(new LineBorder(Color.BLACK)));
    this.updateUI();

    this.setBackground(Color.BLUE);

    JPanel testPanel = new JPanel();
    testPanel.setLayout(new BorderLayout());
    testPanel.add(new JLabel("Hello World"), BorderLayout.NORTH);
    testPanel.add(new JTextArea("Looks nice out there :)"), BorderLayout.CENTER);

    JPanel testPanel2 = new JPanel();
    testPanel2.setLayout(new BorderLayout());
    testPanel2.add(new JLabel("Good Bye World"), BorderLayout.NORTH);
    testPanel2.add(new JTextArea("OK"), BorderLayout.CENTER);

    this.addTab("Hello World", testPanel);
    this.addTab("World", testPanel2);
}

From source file:MainClass.java

public MainClass() {
    super();/*  w  w  w. j av a  2s.c  o  m*/
    setSize(300, 200);

    textPane.setFont(new Font("Serif", Font.PLAIN, 24));

    // create some handy attribute sets
    SimpleAttributeSet red = new SimpleAttributeSet();
    StyleConstants.setForeground(red, Color.red);
    StyleConstants.setBold(red, true);
    SimpleAttributeSet blue = new SimpleAttributeSet();
    StyleConstants.setForeground(blue, Color.blue);
    SimpleAttributeSet italic = new SimpleAttributeSet();
    StyleConstants.setItalic(italic, true);
    StyleConstants.setForeground(italic, Color.orange);

    // add the text
    append("NULL ", null);
    append("Blue", blue);
    append("italic", italic);
    append("red", red);

    Container content = getContentPane();
    content.add(new JScrollPane(textPane), BorderLayout.CENTER);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}

From source file:UserInterface.FarmerRole.ThermometerDemo.java

public ThermometerDemo(double value, String type) {
    this.setLayout(new GridLayout());
    DefaultValueDataset dataset = new DefaultValueDataset(value);
    if (type.equals("high")) {
        ThermometerPlot plot = new ThermometerPlot(dataset);
        plot.setSubrangePaint(0, Color.green.darker());
        plot.setSubrangePaint(1, Color.ORANGE);
        plot.setSubrangePaint(2, Color.RED.darker());

        plot.setSubrangeInfo(0, 10, 28, 30, 60);

        JFreeChart chart = new JFreeChart("Cold Storage", JFreeChart.DEFAULT_TITLE_FONT, plot, true);
        this.add(new ChartPanel(chart, W, H, W, H, W, H, false, true, true, true, true, true));
    } else if (type.equals("medium")) {
        ThermometerPlot plot = new ThermometerPlot(dataset);
        plot.setSubrangePaint(0, Color.green.darker());
        plot.setSubrangePaint(1, Color.ORANGE);
        plot.setSubrangePaint(2, Color.RED.darker());

        plot.setSubrangeInfo(0, 12, 14, 30, 60);

        JFreeChart chart = new JFreeChart("Medium Storage", JFreeChart.DEFAULT_TITLE_FONT, plot, true);
        this.add(new ChartPanel(chart, W, H, W, H, W, H, false, true, true, true, true, true));
    } else {//from  w w  w  . j  ava  2 s. c o m
        ThermometerPlot plot = new ThermometerPlot(dataset);
        plot.setSubrangePaint(0, Color.green.darker());
        plot.setSubrangePaint(1, Color.YELLOW);
        plot.setSubrangePaint(2, Color.RED.darker());

        plot.setSubrangeInfo(0, 20, 35, 46, 60);

        JFreeChart chart = new JFreeChart("Warm Storage", JFreeChart.DEFAULT_TITLE_FONT, plot, true);
        this.add(new ChartPanel(chart, W, H, W, H, W, H, false, true, true, true, true, true));
    }
}

From source file:nz.co.gregs.dbvolution.internal.querygraph.QueryGraphVertexFillPaintTransformer.java

/**
 *
 * @param i//www.java  2s. com
 * @return the Paint used to draw nodes/vertexes
 */
@Override
public Paint transform(QueryGraphNode i) {
    if (i.isRequiredNode()) {
        return Color.RED;
    } else {
        return Color.ORANGE;
    }
}

From source file:AppPackage.humidity.java

public humidity() {
    try {//from  ww  w.  ja  v  a 2  s.c  o  m

        JFrame window = new JFrame();
        window.setSize(1000, 615);
        window.setBackground(Color.blue.darker());
        double value = 45;
        Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
        int x = (int) ((dimension.getWidth() - window.getWidth()) / 2);
        int y = (int) ((dimension.getHeight() - window.getHeight()) / 2);
        window.setLocation(x, y);
        DefaultValueDataset dataset = new DefaultValueDataset(value);

        ThermometerPlot thermometerplot = new ThermometerPlot(dataset);

        thermometerplot.setSubrangePaint(0, Color.green.darker());
        thermometerplot.setSubrangePaint(1, Color.orange);
        thermometerplot.setSubrangePaint(2, Color.red);
        JFreeChart jfreechart = new JFreeChart("Humidity readings", JFreeChart.DEFAULT_TITLE_FONT,
                thermometerplot, true);
        thermometerplot.setInsets(new RectangleInsets(5D, 5D, 5D, 5D));
        thermometerplot.setPadding(new RectangleInsets(10D, 10D, 10D, 10D));
        thermometerplot.setThermometerStroke(new BasicStroke(2.0F));
        thermometerplot.setThermometerPaint(Color.BLUE);
        thermometerplot.setUnits(0);
        thermometerplot.setGap(3);

        window.add(new ChartPanel(jfreechart), BorderLayout.CENTER);
        window.setVisible(true);

    } catch (Exception e) {
        System.out.print("Chart exception:" + e);
    }
    initComponents();
}

From source file:AppPackage.Temperature.java

public Temperature() {
    try {/*w  ww  . j  a v  a2  s.  co  m*/

        JFrame window = new JFrame();
        window.setSize(1000, 615);
        window.setBackground(Color.blue.darker());
        double value = 55;
        Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
        int x = (int) ((dimension.getWidth() - window.getWidth()) / 2);
        int y = (int) ((dimension.getHeight() - window.getHeight()) / 2);
        window.setLocation(x, y);
        DefaultValueDataset dataset = new DefaultValueDataset(value);

        ThermometerPlot thermometerplot = new ThermometerPlot(dataset);
        thermometerplot.setSubrangePaint(0, Color.green.darker());
        thermometerplot.setSubrangePaint(1, Color.orange);
        thermometerplot.setSubrangePaint(2, Color.red);
        JFreeChart jfreechart = new JFreeChart("Temperature readings", JFreeChart.DEFAULT_TITLE_FONT,
                thermometerplot, true);
        thermometerplot.setInsets(new RectangleInsets(5D, 5D, 5D, 5D));
        thermometerplot.setPadding(new RectangleInsets(10D, 10D, 10D, 10D));
        thermometerplot.setThermometerStroke(new BasicStroke(2.0F));
        thermometerplot.setThermometerPaint(Color.BLUE);

        thermometerplot.setGap(3);

        window.add(new ChartPanel(jfreechart), BorderLayout.CENTER);
        window.setVisible(true);

    } catch (Exception e) {
        System.out.print("Chart exception:" + e);
    }
    initComponents();
}

From source file:grafos.JUNGraph.java

/**
 * Cria visualizao grfica do grafo/*from  ww  w .j  av a 2 s  .co m*/
 * @param grafo 
 * @return  
 */
//public static void createGraphVisualization(List<Grafo> grafo, List<Vertex> path, String origem, String destino){
public static BasicVisualizationServer<Integer, String> createGraphVisualization(List<Grafo> grafo) {

    JUNGraph sgv = new JUNGraph(grafo);

    Layout<Integer, String> layout = new CircleLayout(sgv.g);
    layout.setSize(new Dimension(500, 500));
    BasicVisualizationServer<Integer, String> vv = new BasicVisualizationServer<>(layout);
    vv.setPreferredSize(new Dimension(500, 500));

    Transformer<Integer, Paint> vertexPaint = new Transformer<Integer, Paint>() {
        @Override
        public Paint transform(Integer i) {
            return Color.ORANGE;
        }
    };

    float dash[] = { 5.0f };
    final Stroke edgeStroke = new BasicStroke(1.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 5.0f, dash,
            0.0f);
    Transformer<String, Stroke> edgeStrokeTransformer = new Transformer<String, Stroke>() {
        @Override
        public Stroke transform(String s) {
            return edgeStroke;
        }
    };

    vv.getRenderContext().setVertexFillPaintTransformer(vertexPaint);
    vv.getRenderContext().setEdgeStrokeTransformer(edgeStrokeTransformer);
    vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller());
    vv.getRenderContext().setEdgeLabelTransformer(new ToStringLabeller());

    vv.getRenderer().getVertexLabelRenderer().setPosition(Renderer.VertexLabel.Position.CNTR);

    return vv;

}

From source file:org.apache.xmlgraphics.ps.ImageEncodingHelperTestCase.java

private BufferedImage prepareImage(final BufferedImage image) {
    final Graphics2D ig = image.createGraphics();
    ig.scale(.5, .5);//from   w  w w  . j  av  a  2s . c o m
    ig.setPaint(new Color(128, 0, 0));
    ig.fillRect(0, 0, 100, 50);
    ig.setPaint(Color.orange);
    ig.fillRect(100, 0, 100, 50);
    ig.setPaint(Color.yellow);
    ig.fillRect(0, 50, 100, 50);
    ig.setPaint(Color.red);
    ig.fillRect(100, 50, 100, 50);
    ig.setPaint(new Color(255, 127, 127));
    ig.fillRect(0, 100, 100, 50);
    ig.setPaint(Color.black);
    ig.draw(new Rectangle2D.Double(0.5, 0.5, 199, 149));
    ig.dispose();
    return image;
}

From source file:BarChartCustomizer.java

public void customize(JFreeChart chart, JRChart jasperChart) {
    BarRenderer renderer = (BarRenderer) chart.getCategoryPlot().getRenderer();
    renderer.setSeriesPaint(0, Color.green);
    renderer.setSeriesPaint(1, Color.orange);
}