org.icepdf.core.util
Class GraphicsRenderingHints

java.lang.Object
  extended by org.icepdf.core.util.GraphicsRenderingHints

public class GraphicsRenderingHints
extends java.lang.Object

The GraphicsRenderingHints class provides a central place for storing Java2D rendering hints settings. The GraphicsRenderingHints object is used to apply different rendering hints for printing and screen presentation when rending a Page's content.

The "screen" and "print" configuration are configurable with system properties. See the ICEpdf Developer's Guide for more information about configuring these properites.

Since:
2.0
Author:
Mark Collette

Field Summary
static int PRINT
          Constant used to specify rendering hint specific to print rendering.
static int SCREEN
          Constant used to specify rendering hint specific to screen rendering.
 
Method Summary
static GraphicsRenderingHints getDefault()
          Gets the singleton representation of this object.
 java.awt.Color getPageBackgroundColor(int hintType)
           
 java.awt.RenderingHints getRenderingHints(int hintType)
          Gets the rendering hints for either the SCREEN or PRINT mode.
 void reset()
          Rereads the system properties responsible for setting the rendering hints for both the PRINT and SCREEN modes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCREEN

public static final int SCREEN
Constant used to specify rendering hint specific to screen rendering.

See Also:
Constant Field Values

PRINT

public static final int PRINT
Constant used to specify rendering hint specific to print rendering.

See Also:
Constant Field Values
Method Detail

getDefault

public static GraphicsRenderingHints getDefault()
Gets the singleton representation of this object.

Returns:
a reference to the singleton GraphicsRenderingHints object.

getRenderingHints

public java.awt.RenderingHints getRenderingHints(int hintType)
Gets the rendering hints for either the SCREEN or PRINT mode.

Parameters:
hintType - SCREEN or PRINT, if incorrectly specified PRINT settings are returned.
Returns:
RenderingHints used by Java2D graphics context.

getPageBackgroundColor

public java.awt.Color getPageBackgroundColor(int hintType)

reset

public void reset()
Rereads the system properties responsible for setting the rendering hints for both the PRINT and SCREEN modes.