APIdia Launch Partner
Top Description Fields Constructors Methods
sun.print

public Class PeekMetrics

extends Object
Class Inheritance
Imports
java.awt.AlphaComposite, .Color, .Composite, .Graphics2D, .Image, .Paint, java.awt.font.TextLayout, java.awt.image.RenderedImage, java.awt.image.renderable.RenderableImage

Maintain information about the type of drawing performed by a printing application.

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
private boolean
private boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
checkAlpha(Composite composite)

Record information about drawing done with the supplied Composite.

private void
checkDrawingMode(Graphics2D g)

Record information about the current paint and composite.

private void
checkPaint(Paint paint)

Record information about drawing done with the supplied Paint.

public void
clear(Graphics2D g)

The application is performing a clearRect so record the needed information.

public void
draw(Graphics2D g)

The application is performing a draw so record the needed information.

public void
drawImage(Graphics2D g, Image image)

The application is drawing the passed in image.

public void
drawImage(Graphics2D g, RenderedImage image)

The application is drawing the passed in image.

public void
drawImage(Graphics2D g, RenderableImage image)

The application is drawing the passed in image.

public void
drawText(Graphics2D g)

The application is drawing text so record the needed information.

public void
drawText(Graphics2D g, TextLayout textLayout)

The application is drawing text defined by TextLayout so record the needed information.

public void
fill(Graphics2D g)

The application is performing a fill so record the needed information.

public boolean
hasCompositing()

Return true if the application has done any drawing with an alpha other than 1.0.

public boolean
hasImages()

Return true if the application has drawn any images.

public boolean
hasNonSolidColors()

Return true if the application has done any drawing with a Paint that is not an instance of Color

public boolean
hasText()

Return true if the application has drawn any text.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mHasCompositingback to summary
private boolean mHasCompositing
mHasImagesback to summary
private boolean mHasImages
mHasNonSolidColorsback to summary
private boolean mHasNonSolidColors
mHasTextback to summary
private boolean mHasText

Constructor Detail

PeekMetricsback to summary
public PeekMetrics()

Method Detail

checkAlphaback to summary
private void checkAlpha(Composite composite)

Record information about drawing done with the supplied Composite.

checkDrawingModeback to summary
private void checkDrawingMode(Graphics2D g)

Record information about the current paint and composite.

checkPaintback to summary
private void checkPaint(Paint paint)

Record information about drawing done with the supplied Paint.

clearback to summary
public void clear(Graphics2D g)

The application is performing a clearRect so record the needed information.

drawback to summary
public void draw(Graphics2D g)

The application is performing a draw so record the needed information.

drawImageback to summary
public void drawImage(Graphics2D g, Image image)

The application is drawing the passed in image.

drawImageback to summary
public void drawImage(Graphics2D g, RenderedImage image)

The application is drawing the passed in image.

drawImageback to summary
public void drawImage(Graphics2D g, RenderableImage image)

The application is drawing the passed in image.

drawTextback to summary
public void drawText(Graphics2D g)

The application is drawing text so record the needed information.

drawTextback to summary
public void drawText(Graphics2D g, TextLayout textLayout)

The application is drawing text defined by TextLayout so record the needed information.

fillback to summary
public void fill(Graphics2D g)

The application is performing a fill so record the needed information.

hasCompositingback to summary
public boolean hasCompositing()

Return true if the application has done any drawing with an alpha other than 1.0.

hasImagesback to summary
public boolean hasImages()

Return true if the application has drawn any images.

hasNonSolidColorsback to summary
public boolean hasNonSolidColors()

Return true if the application has done any drawing with a Paint that is not an instance of Color

hasTextback to summary
public boolean hasText()

Return true if the application has drawn any text.