Example usage for java.awt Color LIGHT_GRAY

List of usage examples for java.awt Color LIGHT_GRAY

Introduction

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

Prototype

Color LIGHT_GRAY

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

Click Source Link

Document

The color light gray.

Usage

From source file:statistic.ca.gui.Charts.java

public static JFreeChart createBarChart(ChartData data) {
    if (data.getDiagramType().equals("bar")) {
        chart = ChartFactory.createBarChart(data.getTitle(), // Title
                data.getYAxisLabel(), // X-Axis label
                "", // Y-Axis label
                data.getCDataSet(), // CategoryDataset
                PlotOrientation.VERTICAL, false, true, false // Show legend
        );/*from   ww w. j  a v  a 2 s. c  o  m*/
        CategoryPlot plot = (CategoryPlot) chart.getPlot();
        plot.setBackgroundPaint(Color.LIGHT_GRAY);
        plot.setDomainGridlinePaint(Color.WHITE);
        plot.setRangeGridlinePaint(Color.WHITE);
        plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
    }

    if (data.getDiagramType().equals("pie")) {
        chart = ChartFactory.createPieChart(data.getTitle(), // Title
                data.getPieDataSet(), false, true, false);
    }

    chart.setBackgroundPaint(Color.WHITE);

    return chart;
}

From source file:Main.java

public Console() {
    JTextArea textArea = new JTextArea(24, 80);
    textArea.setBackground(Color.BLACK);
    textArea.setForeground(Color.LIGHT_GRAY);
    textArea.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 12));
    System.setOut(new PrintStream(new OutputStream() {
        @Override/*from  ww w .  j  a  v a2  s .co m*/
        public void write(int b) throws IOException {
            textArea.append(String.valueOf((char) b));
        }
    }));
    frame.add(textArea);
}

From source file:RedGreenBorder.java

public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
    Insets insets = getBorderInsets(c);
    Color horizontalColor;//from  w w  w  .  ja v  a2s.  com
    if (c.isEnabled()) {
        boolean pressed = false;
        if (c instanceof AbstractButton) {
            ButtonModel model = ((AbstractButton) c).getModel();
            pressed = model.isPressed();
        }
        if (pressed) {
            horizontalColor = Color.RED;
        } else {
            horizontalColor = Color.GREEN;
        }
    } else {
        horizontalColor = Color.LIGHT_GRAY;
    }
    g.setColor(horizontalColor);

    g.fillRect(0, 0, width, insets.top);
}

From source file:Main.java

public GradientLabel(String text) {
    super(text);

    start = Color.LIGHT_GRAY;
    end = getBackground();
}

From source file:jamel.gui.charts.money.Bankruptcies.java

/**
 * Returns the chart.//  w w w. j av  a2s  .  c  o  m
 * @return the chart.
 */
private static JFreeChart newChart() {
    TimeChart chart = new TimeChart("Bankruptcies", "Firms",
            Circuit.getCircuit().getTimeSeries().get(Labels.annualBankruptciesTotal));
    final XYBarRenderer renderer = new XYBarRenderer(0.10);
    renderer.setBarPainter(new StandardXYBarPainter());
    renderer.setShadowVisible(false);
    ((XYPlot) chart.getPlot()).setRenderer(0, renderer);
    chart.setIntegerTickUnitsOnRangeAxis();
    chart.setColors(0, Color.LIGHT_GRAY);
    chart.addLegendItem("Bankruptcies", Color.LIGHT_GRAY);
    return chart;
}

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:appInterface.AppToolBar.java

public AppToolBar() {
    setFloatable(false);/*from  w w w  .  j  av  a2  s  .  co  m*/
    setListFiles(_ressources);
    setBackground(Color.LIGHT_GRAY);
    setBorderPainted(false);

    randomButton.setFocusable(false);

    _moduleLabel.setText("Module :  ");
    randomButton.setText("Choisir une question alatoirement");

    add(_moduleLabel);
    add(moduleComboBox);

}

From source file:Main.java

public Component getListCellRendererComponent(JList jc, Object val, int idx, boolean isSelected,
        boolean cellHasFocus) {
    setText(val.toString());
    setForeground(table.get(idx));/*  w w w .ja  v  a2 s .  c om*/
    if (isSelected)
        setBackground(Color.LIGHT_GRAY);
    else
        setBackground(Color.WHITE);
    return this;
}

From source file:org.photovault.swingui.MultivalueColorConverter.java

@Override
public Object convertFromSubject(Object o) {
    Color ret = Color.WHITE;
    if (o instanceof Boolean) {
        Boolean b = (Boolean) o;
        if (b) {//from  w  ww .  ja va 2s.c om
            ret = Color.LIGHT_GRAY;
        }
    }
    return ret;
}

From source file:Similaridade.GraficosSimilaridade.java

public static JFreeChart criaGrafico2LinhasComDeslocada(CapturaAtual onda1, CapturaAtual onda2,
        int deslocamento, double correlacao, Paint cor1, Paint cor2) {
    String eixoy = new String("Current ");
    // verifica se  fase ou fuga
    if (onda1.getCodEvento().getCodEvento() == 1) { // evento 1  de fuga
        eixoy = eixoy.concat("(mA)");
    } else {//from w  ww.  j  a  v  a 2 s.c om
        eixoy = eixoy.concat("(A)");
    }
    XYDataset dataset = newDataset2OndasComDeslocada(onda1, onda2, deslocamento, correlacao);

    // create the chart...
    final JFreeChart chart = ChartFactory.createXYLineChart(null, // chart title
            "Time (ms)", // x axis label
            eixoy, // y axis label
            dataset, // data
            PlotOrientation.VERTICAL, true, // include legend
            false, // tooltips
            false // urls
    );

    chart.setBackgroundPaint(Color.white);

    // get a reference to the plot for further customisation...
    final XYPlot plot = chart.getXYPlot();

    // Definindo valores no eixo y
    double min = (double) DatasetUtilities.findMinimumRangeValue(dataset);
    double max = (double) DatasetUtilities.findMaximumRangeValue(dataset);

    plot.getRangeAxis().setRange(min - min * 0.005, //min
            max + min * 0.005);
    plot.setBackgroundPaint(Color.WHITE);
    plot.setDomainGridlinePaint(Color.LIGHT_GRAY);
    plot.setRangeGridlinePaint(Color.LIGHT_GRAY);

    final XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();

    renderer.setBaseStroke(new BasicStroke(1.0f));
    for (int i = 0; i < dataset.getSeriesCount(); i++) {
        renderer.setSeriesLinesVisible(i, true);
        renderer.setSeriesShapesVisible(i, false);
    }
    // Ajustar para todas as cores padro, pelo menos 10
    renderer.setSeriesPaint(0, cor1);
    renderer.setSeriesPaint(1, cor2);

    /* Cdigo para ter linhas tracejadas 
    renderer.setSeriesStroke(1, 
        new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.CAP_ROUND,
                        20.0f, new float[] {5.0f}, 0.0f) );
               
    renderer.setDrawSeriesLineAsPath(true); 
    /* Final do Codigo para tracejadas */

    plot.setRenderer(renderer);

    return chart;
}