List of usage examples for java.awt Color cyan
Color cyan
To view the source code for java.awt Color cyan.
Click Source Link
From source file:com.ivli.roim.controls.DomainMarker.java
public DomainMarker(double aV, XYSeries aS) { super(aV);// w w w. j av a2 s . c o m iSeries = aS; iSeries.addChangeListener(this); setLabel(String.format(LABEL_FORMAT, aV)); setLabelAnchor(RectangleAnchor.CENTER); setLabelOffset(RectangleInsets.ZERO_INSETS); setAlpha(1.0f); setPaint(Color.BLACK); setStroke(new BasicStroke(1.0f)); setOutlinePaint(Color.CYAN); setOutlineStroke(new BasicStroke(.0f)); }
From source file:org.alder.fotobuchconvert.scribus.ColorManager.java
public void initialize() { addCMYK("Black", "#000000ff", Color.BLACK); addRGB("BlackRGB", "#000000"); addCMYK("White", "#00000000", Color.WHITE); addRGB("Blue", "#0000ff"); addCMYK("Cool Black", "#990000ff", null); addCMYK("Cyan", "#ff000000", Color.CYAN); addRGB("Green", "#00ff00"); addCMYK("Magenta", "#00ff0000", null); addRGB("Red", "#ff0000"); addCMYK("Rich Black", "#996666ff", null); addCMYK("Warm Black", "#00994cff", null); addCMYK("Yellow", "#0000ff00", Color.YELLOW); }
From source file:com.bwc.ora.views.render.HighlightXYRenderer.java
@Override public Paint getItemFillPaint(int seriesIndex, int itemIndex) { SelectedItem item = new SelectedItem(seriesIndex, itemIndex); if (selectedItems.contains(item)) { return Color.cyan; }//from ww w . j a va 2 s . c o m return super.getItemFillPaint(seriesIndex, itemIndex); //To change body of generated methods, choose Tools | Templates. }
From source file:com.pureinfo.srm.common.ImageHelper.java
private static Color getColor() { Color[] names = new Color[] { Color.WHITE, Color.RED, Color.GREEN, Color.BLUE, Color.CYAN, Color.DARK_GRAY };/* www . j ava 2 s.c o m*/ return names[Math.abs(random.nextInt()) % names.length]; }
From source file:net.sf.dynamicreports.test.jasper.chart.MeterChartTest.java
@Override protected void configureReport(JasperReportBuilder rb) { Locale.setDefault(Locale.ENGLISH); rb.setLocale(Locale.ENGLISH).summary(cht.meterChart().setValue(field("field1", Integer.class)) .setDataRangeLowExpression(3).setDataRangeHighExpression(30).setValueColor(Color.BLUE) .setValueMask("#,###.0").setValueFont(stl.fontArial()).setShape(MeterShape.CIRCLE) .setMeterAngle(270).setUnits("units").setTickInterval(3d).setMeterBackgroundColor(Color.LIGHT_GRAY) .setNeedleColor(Color.CYAN).setTickColor(Color.MAGENTA).setTickLabelFont(stl.fontCourierNew()) .intervals(// w w w .j a va 2 s .c o m cht.meterInterval().setLabel("red").setAlpha(0.8).setBackgroundColor(Color.RED) .setDataRangeLowExpression(25).setDataRangeHighExpression(30), cht.meterInterval().setLabel("yellow").setAlpha(0.5).setBackgroundColor(Color.YELLOW) .setDataRangeLowExpression(20).setDataRangeHighExpression(25)), cht.meterChart().setValue(5).setShape(MeterShape.DIAL)); }
From source file:servlet.SalesReportPieChart.java
/** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> * methods./* w ww.j a va 2s . c o m*/ * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { DefaultPieDataset dataset = new DefaultPieDataset(); int totalTickets = Integer.valueOf(request.getParameter("totalTickets")); int totalSoldTickets = Integer.valueOf(request.getParameter("totalSoldTickets")); dataset.setValue("Unsold Tickets", new Double(totalTickets - totalSoldTickets)); dataset.setValue("Sold Tickets", new Double(totalSoldTickets)); JFreeChart chart = ChartFactory.createPieChart("Ticket Sales", // chart title dataset, // data true, // include legend true, false); PiePlot plot = (PiePlot) chart.getPlot(); plot.setSectionPaint("Unsold Tickets", Color.DARK_GRAY); plot.setSectionPaint("Sold Tickets", Color.CYAN); plot.setExplodePercent("Unsold Tickets", 0.10); plot.setSimpleLabels(true); plot.setBackgroundPaint(Color.WHITE); PieSectionLabelGenerator gen = new StandardPieSectionLabelGenerator("{0}: {1} ({2})", new DecimalFormat("0"), new DecimalFormat("0%")); plot.setLabelGenerator(gen); final ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection()); int width = 500; /* Width of the image */ int height = 400; /* Height of the image */ response.setContentType("image/png"); OutputStream out = response.getOutputStream(); ChartUtilities.writeChartAsPNG(out, chart, 400, 300, info); }
From source file:ShowOff.java
protected void drawBackground(Graphics2D g2) { int side = 45; int width = getSize().width; int height = getSize().height; Color[] colors = { Color.yellow, Color.cyan, Color.orange, Color.pink, Color.magenta, Color.lightGray }; for (int y = 0; y < height; y += side) { for (int x = 0; x < width; x += side) { Ellipse2D ellipse = new Ellipse2D.Float(x, y, side, side); int index = (x + y) / side % colors.length; g2.setPaint(colors[index]);// w w w . j a va2 s. com g2.fill(ellipse); } } }
From source file:com.crunchify.jsp.servlet.BarServlet.java
public JFreeChart getChart() { DefaultCategoryDataset dataset = new DefaultCategoryDataset(); dataset.addValue(15, "1", "451"); dataset.addValue(12, "1", "851"); dataset.addValue(10, "2", "362"); dataset.addValue(5, "2", "142"); JFreeChart chart = ChartFactory.createBarChart("Bar Chart Demo 3", // chart title "Category", // domain axis label "Value", // range axis label dataset, // data PlotOrientation.VERTICAL, // the plot orientation false, // include legend true, false);//from www. j a v a 2 s . c o m chart.setBackgroundPaint(Color.lightGray); // get a reference to the plot for further customisation... CategoryPlot plot = chart.getCategoryPlot(); plot.setNoDataMessage("NO DATA!"); CategoryItemRenderer renderer = new CustomRenderer(new Paint[] { Color.red, Color.blue, Color.green, Color.yellow, Color.orange, Color.cyan, Color.magenta, Color.blue }); renderer.setItemLabelsVisible(true); ItemLabelPosition p = new ItemLabelPosition(ItemLabelAnchor.CENTER, TextAnchor.CENTER, TextAnchor.CENTER, 45.0); renderer.setPositiveItemLabelPosition(p); plot.setRenderer(renderer); // change the margin at the top of the range axis... ValueAxis rangeAxis = plot.getRangeAxis(); rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); rangeAxis.setLowerMargin(0.15); rangeAxis.setUpperMargin(0.15); return chart; }
From source file:net.sf.dynamicreports.test.jasper.chart.ChartTest.java
@Override protected void configureReport(JasperReportBuilder rb) { TextColumnBuilder<String> column1; TextColumnBuilder<Integer> column2; rb.columns(column1 = col.column("Column1", "field1", String.class), column2 = col.column("Column2", "field2", Integer.class)) .summary(cht.barChart().setTitle("title").setTitleColor(Color.BLUE) .setTitleFont(stl.fontArialBold()).setTitlePosition(Position.RIGHT).setSubtitle("subtitle") .setSubtitleColor(Color.CYAN).setSubtitleFont(stl.fontArial()).setLegendColor(Color.BLUE) .setLegendBackgroundColor(Color.LIGHT_GRAY).setLegendFont(stl.fontCourierNew()) .setLegendPosition(Position.LEFT).setCategory(column1).series(cht.serie(column2)), cht.barChart().setShowLegend(false).setOrientation(Orientation.HORIZONTAL) .seriesColors(Color.BLUE, Color.GREEN, Color.RED).setCategory(column1) .series(cht.serie(column2), cht.serie(column2).setLabel("2"), cht.serie(column2).setLabel("3"))); }
From source file:cs.ucy.ac.cy.osslicense.model.editor.visualizer.LicenseVisualizer.java
public void displayLicenseGraph() { Transformer<String, Paint> vertexColor = new Transformer<String, Paint>() { public Paint transform(String licenseTerm) { if (licenseTerm.contains("May")) return Color.GREEN; if (licenseTerm.contains("Must")) return Color.ORANGE; if (licenseTerm.equals("LimitedLiability") || licenseTerm.equals("ProvideWithoutWarranty")) return Color.CYAN; return Color.YELLOW; }//from w w w .java 2 s .co m }; Layout<String, Edge> layout = new CircleLayout<String, Edge>(this.licenseGraph); layout.setSize(new Dimension(1024, 768)); VisualizationViewer<String, Edge> vv = new VisualizationViewer<String, Edge>(layout); vv.setPreferredSize(new Dimension(1024, 768)); vv.getRenderContext().setVertexFillPaintTransformer(vertexColor); vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller<String>()); vv.getRenderContext().setEdgeLabelTransformer(new ToStringLabeller<Edge>()); AbstractModalGraphMouse gm = new DefaultModalGraphMouse<String, Edge>(); vv.setGraphMouse(gm); LicenseTermPopupMenu<String, Edge> popupMenu = new LicenseTermPopupMenu<>(licenseModel); gm.add(popupMenu); JFrame frame = new JFrame("Interactive Graph View 1"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(vv); frame.pack(); frame.setVisible(true); }