org.tigris.gef.base
Class Prefs

java.lang.Object
  extended by org.tigris.gef.base.Prefs

public class Prefs
extends java.lang.Object

This class contains preferences that control the behavior of the editor to make it the way that the user likes it. Needs-More-Work: more of the frame-rate could be self-adusting, not a preference. Needs-More-Work: more of this should move into RedrawManager.


Field Summary
protected  boolean _printBackground
          True if background Layers should appear in printouts.
protected  boolean _printGrid
          True if LayerGrid should appear in printouts.
 
Constructor Summary
Prefs()
          Construct a new Prefs instance
 
Method Summary
 java.awt.Color getHandleColor()
           
 java.awt.Color getHighlightColor()
          The color of the highlight shown to draw the users attention
 java.awt.Color getLockedHandleColor()
           
 boolean getPrintBackground()
           
 boolean getPrintGrid()
           
 java.awt.Color getRubberbandColor()
          Reply the color that should be used for rubberband lines.
 boolean getTryOffScreen()
          Should off screen images be used to reduce flicker?
 java.awt.Color handleColorFor(Fig f)
          The color of the handles used to manipulate Fig's
 void lastRedrawTime(long t)
          Set the last redraw time.
 void setHandleColor(java.awt.Color c)
          The color of the handles used to manipulate Fig's
 void setHighlightColor(java.awt.Color c)
          The color of the highlight shown to draw the users attention
 void setLockedHandleColor(java.awt.Color c)
          The color of the handles used to manipulate Fig's
 void setPrintBackground(boolean b)
           
 void setPrintGrid(boolean b)
           
 void setRedrawTimeThreshold(long t)
          if the time between redraws gets longer than this threshold, then switch to a faster redrawing method, at the expense of quality and/or flicker
 void setTryOffScreen(boolean b)
          Should off screen images be used to reduce flicker? This is not the default behavior because some (beta) versions of WWW browsers do not handle off screen images well.
 boolean shouldPaintOffScreen()
          Determine if the next redraw should be done on screen or offscreen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_printGrid

protected boolean _printGrid
True if LayerGrid should appear in printouts.


_printBackground

protected boolean _printBackground
True if background Layers should appear in printouts.

Constructor Detail

Prefs

public Prefs()
Construct a new Prefs instance

Method Detail

getRubberbandColor

public java.awt.Color getRubberbandColor()
Reply the color that should be used for rubberband lines.


handleColorFor

public java.awt.Color handleColorFor(Fig f)
The color of the handles used to manipulate Fig's


setHandleColor

public void setHandleColor(java.awt.Color c)
The color of the handles used to manipulate Fig's


getHandleColor

public java.awt.Color getHandleColor()

setLockedHandleColor

public void setLockedHandleColor(java.awt.Color c)
The color of the handles used to manipulate Fig's


getLockedHandleColor

public java.awt.Color getLockedHandleColor()

getHighlightColor

public java.awt.Color getHighlightColor()
The color of the highlight shown to draw the users attention


setHighlightColor

public void setHighlightColor(java.awt.Color c)
The color of the highlight shown to draw the users attention


getPrintGrid

public boolean getPrintGrid()

setPrintGrid

public void setPrintGrid(boolean b)

getPrintBackground

public boolean getPrintBackground()

setPrintBackground

public void setPrintBackground(boolean b)

lastRedrawTime

public void lastRedrawTime(long t)
Set the last redraw time. Called from a RedrawManager. Should this be inside RedrawManager? What if there are multiple RedrawManager's?


setRedrawTimeThreshold

public void setRedrawTimeThreshold(long t)
if the time between redraws gets longer than this threshold, then switch to a faster redrawing method, at the expense of quality and/or flicker


setTryOffScreen

public void setTryOffScreen(boolean b)
Should off screen images be used to reduce flicker? This is not the default behavior because some (beta) versions of WWW browsers do not handle off screen images well.


getTryOffScreen

public boolean getTryOffScreen()
Should off screen images be used to reduce flicker?


shouldPaintOffScreen

public boolean shouldPaintOffScreen()
Determine if the next redraw should be done on screen or offscreen. If the last redraw was fast, then try this one with less flicker. Needs-More-Work: this code should be in RedrawManager.