com.partnersoft.preferences.model
Class Java2dPreferences

java.lang.Object
  extended by com.partnersoft.preferences.model.AbstractSubsystemPreferences
      extended by com.partnersoft.preferences.model.Java2dPreferences
All Implemented Interfaces:
Coggable, SubsystemPreferences

public class Java2dPreferences
extends AbstractSubsystemPreferences

Specific preferences controlling Java2D rendering behavior.

If renderQuality is set to CUSTOM, then the other switches apply; otherwise they do not.

The custom behavior switches are extremely detailed and designed to match exactly to real Java2D features. So, they are pretty technical.

Copyright 2010 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Constructor Summary
Java2dPreferences()
           
Java2dPreferences(Cog state)
           
 
Method Summary
 boolean getAntialiasFonts()
          If true, fonts will be antialiased.
 boolean getAntialiasLines()
          If true, lines will be antialiased.
 RenderingHint getRenderingHint()
          These specify the general hints given to the underlying rendering engine.
 RenderQuality getRenderQuality()
          Render quality preset to use.
 boolean getUseFractionalMetrics()
          Fractional metrics are used in font rendering to improve the quality, especially for rotated text.
 void setAntialiasFonts(boolean antialiasFonts)
           
 void setAntialiasLines(boolean antialiasLines)
           
 void setRenderingHint(RenderingHint renderingHint)
           
 void setRenderQuality(RenderQuality renderQuality)
           
 void setUseFractionalMetrics(boolean useFractionalMetrics)
           
 Cog toCog()
          Returns the complete internal state of this object in the form of a Cog.
 
Methods inherited from class com.partnersoft.preferences.model.AbstractSubsystemPreferences
getName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Java2dPreferences

public Java2dPreferences()

Java2dPreferences

public Java2dPreferences(Cog state)
Method Detail

toCog

public Cog toCog()
Description copied from interface: Coggable
Returns the complete internal state of this object in the form of a Cog.

Specified by:
toCog in interface Coggable
Overrides:
toCog in class AbstractSubsystemPreferences
Returns:
Cog representing the internal state of this object

getRenderQuality

public RenderQuality getRenderQuality()
Render quality preset to use. If CUSTOM is specified, the other values in this object are used as custom configuration; otherwise the appropriate presets are used and the other values in this object are ignored.


setRenderQuality

public void setRenderQuality(RenderQuality renderQuality)

getAntialiasLines

public boolean getAntialiasLines()
If true, lines will be antialiased. Generally this makes diagonal lines look better (fewer "jaggies") at the expense of speed, but on modern hardware may be just as fast as not.


setAntialiasLines

public void setAntialiasLines(boolean antialiasLines)

getAntialiasFonts

public boolean getAntialiasFonts()
If true, fonts will be antialiased. Generally this makes diagonal lines look better (fewer "jaggies") at the expense of speed, but on modern hardware may be just as fast as not.


setAntialiasFonts

public void setAntialiasFonts(boolean antialiasFonts)

getUseFractionalMetrics

public boolean getUseFractionalMetrics()
Fractional metrics are used in font rendering to improve the quality, especially for rotated text. Generally if this is true text will look better but rendering will be slower, but performance heavily depends on the hardware in question.


setUseFractionalMetrics

public void setUseFractionalMetrics(boolean useFractionalMetrics)

getRenderingHint

public RenderingHint getRenderingHint()
These specify the general hints given to the underlying rendering engine. These may or may not get used, but may affect e.g. the quality of antialiasing used, etc.


setRenderingHint

public void setRenderingHint(RenderingHint renderingHint)