com.partnersoft.preferences.model
Class GraphicsPreferences

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

public class GraphicsPreferences
extends AbstractSubsystemPreferences

SubsystemPreferences for graphics settings, including both Java2D/AWT settings and map rendering settings.

Copyright 2010 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Constructor Summary
GraphicsPreferences(Cog state)
           
 
Method Summary
 Java2dPreferences getJava2dPreferences()
          Specific settings for Java2D rendering engine.
 OpenglPreferences getOpenglPreferences()
          Specific settings for OpenGL rendering engine.
 RenderEngine getRenderer()
          Map rendering engine to use.
 boolean getShowFramerate()
          If true, a framerate display will appear in the bottom right of the map view.
 boolean getShowImageTiles()
          If true, lines are drawn at the boundaries of the underlying image tiles for background image sets such as aerial photos.
 boolean getShowVectorTiles()
          If true, lines are drawn at the boundaries of the underlying vector tiles for published vector sets such as background maps.
 boolean getUseDirectDraw()
          If true, enables the Windows DirectDraw pipeline of Java2D throughout the platform.
 boolean getUseOpenglPipeline()
          If true, enables the OpenGL pipeline of Java2D throughout the platform.
 boolean isAnimated()
          If true, selection and indication animation is enabled.
 void setAnimated(boolean animated)
           
 void setJava2dPreferences(Java2dPreferences java2dPreferences)
           
 void setOpenglPreferences(OpenglPreferences openglPreferences)
           
 void setRenderer(RenderEngine renderer)
           
 void setShowFramerate(boolean showFramerate)
           
 void setShowImageTiles(boolean showImageTiles)
           
 void setShowVectorTiles(boolean showVectorTiles)
           
 void setUseDirectDraw(boolean useDirectDraw)
           
 void setUseOpenglPipeline(boolean useOpenglPipeline)
           
 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

GraphicsPreferences

public GraphicsPreferences(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

getRenderer

public RenderEngine getRenderer()
Map rendering engine to use.


setRenderer

public void setRenderer(RenderEngine renderer)

isAnimated

public boolean isAnimated()
If true, selection and indication animation is enabled. Generally this is good from a user interface perspective, but it does use more CPU and therefore battery, and thus should probably be disabled on slow or battery-powered computers.


setAnimated

public void setAnimated(boolean animated)

getUseDirectDraw

public boolean getUseDirectDraw()
If true, enables the Windows DirectDraw pipeline of Java2D throughout the platform. This affects not just the map view but all Java user interface components. Generally this is a good thing but since it uses video hardware at a lower level has been known to cause blue screen crashes on rare machines. If you have weird video problems this may be a good thing to turn off.

If in doubt, leaving this off is safe.


setUseDirectDraw

public void setUseDirectDraw(boolean useDirectDraw)

getUseOpenglPipeline

public boolean getUseOpenglPipeline()
If true, enables the OpenGL pipeline of Java2D throughout the platform. This affects not just the map view but all Java user interface components. It does not imply OpenGL rendering; you can use the Java2D rendering engine on top of the OpenGL pipeline - Java2D is then using OpenGL as its hardware rendering layer without affecting the way we use Java2D.

Like the useDirectDraw switch, this may cause instability on machines with poor video hardware or drivers. It may also interact strangely with Java2D, the Java2D rendering engine, or even the OpenGL rendering engine; the exact behaviors and effects on performance are highly machine dependent.

If in doubt, leaving this off is safe.


setUseOpenglPipeline

public void setUseOpenglPipeline(boolean useOpenglPipeline)

getShowFramerate

public boolean getShowFramerate()
If true, a framerate display will appear in the bottom right of the map view. This displays the average framerate in frames/second over the last 1000 renders. The timings are based on the map rendering portion alone and may not match actual video hardware frames or other overheads. However, it's a decent way to determine the effects of changes to video settings or translator configuration, or roughly compare computer performance.


setShowFramerate

public void setShowFramerate(boolean showFramerate)

getShowImageTiles

public boolean getShowImageTiles()
If true, lines are drawn at the boundaries of the underlying image tiles for background image sets such as aerial photos. This is a debugging switch, useful when trying to troubleshoot or tune image sets.


setShowImageTiles

public void setShowImageTiles(boolean showImageTiles)

getShowVectorTiles

public boolean getShowVectorTiles()
If true, lines are drawn at the boundaries of the underlying vector tiles for published vector sets such as background maps. This is a debugging switch, useful when trying to troubleshoot or tune legends, zooms, and levels-of-detail.


setShowVectorTiles

public void setShowVectorTiles(boolean showVectorTiles)

getJava2dPreferences

public Java2dPreferences getJava2dPreferences()
Specific settings for Java2D rendering engine. These only apply if the renderer is JAVA2D.


setJava2dPreferences

public void setJava2dPreferences(Java2dPreferences java2dPreferences)

getOpenglPreferences

public OpenglPreferences getOpenglPreferences()
Specific settings for OpenGL rendering engine. These only apply if the renderer is OPENGL.


setOpenglPreferences

public void setOpenglPreferences(OpenglPreferences openglPreferences)