Example usage for java.awt Color blue

List of usage examples for java.awt Color blue

Introduction

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

Prototype

Color blue

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

Click Source Link

Document

The color blue.

Usage

From source file:net.sf.dynamicreports.test.jasper.chart.XyAreaChartTest.java

@Override
protected void configureReport(JasperReportBuilder rb) {
    TextColumnBuilder<Integer> column1;
    TextColumnBuilder<Integer> column2;

    Locale.setDefault(Locale.ENGLISH);

    rb.columns(column1 = col.column("Column1", "field1", Integer.class),
            column2 = col.column("Column2", "field2", Integer.class))
            .summary(cht.xyAreaChart().setXValue(column1).series(cht.xySerie(column2))
                    .setXAxisFormat(cht.axisFormat().setLabel("category").setLabelColor(Color.BLUE)
                            .setLabelFont(stl.fontArialBold()).setTickLabelFont(stl.fontArial().setItalic(true))
                            .setTickLabelColor(Color.CYAN).setLineColor(Color.LIGHT_GRAY)),
                    cht.xyAreaChart().setXValue(column1).series(cht.xySerie(column2))
                            .setYAxisFormat(cht.axisFormat().setLabel("value").setLabelColor(Color.BLUE)
                                    .setLabelFont(stl.fontArialBold())
                                    .setTickLabelFont(stl.fontArial().setItalic(true))
                                    .setTickLabelColor(Color.CYAN).setTickLabelMask("#,##0.00")
                                    .setLineColor(Color.LIGHT_GRAY).setRangeMinValueExpression(1)
                                    .setRangeMaxValueExpression(15)));
}

From source file:au.edu.jcu.usb.USBPlotFrame.java

/**
 * Constructs the ChartPanel from the provided XYSeriesCollection
 *
 * @param xySeriesCollection//from  w  w  w .  j  a  v  a 2s  . com
 * @return The constructed ChartPanel containing the XY scatter plot
 */
private ChartPanel constructChart(XYSeriesCollection xySeriesCollection) {
    // Construct the scatter plot from the provided xySeriesCollection
    JFreeChart chart = ChartFactory.createScatterPlot("Title", "X Axis", "Y Axis", xySeriesCollection);

    // Get the XY Plot from the scatter chart
    XYPlot xyPlot = (XYPlot) chart.getPlot();
    xyPlot.setDomainCrosshairVisible(true);
    xyPlot.setRangeCrosshairVisible(true);

    // Create the renderer
    XYItemRenderer renderer = xyPlot.getRenderer();
    renderer.setSeriesPaint(0, Color.blue);

    NumberAxis domain = (NumberAxis) xyPlot.getDomainAxis();

    domain.setVerticalTickLabels(true);

    ChartPanel chartPanel = new ChartPanel(chart);
    return chartPanel;
}

From source file:ColorChooserMenu.java

public ColorMenu(String name) {
    super(name);/*ww w .j a va2 s .  co m*/
    unselectedBorder = new CompoundBorder(new MatteBorder(1, 1, 1, 1, getBackground()),
            new BevelBorder(BevelBorder.LOWERED, Color.white, Color.gray));
    selectedBorder = new CompoundBorder(new MatteBorder(1, 1, 1, 1, Color.red),
            new MatteBorder(1, 1, 1, 1, getBackground()));
    activeBorder = new CompoundBorder(new MatteBorder(1, 1, 1, 1, Color.blue),
            new MatteBorder(1, 1, 1, 1, getBackground()));

    JPanel p = new JPanel();
    p.setBorder(new EmptyBorder(5, 5, 5, 5));
    p.setLayout(new GridLayout(8, 8));
    paneTable = new Hashtable();

    int[] values = new int[] { 0, 128, 192, 255 };

    for (int r = 0; r < values.length; r++) {
        for (int g = 0; g < values.length; g++) {
            for (int b = 0; b < values.length; b++) {
                Color c = new Color(values[r], values[g], values[b]);
                ColorPane pn = new ColorPane(c);
                p.add(pn);
                paneTable.put(c, pn);
            }
        }
    }
    add(p);
}

From source file:com.uimirror.image.form.UimImageFormParam.java

public Color getBg() {
    try {//from w w w.j  a v a  2s  .  c  om
        Color cl = StringUtils.hasText(bg) ? Color.decode(bg) : Color.BLUE;
        return cl;
    } catch (Exception e) {
        return Color.BLUE;
    }
}

From source file:mls.FramePlot.java

private JFreeChart createChartMedia(final XYDataset dataset) {
    final JFreeChart result = ChartFactory.createXYLineChart("Media campionaria", "n", "en", dataset,
            PlotOrientation.VERTICAL, false, true, false);
    plotMedia = result.getXYPlot();/*from  ww w  .  jav  a  2s.co  m*/
    ValueAxis axis = plotMedia.getDomainAxis();
    axis.setAutoRange(true);
    axis.setFixedAutoRange(1500);

    axis = plotMedia.getRangeAxis();
    axis.setAutoRange(true);
    axis.setRange(75, 160);
    plotMedia.getRenderer().setSeriesPaint(0, Color.BLUE);
    return result;
}

From source file:org.jfree.graphics2d.demo.ImageTest.java

private static void drawRadialGradientPaintTest(Graphics2D g2) {
    RadialGradientPaint rgp = new RadialGradientPaint(50, 50, 40, 30, 30, new float[] { 0f, 0.75f, 1f },
            new Color[] { Color.RED, Color.GREEN, Color.BLUE }, MultipleGradientPaint.CycleMethod.NO_CYCLE);

    g2.setPaint(rgp);//from   w w  w  .j  av a  2  s.  com
    Ellipse2D circle = new Ellipse2D.Double(10, 10, 80, 80);
    g2.fill(circle);
}

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

@Override
public void populate(XYPlot plot, AROTraceData analysis) {
    if (analysis != null) {
        userInputData.removeAllSeries();
        // create the dataset...
        Map<UserEvent.UserEventType, XYIntervalSeries> seriesMap = new EnumMap<UserEvent.UserEventType, XYIntervalSeries>(
                UserEvent.UserEventType.class);
        for (UserEvent.UserEventType eventType : UserEvent.UserEventType.values()) {
            XYIntervalSeries series = new XYIntervalSeries(eventType);
            seriesMap.put(eventType, series);
            userInputData.addSeries(series);
        }/* w  w w . j  a  v  a 2 s .  c om*/
        // Populate the data set
        //need to add something here
        for (UserEvent event : analysis.getAnalyzerResult().getTraceresult().getUserEvents()) {
            seriesMap.get(event.getEventType()).add(event.getPressTime(), event.getPressTime(),
                    event.getReleaseTime(), 0.5, 0, 1);
        }

        // Assign ToolTip to renderer
        XYItemRenderer renderer = plot.getRenderer();
        renderer.setSeriesPaint(userInputData.indexOf(UserEventType.SCREEN_LANDSCAPE), Color.BLUE);
        renderer.setSeriesPaint(userInputData.indexOf(UserEventType.SCREEN_PORTRAIT), Color.BLUE);
        renderer.setBaseToolTipGenerator(new XYToolTipGenerator() {

            @Override
            public String generateToolTip(XYDataset dataset, int series, int item) {
                UserEvent.UserEventType eventType = (UserEvent.UserEventType) userInputData.getSeries(series)
                        .getKey();
                return ResourceBundleHelper.getEnumString(eventType);
            }
        });

    }

    plot.setDataset(userInputData);
    //      return plot;
}

From source file:BookTree.java

public BookCellRenderer() {
    renderer = new JPanel(new GridLayout(0, 1));
    titleLabel = new JLabel(" ");
    titleLabel.setForeground(Color.blue);
    renderer.add(titleLabel);//from  ww  w.  ja  va2s .co m
    authorsLabel = new JLabel(" ");
    authorsLabel.setForeground(Color.blue);
    renderer.add(authorsLabel);
    priceLabel = new JLabel(" ");
    priceLabel.setHorizontalAlignment(JLabel.RIGHT);
    priceLabel.setForeground(Color.red);
    renderer.add(priceLabel);
    renderer.setBorder(BorderFactory.createLineBorder(Color.black));
    backgroundSelectionColor = defaultRenderer.getBackgroundSelectionColor();
    backgroundNonSelectionColor = defaultRenderer.getBackgroundNonSelectionColor();
}

From source file:monitor.processing.OLD.SoccerField.java

public void drawTree(BaseNode n, RealVector v) {

    Color c = Color.WHITE;

    if (n instanceof TransformNode) {
        v = ((TransformNode) n).getTrasformMatrix().operate(v);

        c = Color.ORANGE;// w  w  w . jav  a  2s . co  m
    } else if (n instanceof StaticMesh) {
        StaticMesh sm = (StaticMesh) n;

        if (sm.isTransparent()) {
            c = Color.BLUE;
        } else if (sm.isVisible()) {
            //                System.out.println(n.getInfo());
            //                System.out.println(v);
            c = Color.RED;
            if (sm.getModel().contains("naohead") || sm.getModel().contains("naobody")) {
                c = Color.PINK;
            }
        } else {
            c = Color.CYAN;
        }

    } else if (n instanceof StaticMeshNode) {
        StaticMeshNode smn = (StaticMeshNode) n;

        if (smn.isTransparent()) {
            c = Color.GREEN;
            //                cameraSceneX = (float)v.getEntry(0);
            //                cameraSceneY = (float)v.getEntry(1);
            //                cameraSceneZ = (float)v.getEntry(2);
        } else if (smn.isVisible()) {
            c = Color.YELLOW;
        } else {
            c = Color.MAGENTA;
        }

    }

    pushMatrix();
    fill(100);

    //        c = Color.getHSBColor(n.getAddress()*0.05f, 1, 1);
    stroke(c.getRed(), c.getGreen(), c.getBlue());
    translate((float) (scale * v.getEntry(0)), (float) (-scale * v.getEntry(1)),
            (float) (scale * v.getEntry(2)));
    box(5);
    popMatrix();

    for (int a = n.getChildren().size() - 1; a >= 0; a--) {
        drawTree(((ArrayList<BaseNode>) n.getChildren()).get(a), v);
    }

}

From source file:org.openfaces.component.chart.impl.configuration.PlotSelectionConfigurator.java

private void setupGridChartSelection(Plot plot, GridChartView chartView) {
    if (chartView.getPoint() != null) {
        GridPointInfo point = chartView.getPoint();
        final ChartSelection selection = chartView.getChart().getChartSelection();

        final LineStyle lineStyle = selection.getLineStyle();
        Paint outlinePaint = lineStyle.getColor() != null ? lineStyle.getColor() : Color.BLUE;
        final Stroke outlineStroke = lineStyle.getStroke() != null ? lineStyle.getStroke()
                : new BasicStroke(5.0F, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL);
        final Paint selectionPaint = selection.getFillPaint();

        Object itemRenderer = null;
        if (plot instanceof XYPlot) {
            itemRenderer = ((XYPlot) plot).getRenderer();
        } else if (plot instanceof CategoryPlot) {
            itemRenderer = ((CategoryPlot) plot).getRenderer();
        }//from   w  w w.  ja v  a2  s  . c  o  m

        if (itemRenderer != null && itemRenderer instanceof CustomizedRenderer) {
            if (itemRenderer instanceof BarRenderer) {
                ((BarRenderer) itemRenderer).setDrawBarOutline(true);
            } else if (itemRenderer instanceof XYBarRenderer) {
                ((XYBarRenderer) itemRenderer).setDrawBarOutline(true);
            } else if (itemRenderer instanceof XYRendererAdapter) {
                ((XYRendererAdapter) itemRenderer).setDrawOutlines(true);
            } else if (itemRenderer instanceof XYLineAndShapeRenderer) {
                ((XYLineAndShapeRenderer) itemRenderer).setDrawOutlines(true);
            }

            final SeriesInfo series = point.getSeries();
            ((CustomizedRenderer) itemRenderer).setItemOutlinePaint(series.getIndex(), point.getIndex(),
                    outlinePaint);
            ((CustomizedRenderer) itemRenderer).setItemOutlineStroke(series.getIndex(), point.getIndex(),
                    outlineStroke);

            ((CustomizedRenderer) itemRenderer).setItemPaint(series.getIndex(), point.getIndex(),
                    selectionPaint);
        }
    }
}