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:edu.cuny.cat.ui.UIUtils.java
public static void setDefaultLineAndShapeRendererStyle(LineAndShapeRenderer lsRenderer) { lsRenderer.setBaseShapesVisible(true); lsRenderer.setDrawOutlines(true);// w w w . j a va 2 s . c o m lsRenderer.setBaseItemLabelsVisible(true); lsRenderer.setBaseLinesVisible(true); lsRenderer.setUseFillPaint(true); lsRenderer.setBaseFillPaint(Color.white); }
From source file:org.jfree.chart.demo.XYBlockChartDemo1.java
private static JFreeChart createChart(XYZDataset xyzdataset) { NumberAxis numberaxis = new NumberAxis("X"); numberaxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); numberaxis.setLowerMargin(0.0D);//w w w .j a v a 2 s. com numberaxis.setUpperMargin(0.0D); numberaxis.setAxisLinePaint(Color.white); numberaxis.setTickMarkPaint(Color.white); NumberAxis numberaxis1 = new NumberAxis("Y"); numberaxis1.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); numberaxis1.setLowerMargin(0.0D); numberaxis1.setUpperMargin(0.0D); numberaxis1.setAxisLinePaint(Color.white); numberaxis1.setTickMarkPaint(Color.white); XYBlockRenderer xyblockrenderer = new XYBlockRenderer(); GrayPaintScale graypaintscale = new GrayPaintScale(-2D, 1.0D); xyblockrenderer.setPaintScale(graypaintscale); XYPlot xyplot = new XYPlot(xyzdataset, numberaxis, numberaxis1, xyblockrenderer); xyplot.setBackgroundPaint(Color.lightGray); xyplot.setDomainGridlinesVisible(false); xyplot.setRangeGridlinePaint(Color.white); xyplot.setAxisOffset(new RectangleInsets(5D, 5D, 5D, 5D)); xyplot.setOutlinePaint(Color.blue); JFreeChart jfreechart = new JFreeChart("XYBlockChartDemo1", xyplot); jfreechart.removeLegend(); NumberAxis numberaxis2 = new NumberAxis("Scale"); numberaxis2.setAxisLinePaint(Color.white); numberaxis2.setTickMarkPaint(Color.white); numberaxis2.setTickLabelFont(new Font("Dialog", 0, 7)); PaintScaleLegend paintscalelegend = new PaintScaleLegend(new GrayPaintScale(), numberaxis2); paintscalelegend.setAxisLocation(AxisLocation.BOTTOM_OR_LEFT); paintscalelegend.setAxisOffset(5D); paintscalelegend.setMargin(new RectangleInsets(5D, 5D, 5D, 5D)); paintscalelegend.setFrame(new BlockBorder(Color.red)); paintscalelegend.setPadding(new RectangleInsets(10D, 10D, 10D, 10D)); paintscalelegend.setStripWidth(10D); paintscalelegend.setPosition(RectangleEdge.RIGHT); paintscalelegend.setBackgroundPaint(new Color(120, 120, 180)); jfreechart.addSubtitle(paintscalelegend); jfreechart.setBackgroundPaint(new Color(180, 180, 250)); return jfreechart; }
From source file:org.jfree.chart.demo.MultipleAxisDemo4.java
private static JFreeChart createChart() { XYDataset xydataset = createDataset("March 2007", 100D, new Day(1, 3, 2007), 31); JFreeChart jfreechart = ChartFactory.createTimeSeriesChart("Multiple Axis Demo 4", "Date", "Value", xydataset, true, true, false); jfreechart.setBackgroundPaint(Color.white); XYPlot xyplot = (XYPlot) jfreechart.getPlot(); xyplot.setOrientation(PlotOrientation.VERTICAL); xyplot.setBackgroundPaint(Color.lightGray); xyplot.setDomainGridlinePaint(Color.white); xyplot.setRangeGridlinePaint(Color.white); xyplot.setAxisOffset(new RectangleInsets(5D, 5D, 5D, 5D)); DateAxis dateaxis = (DateAxis) xyplot.getDomainAxis(); dateaxis.setDateFormatOverride(new SimpleDateFormat("d-MMM-yyyy")); XYItemRenderer xyitemrenderer = xyplot.getRenderer(); xyitemrenderer.setSeriesPaint(0, Color.red); NumberAxis numberaxis = (NumberAxis) xyplot.getRangeAxis(); numberaxis.setTickLabelPaint(Color.red); DateAxis dateaxis1 = new DateAxis("Date"); dateaxis1.setDateFormatOverride(new SimpleDateFormat("d-MMM-yyyy")); xyplot.setDomainAxis(1, dateaxis1);/* www . ja v a2 s . com*/ xyplot.setDomainAxisLocation(1, AxisLocation.TOP_OR_LEFT); NumberAxis numberaxis1 = new NumberAxis("Value"); numberaxis1.setAutoRangeIncludesZero(false); numberaxis1.setTickLabelPaint(Color.blue); xyplot.setRangeAxis(1, numberaxis1); xyplot.setRangeAxisLocation(1, AxisLocation.BOTTOM_OR_RIGHT); XYDataset xydataset1 = createDataset("July 2007", 1000D, new Day(1, 7, 2007), 31); xyplot.setDataset(1, xydataset1); xyplot.mapDatasetToDomainAxis(1, 1); xyplot.mapDatasetToRangeAxis(1, 1); XYLineAndShapeRenderer xylineandshaperenderer = new XYLineAndShapeRenderer(true, false); xylineandshaperenderer.setSeriesPaint(0, Color.blue); xyplot.setRenderer(1, xylineandshaperenderer); return jfreechart; }
From source file:Main.java
public Main() { mainPanel.setLayout(cardlayout);/*from ww w .j av a2 s. c o m*/ mainPanel.setBackground(Color.white); addCard("A"); addCard("B"); addCard("C"); addCard("D"); menuBar.add(menu); }
From source file:Main.java
public Main() { super("JLayeredPane Demo"); setSize(256, 256);/*w w w . j av a 2 s . co m*/ JPanel content = new JPanel(); content.setLayout(new BoxLayout(content, BoxLayout.Y_AXIS)); content.setOpaque(false); JLabel label1 = new JLabel("Username:"); label1.setForeground(Color.white); content.add(label1); JTextField field = new JTextField(15); content.add(field); JLabel label2 = new JLabel("Password:"); label2.setForeground(Color.white); content.add(label2); JPasswordField fieldPass = new JPasswordField(15); content.add(fieldPass); setLayout(new FlowLayout()); add(content); ((JPanel) getContentPane()).setOpaque(false); ImageIcon earth = new ImageIcon("largeJava2sLogo.png"); JLabel backlabel = new JLabel(earth); getLayeredPane().add(backlabel, new Integer(Integer.MIN_VALUE)); backlabel.setBounds(0, 0, earth.getIconWidth(), earth.getIconHeight()); super.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setVisible(true); }
From source file:MainClass.java
public void paint(Graphics g) { Graphics2D g2D = (Graphics2D) g; Point2D.Float p1 = new Point2D.Float(150.f, 75.f); Point2D.Float p2 = new Point2D.Float(250.f, 75.f); float width = 300; float height = 50; GradientPaint g1 = new GradientPaint(p1, Color.WHITE, p2, Color.DARK_GRAY, true); Rectangle2D.Float rect1 = new Rectangle2D.Float(p1.x - 100, p1.y - 25, width, height); g2D.setPaint(g1);//w w w . j a v a 2s.c o m g2D.fill(rect1); g2D.setPaint(Color.BLACK); g2D.draw(rect1); g2D.draw(new Line2D.Float(p1, p2)); }
From source file:Main.java
public static BufferedImage drawBoundingBoxes(BufferedImage canvas, Rectangle[] boxes, Color fgColour) { return drawBoundingBoxes(canvas, boxes, fgColour, Color.WHITE); }
From source file:org.jfree.chart.demo.XYSplineRendererDemo1a.java
public static JPanel createDemoPanel() { NumberAxis numberaxis = new NumberAxis("X"); numberaxis.setAutoRangeIncludesZero(false); NumberAxis numberaxis1 = new NumberAxis("Y"); numberaxis1.setAutoRangeIncludesZero(false); XYSplineRenderer xysplinerenderer = new XYSplineRenderer(); XYPlot xyplot = new XYPlot(createSampleData(), numberaxis, numberaxis1, xysplinerenderer); xyplot.setBackgroundPaint(Color.lightGray); xyplot.setDomainGridlinePaint(Color.white); xyplot.setRangeGridlinePaint(Color.white); xyplot.setAxisOffset(new RectangleInsets(4D, 4D, 4D, 4D)); JFreeChart jfreechart = new JFreeChart("XYSplineRenderer", JFreeChart.DEFAULT_TITLE_FONT, xyplot, true); ChartUtilities.applyCurrentTheme(jfreechart); ChartPanel chartpanel = new ChartPanel(jfreechart); return chartpanel; }
From source file:Main.java
public void paint(Graphics g) { Graphics2D g2D = (Graphics2D) g; Point2D.Float p1 = new Point2D.Float(150.f, 75.f); Point2D.Float p2 = new Point2D.Float(250.f, 75.f); float width = 300; float height = 50; GradientPaint g1 = new GradientPaint(p1, Color.WHITE, p2, Color.DARK_GRAY); Rectangle2D.Float rect1 = new Rectangle2D.Float(p1.x - 100, p1.y - 25, width, height); g2D.setPaint(g1);/* w w w . ja va 2 s .co m*/ g2D.fill(rect1); g2D.setPaint(Color.BLACK); g2D.draw(rect1); g2D.draw(new Line2D.Float(p1, p2)); g2D.drawString("Cyclic Gradient Paint", p1.x - 100, p1.y - 50); g2D.drawString("p1", p1.x - 20, p1.y); g2D.drawString("p2", p2.x + 10, p2.y); p1.setLocation(150, 200); p2.setLocation(250, 200); GradientPaint g2 = new GradientPaint(p1, Color.WHITE, p2, Color.DARK_GRAY, false); rect1.setRect(p1.x - 100, p1.y - 25, width, height); g2D.setPaint(g2); g2D.fill(rect1); g2D.setPaint(Color.BLACK); g2D.draw(rect1); g2D.draw(new Line2D.Float(p1, p2)); g2D.drawString("Acyclic Gradient Paint", p1.x - 100, p1.y - 50); g2D.drawString("p1", p1.x - 20, p1.y); g2D.drawString("p2", p2.x + 10, p2.y); }
From source file:MainClass.java
public void paint(Graphics g) { Graphics2D g2D = (Graphics2D) g; Point2D.Float p1 = new Point2D.Float(150.f, 75.f); Point2D.Float p2 = new Point2D.Float(250.f, 75.f); float width = 300; float height = 50; GradientPaint g1 = new GradientPaint(p1, Color.WHITE, p2, Color.DARK_GRAY, true); Rectangle2D.Float rect1 = new Rectangle2D.Float(p1.x - 100, p1.y - 25, width, height); g2D.setPaint(g1);// w ww. ja v a 2 s. c o m g2D.fill(rect1); g2D.setPaint(Color.BLACK); g2D.draw(rect1); g2D.draw(new Line2D.Float(p1, p2)); g2D.drawString("Cyclic Gradient Paint", p1.x - 100, p1.y - 50); g2D.drawString("p1", p1.x - 20, p1.y); g2D.drawString("p2", p2.x + 10, p2.y); p1.setLocation(150, 200); p2.setLocation(250, 200); GradientPaint g2 = new GradientPaint(p1, Color.WHITE, p2, Color.DARK_GRAY, false); rect1.setRect(p1.x - 100, p1.y - 25, width, height); g2D.setPaint(g2); g2D.fill(rect1); g2D.setPaint(Color.BLACK); g2D.draw(rect1); g2D.draw(new Line2D.Float(p1, p2)); g2D.drawString("Acyclic Gradient Paint", p1.x - 100, p1.y - 50); g2D.drawString("p1", p1.x - 20, p1.y); g2D.drawString("p2", p2.x + 10, p2.y); }