APIdia Launch Partner
Top Fields Constructors Methods
sun.print

public final Class PrinterGraphicsConfig

extends GraphicsConfiguration
Class Inheritance
Imports
java.awt.GraphicsConfiguration, .GraphicsDevice, .Rectangle, .Transparency, java.awt.geom.AffineTransform, java.awt.image.BufferedImage, .ColorModel, .DirectColorModel

Field Summary

Modifier and TypeField and Description
private final GraphicsDevice
private final AffineTransform
private final int
private final int
pack-priv static ColorModel

Constructor Summary

AccessConstructor and Description
public
PrinterGraphicsConfig(String printerID, AffineTransform deviceTx, int pageWid, int pageHgt)

Method Summary

Modifier and TypeMethod and Description
public Rectangle
getBounds()

Implements abstract java.awt.GraphicsConfiguration.getBounds.

Returns the bounds of the GraphicsConfiguration in the device coordinates.

public ColorModel
getColorModel()

Implements abstract java.awt.GraphicsConfiguration.getColorModel.

Returns the color model associated with this configuration.

public ColorModel
getColorModel(int transparency)

Implements abstract java.awt.GraphicsConfiguration.getColorModel.

Returns the color model associated with this configuration that supports the specified transparency.

public AffineTransform
getDefaultTransform()

Implements abstract java.awt.GraphicsConfiguration.getDefaultTransform.

Returns the default Transform for this configuration.

public GraphicsDevice
getDevice()

Implements abstract java.awt.GraphicsConfiguration.getDevice.

Return the graphics device associated with this configuration.

public AffineTransform
getNormalizingTransform()

Implements abstract java.awt.GraphicsConfiguration.getNormalizingTransform.

Returns a Transform that can be composed with the default Transform of a Graphics2D so that 72 units in user space will equal 1 inch in device space.

Inherited from java.awt.GraphicsConfiguration:
createCompatibleImagecreateCompatibleImagecreateCompatibleVolatileImagecreateCompatibleVolatileImagecreateCompatibleVolatileImagecreateCompatibleVolatileImagegetBufferCapabilitiesgetImageCapabilitiesisTranslucencyCapable

Field Detail

deviceback to summary
private final GraphicsDevice device
deviceTransformback to summary
private final AffineTransform deviceTransform
pageHeightback to summary
private final int pageHeight
pageWidthback to summary
private final int pageWidth
theModelback to summary
pack-priv static ColorModel theModel

Constructor Detail

PrinterGraphicsConfigback to summary
public PrinterGraphicsConfig(String printerID, AffineTransform deviceTx, int pageWid, int pageHgt)

Method Detail

getBoundsback to summary
public Rectangle getBounds()

Implements abstract java.awt.GraphicsConfiguration.getBounds.

Doc from java.awt.GraphicsConfiguration.getBounds.

Returns the bounds of the GraphicsConfiguration in the device coordinates. In a multi-screen environment with a virtual device, the bounds can have negative X or Y origins.

Annotations
@Override
getColorModelback to summary
public ColorModel getColorModel()

Implements abstract java.awt.GraphicsConfiguration.getColorModel.

Returns the color model associated with this configuration.

Annotations
@Override
getColorModelback to summary
public ColorModel getColorModel(int transparency)

Implements abstract java.awt.GraphicsConfiguration.getColorModel.

Returns the color model associated with this configuration that supports the specified transparency.

Annotations
@Override
getDefaultTransformback to summary
public AffineTransform getDefaultTransform()

Implements abstract java.awt.GraphicsConfiguration.getDefaultTransform.

Returns the default Transform for this configuration. This Transform is typically the Identity transform for most normal screens. Device coordinates for screen and printer devices will have the origin in the upper left-hand corner of the target region of the device, with X coordinates increasing to the right and Y coordinates increasing downwards. For image buffers, this Transform will be the Identity transform.

Annotations
@Override
getDeviceback to summary
public GraphicsDevice getDevice()

Implements abstract java.awt.GraphicsConfiguration.getDevice.

Return the graphics device associated with this configuration.

Annotations
@Override
getNormalizingTransformback to summary
public AffineTransform getNormalizingTransform()

Implements abstract java.awt.GraphicsConfiguration.getNormalizingTransform.

Returns a Transform that can be composed with the default Transform of a Graphics2D so that 72 units in user space will equal 1 inch in device space. Given a Graphics2D, g, one can reset the transformation to create such a mapping by using the following pseudocode:

     GraphicsConfiguration gc = g.getGraphicsConfiguration();

     g.setTransform(gc.getDefaultTransform());
     g.transform(gc.getNormalizingTransform());
Note that sometimes this Transform will be identity (e.g. for printers or metafile output) and that this Transform is only as accurate as the information supplied by the underlying system. For image buffers, this Transform will be the Identity transform, since there is no valid distance measurement.
Annotations
@Override