| 
 | JSR-62 (Final) | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
  |
  +--java.awt.Graphics
        |
        +--java.awt.Graphics2D
This Graphics2D class extends the
 Graphics class to provide more sophisticated
 control over
 graphics operations.
 
Graphics2D rendering attributes are:
 Composite
 AlphaComposite.SRC_OVER rule.
 | Constructor Summary | |
| protected  | Graphics2D()Constructs a new Graphics2Dobject. | 
| Method Summary | |
| abstract  Composite | getComposite()Returns the current Compositein theGraphics2Dcontext. | 
| abstract  GraphicsConfiguration | getDeviceConfiguration()Returns the device configuration associated with this Graphics2D. | 
| abstract  void | setComposite(Composite comp)Sets the Compositefor theGraphics2Dcontext. | 
| Methods inherited from class java.awt.Graphics | 
| clearRect, clipRect, copyArea, create, create, dispose, draw3DRect, drawArc, drawBytes, drawChars, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawLine, drawOval, drawPolygon, drawPolygon, drawPolyline, drawRect, drawRoundRect, drawString, fill3DRect, fillArc, fillOval, fillPolygon, fillPolygon, fillRect, fillRoundRect, finalize, getClip, getClipBounds, getClipBounds, getClipRect, getColor, getFont, getFontMetrics, getFontMetrics, hitClip, setClip, setClip, setColor, setFont, setPaintMode, setXORMode, toString, translate | 
| Methods inherited from class java.lang.Object | 
| clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
protected Graphics2D()
Graphics2D object.  Since 
 Graphics2D is an abstract class, and since it must be
 customized by subclasses for different output devices,
 Graphics2D objects cannot be created directly.
 Instead, Graphics2D objects must be obtained from another 
 Graphics2D object, created by a 
 Component, or obtained from images such as
 BufferedImage objects.
Component.getGraphics(), 
Graphics.create()| Method Detail | 
public abstract GraphicsConfiguration getDeviceConfiguration()
Graphics2D.
public abstract void setComposite(Composite comp)
Composite for the Graphics2D context.
 The Composite is used in all drawing methods such as 
 drawImage, drawString, draw,
 and fill.  It specifies how new pixels are to be combined 
 with the existing pixels on the graphics device during the rendering 
 process.
 
 
 Note: This operation is subject to
 restriction
 in this Profile.  If the Composite is a
 custom object rather than an
 instance of the AlphaComposite class then
 IllegalArgumentException is thrown.
comp - the Composite object to be used for rendering
IllegalArgumentException - If comp is not
 an instance of AlphaComposite.AlphaCompositepublic abstract Composite getComposite()
Composite in the
 Graphics2D context.
Graphics2D Composite,
              which defines a compositing style.setComposite(java.awt.Composite)| 
 | JSR-62 (Final) | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||