Example usage for java.awt Color PINK

List of usage examples for java.awt Color PINK

Introduction

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

Prototype

Color PINK

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

Click Source Link

Document

The color pink.

Usage

From source file:edu.umn.cs.spatialHadoop.OperationsParams.java

public static Color getColor(Configuration conf, String key, Color defaultValue) {
    String colorName = conf.get(key);
    if (colorName == null)
        return defaultValue;

    colorName = colorName.toLowerCase();
    Color color = defaultValue;//www . j a  va2  s . c om
    if (colorName.equals("red")) {
        color = Color.RED;
    } else if (colorName.equals("pink")) {
        color = Color.PINK;
    } else if (colorName.equals("blue")) {
        color = Color.BLUE;
    } else if (colorName.equals("cyan")) {
        color = Color.CYAN;
    } else if (colorName.equals("green")) {
        color = Color.GREEN;
    } else if (colorName.equals("black")) {
        color = Color.BLACK;
    } else if (colorName.equals("white")) {
        color = Color.WHITE;
    } else if (colorName.equals("gray")) {
        color = Color.GRAY;
    } else if (colorName.equals("yellow")) {
        color = Color.YELLOW;
    } else if (colorName.equals("orange")) {
        color = Color.ORANGE;
    } else if (colorName.equals("none")) {
        color = new Color(0, 0, 255, 0);
    } else if (colorName.matches("#[a-zA-Z0-9]{8}")) {
        String redHex = colorName.substring(1, 2);
        String greenHex = colorName.substring(3, 4);
        String blueHex = colorName.substring(5, 6);
        String opacityHex = colorName.substring(7, 8);
        int red = Integer.parseInt(redHex, 16);
        int green = Integer.parseInt(greenHex, 16);
        int blue = Integer.parseInt(blueHex, 16);
        int opacity = Integer.parseInt(opacityHex, 16);
        color = new Color(red, green, blue, opacity);
    } else {
        LOG.warn("Does not understand the color '" + conf.get(key) + "'");
    }

    return color;
}

From source file:com.polivoto.vistas.acciones.Datos.java

private void setcolors() {
    colores.add(Color.red);/*from   www.ja  v  a2  s .  c om*/
    colores.add(Color.green);
    colores.add(Color.blue);
    colores.add(Color.yellow);
    colores.add(Color.magenta);
    colores.add(Color.cyan);
    colores.add(Color.pink);
    colores.add(Color.orange);
    colores.add(Color.darkGray);
    colores.add(Color.white);
}

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

public void drawTree(BaseNode n, RealVector v) {

    Color c = Color.WHITE;

    if (n instanceof TransformNode) {
        //v = ((TransformNode) n).getTrasformMatrix().getColumnVector(3);
        v = ((TransformNode) n).getTrasformMatrix().operate(v);
        //stroke(0, 0, 255);
        //            line((float) bef[0] * scale, (float) bef[1] * scale, (float) bef[2] * scale, (float) att[0] * scale, (float) att[1] * scale, (float) att[2] * scale);

        c = Color.BLACK;/* w ww .ja  va 2 s.  c om*/
    } 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;
        }

    }

    //        if (n.getInfo().contains("naohead")){
    //            c = Color.CYAN;
    //            pushMatrix();
    //            fill(c.getRed(), c.getGreen(), c.getBlue());
    //
    //            noStroke();
    //            translate((float) (scale * v.getEntry(0)), (float) (-scale * v.getEntry(1)), (float) (scale * v.getEntry(2)));
    //            box(50);
    //            popMatrix();
    //        }

    pushMatrix();
    fill(c.getRed(), c.getGreen(), c.getBlue());
    noStroke();
    translate((float) (scale * v.getEntry(0)), (float) (-scale * v.getEntry(1)),
            (float) (scale * v.getEntry(2)));
    box(0.05f * scale);
    popMatrix();

    if (n.getAddress() == selected) {
        path.add(v);
        pushMatrix();
        fill(0, 255, 255, selectedAlpha);
        selectedAlpha += (selectedAlpha >= 255) ? -255 : 10;
        noStroke();
        translate((float) (scale * v.getEntry(0)), (float) (-scale * v.getEntry(1)),
                (float) (scale * v.getEntry(2)));
        pushMatrix();
        //rotateX(t);
        rotateZ(selectedTheta);
        selectedTheta += 1 / 8f;
        box(0.1f * scale);
        popMatrix();
        // info
        rotateZ(PI / 2);
        rotateX(-PI / 2);
        translate(0.1f * scale, -0.1f * scale);
        fill(0);
        textSize(0.1f * scale);
        text(n.getInfo(), 0, 0, 0);

        popMatrix();

        RealVector ant = null;
        int o = 0;

        for (RealVector w : path) {
            if (ant != null) {
                stroke(o, 255 - o, 0, 200);
                //                    System.out.println(ant);
                //                    System.out.println(w);
                line((float) ant.getEntry(0) * scale, (float) ant.getEntry(1) * -scale,
                        (float) ant.getEntry(2) * scale, (float) w.getEntry(0) * scale,
                        (float) w.getEntry(1) * -scale, (float) w.getEntry(2));
                o += (o >= 255) ? -200 : 10;
            }
            ant = w;

            pushMatrix();
            stroke(255, 255, 0, 200);
            translate((float) (scale * w.getEntry(0)), (float) (-scale * w.getEntry(1)),
                    (float) (scale * w.getEntry(2)));

            box(2);
            popMatrix();
        }
    }

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

}

From source file:GUI.TelaPrincipal.java

private void botaoConsultarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoConsultarActionPerformed
    DefaultCategoryDataset barChartData = new DefaultCategoryDataset();
    barChartData.setValue(20000, "Contribution", "JANUARY");
    barChartData.setValue(15000, "Contribution", "FEBRUARY");
    barChartData.setValue(30000, "Contribution", "MARCH");

    JFreeChart barChart = ChartFactory.createBarChart("Church", "Monthly", "Contribution", barChartData,
            PlotOrientation.VERTICAL, false, true, false);
    CategoryPlot barchrt = barChart.getCategoryPlot();
    barchrt.setRangeGridlinePaint(Color.PINK);
    barchrt.setBackgroundPaint(Color.WHITE);

    ChartFrame frame = new ChartFrame("Lala", barChart);
    frame.setVisible(true);// w  w  w. j ava2 s. c o  m
    frame.setSize(800, 500);

}

From source file:net.fenyo.gnetwatch.GUI.GenericSrcComponent.java

/**
 * Paints the chart.//  ww  w  .j  a  va 2s . com
 * @param now current time.
 * @return void.
 */
// AWT thread
// AWT thread << sync_value_per_vinterval << events
public void paintChart(final long now) {
    backing_g.setClip(axis_margin_left + 1, axis_margin_top,
            dimension.width - axis_margin_left - axis_margin_right - 1,
            dimension.height - axis_margin_top - axis_margin_bottom);

    synchronized (events) {
        final int npoints = events.size();
        final int point_x[] = new int[npoints];
        final int point_y[] = new int[npoints];
        final int point_y1[] = new int[npoints];
        final int point_y2[] = new int[npoints];
        final int point_y3[] = new int[npoints];
        final int point_y4[] = new int[npoints];
        final int point_y5[] = new int[npoints];
        final int point_y6[] = new int[npoints];
        final int point_y7[] = new int[npoints];
        final int point_y8[] = new int[npoints];
        final int point_y9[] = new int[npoints];
        final int point_y10[] = new int[npoints];

        final long time_to_display = now - now % _getDelayPerInterval();
        final int pixels_offset = (pixels_per_interval * (int) (now % _getDelayPerInterval()))
                / (int) _getDelayPerInterval();
        final int last_interval_pos = dimension.width - axis_margin_right - pixels_offset;

        for (int i = 0; i < events.size(); i++) {
            final EventGenericSrc event = (EventGenericSrc) events.get(i);
            final long xpos = ((long) last_interval_pos)
                    + (((long) pixels_per_interval) * (event.getDate().getTime() - time_to_display))
                            / _getDelayPerInterval();
            if (xpos < -1000)
                point_x[i] = -1000;
            else if (xpos > 1000 + dimension.width)
                point_x[i] = 1000 + dimension.width;
            else
                point_x[i] = (int) xpos;

            // cast to double to avoid overflow on int that lead to wrong results
            point_y[i] = (int) (dimension.height - axis_margin_bottom
                    - pixels_per_vinterval * (double) event.getIntValue() / value_per_vinterval);
            point_y1[i] = (int) (dimension.height - axis_margin_bottom
                    - pixels_per_vinterval * (double) event.getValue1() / value_per_vinterval);
            point_y2[i] = (int) (dimension.height - axis_margin_bottom
                    - pixels_per_vinterval * (double) event.getValue2() / value_per_vinterval);
            point_y3[i] = (int) (dimension.height - axis_margin_bottom
                    - pixels_per_vinterval * (double) event.getValue3() / value_per_vinterval);
            point_y4[i] = (int) (dimension.height - axis_margin_bottom
                    - pixels_per_vinterval * (double) event.getValue4() / value_per_vinterval);
            point_y5[i] = (int) (dimension.height - axis_margin_bottom
                    - pixels_per_vinterval * (double) event.getValue5() / value_per_vinterval);
            point_y6[i] = (int) (dimension.height - axis_margin_bottom
                    - pixels_per_vinterval * (double) event.getValue6() / value_per_vinterval);
            point_y7[i] = (int) (dimension.height - axis_margin_bottom
                    - pixels_per_vinterval * (double) event.getValue7() / value_per_vinterval);
            point_y8[i] = (int) (dimension.height - axis_margin_bottom
                    - pixels_per_vinterval * (double) event.getValue8() / value_per_vinterval);
            point_y9[i] = (int) (dimension.height - axis_margin_bottom
                    - pixels_per_vinterval * (double) event.getValue9() / value_per_vinterval);
            point_y10[i] = (int) (dimension.height - axis_margin_bottom
                    - pixels_per_vinterval * (double) event.getValue10() / value_per_vinterval);
        }

        backing_g.setColor(Color.GREEN);
        backing_g.drawPolyline(point_x, point_y, events.size());
        for (int i = 0; i < events.size(); i++)
            backing_g.drawRect(point_x[i] - 2, point_y[i] - 2, 4, 4);

        backing_g.setColor(Color.WHITE);
        backing_g.drawPolyline(point_x, point_y1, events.size());
        for (int i = 0; i < events.size(); i++)
            backing_g.drawRect(point_x[i] - 2, point_y1[i] - 2, 4, 4);

        backing_g.setColor(Color.BLUE);
        backing_g.drawPolyline(point_x, point_y2, events.size());
        for (int i = 0; i < events.size(); i++)
            backing_g.drawRect(point_x[i] - 2, point_y2[i] - 2, 4, 4);

        backing_g.setColor(Color.GRAY);
        backing_g.drawPolyline(point_x, point_y3, events.size());
        for (int i = 0; i < events.size(); i++)
            backing_g.drawRect(point_x[i] - 2, point_y3[i] - 2, 4, 4);

        backing_g.setColor(Color.YELLOW);
        backing_g.drawPolyline(point_x, point_y4, events.size());
        for (int i = 0; i < events.size(); i++)
            backing_g.drawRect(point_x[i] - 2, point_y4[i] - 2, 4, 4);

        backing_g.setColor(Color.ORANGE);
        backing_g.drawPolyline(point_x, point_y5, events.size());
        for (int i = 0; i < events.size(); i++)
            backing_g.drawRect(point_x[i] - 2, point_y5[i] - 2, 4, 4);

        backing_g.setColor(Color.CYAN);
        backing_g.drawPolyline(point_x, point_y6, events.size());
        for (int i = 0; i < events.size(); i++)
            backing_g.drawRect(point_x[i] - 2, point_y6[i] - 2, 4, 4);

        backing_g.setColor(Color.MAGENTA);
        backing_g.drawPolyline(point_x, point_y7, events.size());
        for (int i = 0; i < events.size(); i++)
            backing_g.drawRect(point_x[i] - 2, point_y7[i] - 2, 4, 4);

        backing_g.setColor(Color.LIGHT_GRAY);
        backing_g.drawPolyline(point_x, point_y8, events.size());
        for (int i = 0; i < events.size(); i++)
            backing_g.drawRect(point_x[i] - 2, point_y8[i] - 2, 4, 4);

        backing_g.setColor(Color.PINK);
        backing_g.drawPolyline(point_x, point_y9, events.size());
        for (int i = 0; i < events.size(); i++)
            backing_g.drawRect(point_x[i] - 2, point_y9[i] - 2, 4, 4);

        backing_g.setColor(Color.RED);
        backing_g.drawPolyline(point_x, point_y10, events.size());
        for (int i = 0; i < events.size(); i++)
            backing_g.drawRect(point_x[i] - 2, point_y10[i] - 2, 4, 4);

        int cnt = 1;
        int cnt2 = 1;
        if (events.size() > 0)
            for (final String str : ((EventGenericSrc) events.get(0)).getUnits().split(";")) {
                if (str.length() > 0) {
                    switch (cnt) {
                    case 1:
                        backing_g.setColor(Color.WHITE);
                        break;
                    case 2:
                        backing_g.setColor(Color.BLUE);
                        break;
                    case 3:
                        backing_g.setColor(Color.GRAY);
                        break;
                    case 4:
                        backing_g.setColor(Color.YELLOW);
                        break;
                    case 5:
                        backing_g.setColor(Color.ORANGE);
                        break;
                    case 6:
                        backing_g.setColor(Color.CYAN);
                        break;
                    case 7:
                        backing_g.setColor(Color.MAGENTA);
                        break;
                    case 8:
                        backing_g.setColor(Color.LIGHT_GRAY);
                        break;
                    case 9:
                        backing_g.setColor(Color.PINK);
                        break;
                    case 10:
                        backing_g.setColor(Color.RED);
                        break;
                    }
                    backing_g.fillRect(dimension.width - axis_margin_right - 150, 50 - 5 + 13 * cnt2, 20, 3);

                    backing_g.setColor(Color.WHITE);
                    backing_g.drawString(str, dimension.width - axis_margin_right - 150 + 22, 50 + 13 * cnt2);

                    cnt2++;
                }
                cnt++;
            }

        backing_g.setClip(null);
    }
}

From source file:net.sf.fspdfs.chartthemes.simple.SimpleSettingsFactory.java

/**
 *
 *///from  w  w w .jav  a 2 s. c  o  m
public static final ChartThemeSettings createChartThemeSettings() {
    ChartThemeSettings settings = new ChartThemeSettings();

    ChartSettings chartSettings = settings.getChartSettings();
    chartSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue));
    chartSettings.setBackgroundImage(new FileImageProvider("net/sf/fspdfs/chartthemes/simple/fspdfs.png"));
    chartSettings.setBackgroundImageAlignment(new Integer(Align.TOP_RIGHT));
    chartSettings.setBackgroundImageAlpha(new Float(1f));
    chartSettings.setBorderVisible(Boolean.TRUE);
    chartSettings.setBorderPaint(new ColorProvider(Color.GREEN));
    chartSettings.setBorderStroke(new BasicStroke(1f));
    chartSettings.setAntiAlias(Boolean.TRUE);
    chartSettings.setTextAntiAlias(Boolean.TRUE);
    chartSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4));

    TitleSettings titleSettings = settings.getTitleSettings();
    titleSettings.setShowTitle(Boolean.TRUE);
    titleSettings.setPosition(EdgeEnum.TOP);
    titleSettings.setForegroundPaint(new ColorProvider(Color.black));
    titleSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue));
    titleSettings.getFont().setBold(Boolean.TRUE);
    titleSettings.getFont().setFontSize(22);
    titleSettings.setHorizontalAlignment(HorizontalAlignment.CENTER);
    titleSettings.setVerticalAlignment(VerticalAlignment.TOP);
    titleSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4));

    TitleSettings subtitleSettings = settings.getSubtitleSettings();
    subtitleSettings.setShowTitle(Boolean.TRUE);
    subtitleSettings.setPosition(EdgeEnum.TOP);
    subtitleSettings.setForegroundPaint(new ColorProvider(Color.red));
    subtitleSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue));
    subtitleSettings.getFont().setBold(Boolean.TRUE);
    subtitleSettings.setHorizontalAlignment(HorizontalAlignment.LEFT);
    subtitleSettings.setVerticalAlignment(VerticalAlignment.CENTER);
    subtitleSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4));

    LegendSettings legendSettings = settings.getLegendSettings();
    legendSettings.setShowLegend(Boolean.TRUE);
    legendSettings.setPosition(EdgeEnum.BOTTOM);
    legendSettings.setForegroundPaint(new ColorProvider(Color.black));
    legendSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue));
    legendSettings.getFont().setBold(Boolean.TRUE);
    legendSettings.setHorizontalAlignment(HorizontalAlignment.CENTER);
    legendSettings.setVerticalAlignment(VerticalAlignment.BOTTOM);
    //FIXMETHEME legendSettings.setBlockFrame();
    legendSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4));

    PlotSettings plotSettings = settings.getPlotSettings();
    plotSettings.setOrientation(PlotOrientation.VERTICAL);
    //      plotSettings.setForegroundAlpha(new Float(0.5f));
    plotSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue));
    //      plotSettings.setBackgroundAlpha(new Float(0.5f));
    plotSettings.setBackgroundImage(new FileImageProvider("net/sf/fspdfs/chartthemes/simple/fspdfs.png"));
    plotSettings.setBackgroundImageAlpha(new Float(0.5f));
    plotSettings.setBackgroundImageAlignment(new Integer(Align.NORTH_WEST));
    plotSettings.setLabelRotation(new Double(0));
    plotSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4));
    plotSettings.setOutlineVisible(Boolean.TRUE);
    plotSettings.setOutlinePaint(new ColorProvider(Color.red));
    plotSettings.setOutlineStroke(new BasicStroke(1f));
    plotSettings.setSeriesColorSequence(COLORS);
    //      plotSettings.setSeriesGradientPaintSequence(GRADIENT_PAINTS);
    plotSettings.setSeriesOutlinePaintSequence(COLORS_DARKER);
    plotSettings.setSeriesStrokeSequence(STROKES);
    plotSettings.setSeriesOutlineStrokeSequence(OUTLINE_STROKES);
    plotSettings.setDomainGridlineVisible(Boolean.TRUE);
    plotSettings.setDomainGridlinePaint(new ColorProvider(Color.DARK_GRAY));
    plotSettings.setDomainGridlineStroke(new BasicStroke(0.5f));
    plotSettings.setRangeGridlineVisible(Boolean.TRUE);
    plotSettings.setRangeGridlinePaint(new ColorProvider(Color.BLACK));
    plotSettings.setRangeGridlineStroke(new BasicStroke(0.5f));
    plotSettings.getTickLabelFont().setFontName("Courier");
    plotSettings.getTickLabelFont().setBold(Boolean.TRUE);
    plotSettings.getTickLabelFont().setFontSize(10);
    plotSettings.getDisplayFont().setFontName("Arial");
    plotSettings.getDisplayFont().setBold(Boolean.TRUE);
    plotSettings.getDisplayFont().setFontSize(12);

    AxisSettings domainAxisSettings = settings.getDomainAxisSettings();
    domainAxisSettings.setVisible(Boolean.TRUE);
    domainAxisSettings.setLocation(AxisLocation.BOTTOM_OR_RIGHT);
    domainAxisSettings.setLinePaint(new ColorProvider(Color.green));
    domainAxisSettings.setLineStroke(new BasicStroke(1f));
    domainAxisSettings.setLineVisible(Boolean.TRUE);
    //      domainAxisSettings.setLabel("Domain Axis");
    domainAxisSettings.setLabelAngle(new Double(0.0));
    domainAxisSettings.setLabelPaint(new ColorProvider(Color.magenta));
    domainAxisSettings.getLabelFont().setBold(Boolean.TRUE);
    domainAxisSettings.getLabelFont().setItalic(Boolean.TRUE);
    domainAxisSettings.getLabelFont().setFontName("Comic Sans MS");
    domainAxisSettings.getLabelFont().setFontSize(12);
    domainAxisSettings.setLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 1, 1));
    domainAxisSettings.setLabelVisible(Boolean.TRUE);
    domainAxisSettings.setTickLabelPaint(new ColorProvider(Color.cyan));
    domainAxisSettings.getTickLabelFont().setBold(Boolean.TRUE);
    domainAxisSettings.getTickLabelFont().setItalic(Boolean.FALSE);
    domainAxisSettings.getTickLabelFont().setFontName("Arial");
    domainAxisSettings.getTickLabelFont().setFontSize(10);
    domainAxisSettings.setTickLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 0.5, 0.5));
    domainAxisSettings.setTickLabelsVisible(Boolean.TRUE);
    domainAxisSettings.setTickMarksInsideLength(new Float(0.1f));
    domainAxisSettings.setTickMarksOutsideLength(new Float(0.2f));
    domainAxisSettings.setTickMarksPaint(new ColorProvider(Color.ORANGE));
    domainAxisSettings.setTickMarksStroke(new BasicStroke(1f));
    domainAxisSettings.setTickMarksVisible(Boolean.TRUE);
    domainAxisSettings.setTickCount(new Integer(5));

    AxisSettings rangeAxisSettings = settings.getRangeAxisSettings();
    rangeAxisSettings.setVisible(Boolean.TRUE);
    rangeAxisSettings.setLocation(AxisLocation.TOP_OR_RIGHT);
    rangeAxisSettings.setLinePaint(new ColorProvider(Color.yellow));
    rangeAxisSettings.setLineStroke(new BasicStroke(1f));
    rangeAxisSettings.setLineVisible(Boolean.TRUE);
    //      rangeAxisSettings.setLabel("Range Axis");
    rangeAxisSettings.setLabelAngle(new Double(Math.PI / 2.0));
    rangeAxisSettings.setLabelPaint(new ColorProvider(Color.green));
    rangeAxisSettings.getLabelFont().setBold(Boolean.TRUE);
    rangeAxisSettings.getLabelFont().setItalic(Boolean.TRUE);
    rangeAxisSettings.getLabelFont().setFontName("Comic Sans MS");
    rangeAxisSettings.getLabelFont().setFontSize(12);
    rangeAxisSettings.setLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 1, 1));
    rangeAxisSettings.setLabelVisible(Boolean.TRUE);
    rangeAxisSettings.setTickLabelPaint(new ColorProvider(Color.pink));
    rangeAxisSettings.getTickLabelFont().setBold(Boolean.FALSE);
    rangeAxisSettings.getTickLabelFont().setItalic(Boolean.TRUE);
    rangeAxisSettings.getTickLabelFont().setFontName("Arial");
    rangeAxisSettings.getTickLabelFont().setFontSize(10);
    rangeAxisSettings.setTickLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 0.5, 0.5));
    rangeAxisSettings.setTickLabelsVisible(Boolean.TRUE);
    rangeAxisSettings.setTickMarksInsideLength(new Float(0.2f));
    rangeAxisSettings.setTickMarksOutsideLength(new Float(0.1f));
    rangeAxisSettings.setTickMarksPaint(new ColorProvider(Color.black));
    rangeAxisSettings.setTickMarksStroke(new BasicStroke(1f));
    rangeAxisSettings.setTickMarksVisible(Boolean.TRUE);
    rangeAxisSettings.setTickCount(new Integer(6));

    return settings;
}

From source file:com.icesoft.faces.component.outputchart.AbstractChart.java

public ColorMap() {
    this.put("black", Color.BLACK);
    this.put("blue", Color.BLUE);
    this.put("cyan", Color.CYAN);
    this.put("darkGray", Color.DARK_GRAY);
    this.put("gray", Color.GRAY);
    this.put("green", Color.GREEN);
    this.put("lightGray", Color.LIGHT_GRAY);
    this.put("magenta", Color.MAGENTA);
    this.put("orange", Color.ORANGE);
    this.put("pink", Color.PINK);
    this.put("red", Color.RED);
    this.put("white", Color.WHITE);
    this.put("yellow", Color.YELLOW);
}

From source file:net.sf.jasperreports.chartthemes.simple.SimpleSettingsFactory.java

/**
 *
 *///w ww  .j  a v a 2 s . c o m
public static final ChartThemeSettings createChartThemeSettings() {
    ChartThemeSettings settings = new ChartThemeSettings();

    ChartSettings chartSettings = settings.getChartSettings();
    chartSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue));
    chartSettings.setBackgroundImage(
            new FileImageProvider("net/sf/jasperreports/chartthemes/simple/jasperreports.png"));
    chartSettings.setBackgroundImageAlignment(Align.TOP_RIGHT);
    chartSettings.setBackgroundImageAlpha(1f);
    chartSettings.setBorderVisible(Boolean.TRUE);
    chartSettings.setBorderPaint(new ColorProvider(Color.GREEN));
    chartSettings.setBorderStroke(new BasicStroke(1f));
    chartSettings.setAntiAlias(Boolean.TRUE);
    chartSettings.setTextAntiAlias(Boolean.TRUE);
    chartSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4));

    TitleSettings titleSettings = settings.getTitleSettings();
    titleSettings.setShowTitle(Boolean.TRUE);
    titleSettings.setPosition(EdgeEnum.TOP);
    titleSettings.setForegroundPaint(new ColorProvider(Color.black));
    titleSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue));
    titleSettings.getFont().setBold(Boolean.TRUE);
    titleSettings.getFont().setFontSize(22f);
    titleSettings.setHorizontalAlignment(HorizontalAlignment.CENTER);
    titleSettings.setVerticalAlignment(VerticalAlignment.TOP);
    titleSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4));

    TitleSettings subtitleSettings = settings.getSubtitleSettings();
    subtitleSettings.setShowTitle(Boolean.TRUE);
    subtitleSettings.setPosition(EdgeEnum.TOP);
    subtitleSettings.setForegroundPaint(new ColorProvider(Color.red));
    subtitleSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue));
    subtitleSettings.getFont().setBold(Boolean.TRUE);
    subtitleSettings.setHorizontalAlignment(HorizontalAlignment.LEFT);
    subtitleSettings.setVerticalAlignment(VerticalAlignment.CENTER);
    subtitleSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4));

    LegendSettings legendSettings = settings.getLegendSettings();
    legendSettings.setShowLegend(Boolean.TRUE);
    legendSettings.setPosition(EdgeEnum.BOTTOM);
    legendSettings.setForegroundPaint(new ColorProvider(Color.black));
    legendSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue));
    legendSettings.getFont().setBold(Boolean.TRUE);
    legendSettings.setHorizontalAlignment(HorizontalAlignment.CENTER);
    legendSettings.setVerticalAlignment(VerticalAlignment.BOTTOM);
    //FIXMETHEME legendSettings.setBlockFrame();
    legendSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4));

    PlotSettings plotSettings = settings.getPlotSettings();
    plotSettings.setOrientation(PlotOrientation.VERTICAL);
    //      plotSettings.setForegroundAlpha(0.5f);
    plotSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue));
    //      plotSettings.setBackgroundAlpha(0.5f);
    plotSettings.setBackgroundImage(
            new FileImageProvider("net/sf/jasperreports/chartthemes/simple/jasperreports.png"));
    plotSettings.setBackgroundImageAlpha(0.5f);
    plotSettings.setBackgroundImageAlignment(Align.NORTH_WEST);
    plotSettings.setLabelRotation(0d);
    plotSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4));
    plotSettings.setOutlineVisible(Boolean.TRUE);
    plotSettings.setOutlinePaint(new ColorProvider(Color.red));
    plotSettings.setOutlineStroke(new BasicStroke(1f));
    plotSettings.setSeriesColorSequence(COLORS);
    //      plotSettings.setSeriesGradientPaintSequence(GRADIENT_PAINTS);
    plotSettings.setSeriesOutlinePaintSequence(COLORS_DARKER);
    plotSettings.setSeriesStrokeSequence(STROKES);
    plotSettings.setSeriesOutlineStrokeSequence(OUTLINE_STROKES);
    plotSettings.setDomainGridlineVisible(Boolean.TRUE);
    plotSettings.setDomainGridlinePaint(new ColorProvider(Color.DARK_GRAY));
    plotSettings.setDomainGridlineStroke(new BasicStroke(0.5f));
    plotSettings.setRangeGridlineVisible(Boolean.TRUE);
    plotSettings.setRangeGridlinePaint(new ColorProvider(Color.BLACK));
    plotSettings.setRangeGridlineStroke(new BasicStroke(0.5f));
    plotSettings.getTickLabelFont().setFontName("Courier");
    plotSettings.getTickLabelFont().setBold(Boolean.TRUE);
    plotSettings.getTickLabelFont().setFontSize(10f);
    plotSettings.getDisplayFont().setFontName("Arial");
    plotSettings.getDisplayFont().setBold(Boolean.TRUE);
    plotSettings.getDisplayFont().setFontSize(12f);

    AxisSettings domainAxisSettings = settings.getDomainAxisSettings();
    domainAxisSettings.setVisible(Boolean.TRUE);
    domainAxisSettings.setLocation(AxisLocation.BOTTOM_OR_RIGHT);
    domainAxisSettings.setLinePaint(new ColorProvider(Color.green));
    domainAxisSettings.setLineStroke(new BasicStroke(1f));
    domainAxisSettings.setLineVisible(Boolean.TRUE);
    //      domainAxisSettings.setLabel("Domain Axis");
    domainAxisSettings.setLabelAngle(0.0d);
    domainAxisSettings.setLabelPaint(new ColorProvider(Color.magenta));
    domainAxisSettings.getLabelFont().setBold(Boolean.TRUE);
    domainAxisSettings.getLabelFont().setItalic(Boolean.TRUE);
    domainAxisSettings.getLabelFont().setFontName("Comic Sans MS");
    domainAxisSettings.getLabelFont().setFontSize(12f);
    domainAxisSettings.setLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 1, 1));
    domainAxisSettings.setLabelVisible(Boolean.TRUE);
    domainAxisSettings.setTickLabelPaint(new ColorProvider(Color.cyan));
    domainAxisSettings.getTickLabelFont().setBold(Boolean.TRUE);
    domainAxisSettings.getTickLabelFont().setItalic(Boolean.FALSE);
    domainAxisSettings.getTickLabelFont().setFontName("Arial");
    domainAxisSettings.getTickLabelFont().setFontSize(10f);
    domainAxisSettings.setTickLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 0.5, 0.5));
    domainAxisSettings.setTickLabelsVisible(Boolean.TRUE);
    domainAxisSettings.setTickMarksInsideLength(0.1f);
    domainAxisSettings.setTickMarksOutsideLength(0.2f);
    domainAxisSettings.setTickMarksPaint(new ColorProvider(Color.ORANGE));
    domainAxisSettings.setTickMarksStroke(new BasicStroke(1f));
    domainAxisSettings.setTickMarksVisible(Boolean.TRUE);
    domainAxisSettings.setTickCount(5);

    AxisSettings rangeAxisSettings = settings.getRangeAxisSettings();
    rangeAxisSettings.setVisible(Boolean.TRUE);
    rangeAxisSettings.setLocation(AxisLocation.TOP_OR_RIGHT);
    rangeAxisSettings.setLinePaint(new ColorProvider(Color.yellow));
    rangeAxisSettings.setLineStroke(new BasicStroke(1f));
    rangeAxisSettings.setLineVisible(Boolean.TRUE);
    //      rangeAxisSettings.setLabel("Range Axis");
    rangeAxisSettings.setLabelAngle(Math.PI / 2.0d);
    rangeAxisSettings.setLabelPaint(new ColorProvider(Color.green));
    rangeAxisSettings.getLabelFont().setBold(Boolean.TRUE);
    rangeAxisSettings.getLabelFont().setItalic(Boolean.TRUE);
    rangeAxisSettings.getLabelFont().setFontName("Comic Sans MS");
    rangeAxisSettings.getLabelFont().setFontSize(12f);
    rangeAxisSettings.setLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 1, 1));
    rangeAxisSettings.setLabelVisible(Boolean.TRUE);
    rangeAxisSettings.setTickLabelPaint(new ColorProvider(Color.pink));
    rangeAxisSettings.getTickLabelFont().setBold(Boolean.FALSE);
    rangeAxisSettings.getTickLabelFont().setItalic(Boolean.TRUE);
    rangeAxisSettings.getTickLabelFont().setFontName("Arial");
    rangeAxisSettings.getTickLabelFont().setFontSize(10f);
    rangeAxisSettings.setTickLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 0.5, 0.5));
    rangeAxisSettings.setTickLabelsVisible(Boolean.TRUE);
    rangeAxisSettings.setTickMarksInsideLength(0.2f);
    rangeAxisSettings.setTickMarksOutsideLength(0.1f);
    rangeAxisSettings.setTickMarksPaint(new ColorProvider(Color.black));
    rangeAxisSettings.setTickMarksStroke(new BasicStroke(1f));
    rangeAxisSettings.setTickMarksVisible(Boolean.TRUE);
    rangeAxisSettings.setTickCount(6);

    return settings;
}

From source file:bicat.gui.GraphicPane.java

/**
 * Default constructor, initializes some values.
 *//*from  www  . j ava  2  s. com*/
public GraphicPane() {

    geneList = null;
    graphDataList = null;
    filledRect = new Rectangle(0, 0);
    xStep = 10;
    yStep = 160; // sta ovo tacno znaci??? (size of the cells of the
    // visualized matrix?)

    colorWheel = new Color[8]; // samo 8?
    colorWheel[0] = Color.BLUE;
    colorWheel[1] = Color.CYAN;
    colorWheel[2] = Color.GREEN;
    colorWheel[3] = Color.MAGENTA;
    colorWheel[4] = Color.ORANGE;
    colorWheel[5] = Color.PINK;
    colorWheel[6] = Color.RED;
    colorWheel[7] = Color.YELLOW;

    //

    /*
     * DefaultPieDataset dpd = new DefaultPieDataset();
     * dpd.setValue("Category 1",50); dpd.setValue("Category 2",50);
     */

    // create a dataset...
    /*
     * DefaultPieDataset data = new DefaultPieDataset();
     * data.setValue("Java", new Double(43.2)); data.setValue("Visual
     * Basic", new Double(0.0)); data.setValue("C/C++", new Double(17.5));
     * 
     * JFreeChart chart = ChartFactory.createPieChart("Sample",data,
     * true,true,false); ChartFrame frame = new ChartFrame("See", chart);
     * frame.pack(); // this.add(frame); //frame.pack();
     * frame.setVisible(true);
     */

    /*
     * chart = ChartFactory.createXYLineChart("Expression Profiles of a
     * Bicluster","genes","conditions", new
     * org.jfree.data.xy.DefaultTableXYDataset(),
     * org.jfree.chart.plot.PlotOrientation.HORIZONTAL, false,false,false);
     * 
     * //ChartPanel cp = new ChartPanel(chart_1); chartPanel = new
     * ChartPanel(chart); this.add(chartPanel); //cp);
     * //,BorderLayout.WEST); this.setVisible(true);
     * //this.add("Proba",chart_1); //ChartFrame frame_1 = new
     * ChartFrame("XY",chart_1); //frame_1.pack();
     * //frame_1.setVisible(true);
     */

}

From source file:simz1.StackedBarChart.java

public void SweetsGraph() {
    DefaultCategoryDataset sidata = new DefaultCategoryDataset();
    sidata.setValue(si1, "sales", d1);
    sidata.setValue(si2, "sales", d2);
    sidata.setValue(si3, "sales", d3);
    sidata.setValue(si4, "sales", d4);
    sidata.setValue(si5, "sales", d5);
    sidata.setValue(si6, "sales", d6);
    sidata.setValue(si7, "sales", d7);

    JFreeChart chart5 = ChartFactory.createLineChart("Sales of Sweet items last week", "Date", "sales", sidata,
            PlotOrientation.VERTICAL, false, true, false);
    CategoryPlot c5 = chart5.getCategoryPlot();
    c5.setBackgroundPaint(Color.lightGray);
    c5.getRenderer().setSeriesPaint(0, Color.PINK);
    //c5.setRangeGridlinePaint(Color.pink);

    ChartPanel c5Panel = new ChartPanel(chart5);
    mhp.chartPanel.removeAll();/* w  w  w  . j  a  v  a2s .c o  m*/
    mhp.chartPanel.add(c5Panel);
}