List of usage examples for java.awt Color BLACK
Color BLACK
To view the source code for java.awt Color BLACK.
Click Source Link
From source file:Main.java
private static BufferedImage renderRotatedObject(Object src, double angle, int width, int height, double tx, double ty) { BufferedImage dest = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); Graphics2D g2d = (Graphics2D) dest.getGraphics(); g2d.setColor(Color.black); g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); AffineTransform at = AffineTransform.getRotateInstance(angle); at.translate(tx, ty);//ww w . j a v a 2 s . c om g2d.setTransform(at); if (src instanceof TextLayout) { TextLayout tl = (TextLayout) src; tl.draw(g2d, 0, tl.getAscent()); } else if (src instanceof Image) { g2d.drawImage((Image) src, 0, 0, null); } g2d.dispose(); return dest; }
From source file:ColorUtil.java
public static Color getOpposite(Color c) { return isDark(c) ? Color.WHITE : Color.BLACK; }
From source file:OvalPanel.java
License:asdf
public OvalPanel() { this(Color.black); }
From source file:Main.java
public void paint(Graphics g) { g.setColor(Color.BLACK); g.drawString("Applet background example", 0, 50); }
From source file:Main.java
public void paintComponent(Graphics g) { int width = getWidth(); int height = getHeight(); g.setColor(Color.black); g.drawOval(0, 0, width, height);/*from w ww. ja v a 2 s . co m*/ }
From source file:XORPanel.java
XORPanel() {
setBackground(Color.black);
}
From source file:Main.java
public void paint(Graphics g) { Graphics2D g2 = (Graphics2D) g; g2.setPaint(Color.black); g2.setStroke(new BasicStroke(8, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL)); g2.draw(new Ellipse2D.Double(20, 20, 50, 50)); }
From source file:Main.java
public void paint(Graphics g) { Graphics2D g2 = (Graphics2D) g; g2.setPaint(Color.black); g2.setStroke(new BasicStroke()); g2.draw(new Ellipse2D.Double(20, 20, 50, 50)); }
From source file:Main.java
public void paint(Graphics g) { Graphics2D g2 = (Graphics2D) g; g2.setPaint(Color.black); g2.setStroke(new BasicStroke(8)); g2.draw(new Ellipse2D.Double(20, 20, 50, 50)); }
From source file:br.unesp.rc.desafio.utils.Utils.java
public static void createBar(DefaultCategoryDataset dataset) { JFreeChart chart = ChartFactory.createBarChart("Grafico", " ", " ", dataset); CategoryPlot p = chart.getCategoryPlot(); p.setRangeGridlinePaint(Color.black); ChartFrame frame = new ChartFrame("Grafico de BArras", chart); frame.setVisible(true);// www. j av a2s. c o m //frame.setSize(400,350); ManagerGUI.centralizar(frame); }