List of usage examples for java.awt Color WHITE
Color WHITE
To view the source code for java.awt Color WHITE.
Click Source Link
From source file:org.jfree.chart.demo.XYErrorRendererDemo1.java
private static JFreeChart createChart(IntervalXYDataset intervalxydataset) { NumberAxis numberaxis = new NumberAxis("X"); NumberAxis numberaxis1 = new NumberAxis("Y"); XYErrorRenderer xyerrorrenderer = new XYErrorRenderer(); XYPlot xyplot = new XYPlot(intervalxydataset, numberaxis, numberaxis1, xyerrorrenderer); xyplot.setBackgroundPaint(Color.lightGray); xyplot.setDomainGridlinePaint(Color.white); xyplot.setRangeGridlinePaint(Color.white); JFreeChart jfreechart = new JFreeChart("XYErrorRenderer Demo 1", xyplot); jfreechart.setBackgroundPaint(Color.white); return jfreechart; }
From source file:Main.java
public Main() { setBackground(Color.white); }
From source file:org.jfree.chart.demo.GradientPaintTransformerDemo1.java
private static JFreeChart createChart(String s, CategoryDataset categorydataset) { JFreeChart jfreechart = ChartFactory.createBarChart(s, null, "Value", categorydataset, PlotOrientation.VERTICAL, true, true, false); jfreechart.setBackgroundPaint(Color.white); CategoryPlot categoryplot = (CategoryPlot) jfreechart.getPlot(); categoryplot.setBackgroundPaint(Color.lightGray); categoryplot.setDomainGridlinePaint(Color.white); categoryplot.setRangeGridlinePaint(Color.white); categoryplot.setAxisOffset(new RectangleInsets(5D, 5D, 5D, 5D)); BarRenderer barrenderer = (BarRenderer) categoryplot.getRenderer(); barrenderer.setItemMargin(0.02D);//from www . ja v a 2s . co m return jfreechart; }
From source file:Main.java
public void paint(Graphics g) { int w = getSize().width; int midW = w / 2; g.drawString("XOR Mode", 0, 30); g.drawOval(7, 37, 50, 50);// w w w . jav a 2s . c om g.setXORMode(Color.white); for (int i = 0; i < 15; i += 3) { g.drawOval(10 + i, 40 + i, 50, 50); } g.setPaintMode(); g.drawString("Paint Mode", midW, 30); g.drawOval(midW + 7, 37, 50, 50); for (int i = 0; i < 15; i += 3) { g.drawOval(midW + 10 + i, 40 + i, 50, 50); } }
From source file:Main.java
public Main() { setSize(200, 150);/*from w w w . j a v a2 s .co m*/ setDefaultCloseOperation(EXIT_ON_CLOSE); JLayeredPane lp = getLayeredPane(); JButton top = new JButton(); top.setBackground(Color.white); top.setBounds(20, 20, 50, 50); JButton middle = new JButton(); middle.setBackground(Color.gray); middle.setBounds(40, 40, 50, 50); JButton bottom = new JButton(); bottom.setBackground(Color.black); bottom.setBounds(60, 60, 50, 50); lp.add(middle, new Integer(2)); lp.add(top, new Integer(3)); lp.add(bottom, new Integer(1)); setVisible(true); }
From source file:MainClass.java
public void paint(Graphics g) { int w = getSize().width; int midW = w / 2; g.drawString("XOR Mode", 0, 30); g.drawOval(7, 37, 50, 50);/*from w ww . j a v a 2 s . c om*/ g.setXORMode(Color.white); for (int i = 0; i < 15; i += 3) { g.drawOval(10 + i, 40 + i, 50, 50); } g.setPaintMode(); g.drawString("Paint Mode", midW, 30); g.drawOval(midW + 7, 37, 50, 50); for (int i = 0; i < 15; i += 3) { g.drawOval(midW + 10 + i, 40 + i, 50, 50); } }
From source file:br.unicamp.cst.util.ChartViewerUtil.java
public static synchronized ChartPanel createChart(DefaultCategoryDataset dataset, String title, String categoryAxisLabel, String valueAxisLabel, PlotOrientation chartType) { final JFreeChart chart = ChartFactory.createBarChart(title, categoryAxisLabel, valueAxisLabel, dataset, chartType, true, true, false); final CategoryPlot plot = chart.getCategoryPlot(); plot.setBackgroundPaint(Color.lightGray); plot.setDomainGridlinePaint(Color.white); plot.setRangeGridlinePaint(Color.white); chart.setBackgroundPaint(Color.lightGray); ChartPanel localChartPanel = new ChartPanel(chart); localChartPanel.setVisible(true);// w w w .j av a 2 s.c o m localChartPanel.setDomainZoomable(true); return localChartPanel; }
From source file:org.jfree.chart.demo.CompassDemo1.java
private static JFreeChart createChart(ValueDataset valuedataset) { CompassPlot compassplot = new CompassPlot(valuedataset); compassplot.setSeriesNeedle(7);/* w w w . j a v a2 s . c om*/ compassplot.setSeriesPaint(0, Color.black); compassplot.setSeriesOutlinePaint(0, Color.black); compassplot.setRosePaint(Color.red); compassplot.setRoseHighlightPaint(Color.gray); compassplot.setRoseCenterPaint(Color.white); compassplot.setDrawBorder(false); JFreeChart jfreechart = new JFreeChart(compassplot); return jfreechart; }
From source file:ThickStrokeDemo.java
public void init() { setBackground(Color.white); }
From source file:org.jfree.chart.demo.XYBarChartDemo7.java
private static JFreeChart createChart(IntervalXYDataset intervalxydataset) { JFreeChart jfreechart = ChartFactory.createXYBarChart("XYBarChartDemo7", "Date", true, "Y", intervalxydataset, PlotOrientation.VERTICAL, true, false, false); jfreechart.setBackgroundPaint(Color.white); XYPlot xyplot = (XYPlot) jfreechart.getPlot(); xyplot.setDomainAxis(new DateAxis("Date")); SymbolAxis symbolaxis = new SymbolAxis("Series", new String[] { "S1", "S2", "S3" }); symbolaxis.setGridBandsVisible(false); xyplot.setRangeAxis(symbolaxis);//from w ww . j a va 2s . c om XYBarRenderer xybarrenderer = (XYBarRenderer) xyplot.getRenderer(); xybarrenderer.setUseYInterval(true); xyplot.setBackgroundPaint(Color.lightGray); xyplot.setDomainGridlinePaint(Color.white); xyplot.setRangeGridlinePaint(Color.white); return jfreechart; }