edu.sdsc.mbt.viewables
Class StylesPreferences

java.lang.Object
  extended byedu.sdsc.mbt.viewables.StylesPreferences

public class StylesPreferences
extends java.lang.Object

This class is a storage and manipulation utility to handle viewing options set through PreferencesDialog. Allows to store current configuration settings from StructureStyles, updating them and saving and restoring configuration from persistent storage.

Author:
Oleksandr V. Buzko
See Also:
StructureStyles, PreferencesDialog

Field Summary
static boolean antialiasing
           
static int ATOMIC_RADIUS
           
static double atomRadiusScale
           
static float[] backgroundColor
          Color of background in 3D viewer
static double ballRadius
           
static int ballRadiusOption
           
static double bondRadiusScale
           
static java.awt.Color cellBackgroundColor
           
static java.awt.Color[] chainColors
           
static float[] COIL_COLOR
           
static boolean commonColoring
           
static boolean commonRibbonColoring
           
static boolean commonSelection
           
static int cpkQuality
           
static double cpkRadiusScale
           
static float cylinderDiameter
           
static java.awt.Color defaultCellBackgroundColor
           
static int defaultLAF
           
static boolean deriveBondOrder
           
static boolean displayToolbar
           
static boolean dockRama
           
static boolean fastGeometry
           
static boolean fogEnabled
           
static float[] HELIX_COLOR
          Variables that define colors of the secondary structure elements.
static float helixThickness
           
static boolean indexedColor
           
static int LAF
           
static double lineWidth
           
static int MAGNIFICATION_MOVE
          Constants that define modes of motion: zooming into a structure by changing the angle of view or physically moving the camera (in the latter case, fog interferes with the motion)
static int MAGNIFICATION_ZOOM
           
static int magnificationMode
           
static int menuFontSize
           
static float[] monitorColor
          Color used to display distance monitors in StructureViewer
static int mouseFactor
           
static int NATIVE_LAF
           
static int POSITION_LEFT
           
static int POSITION_TOP
           
static java.lang.String povrayInstallationDirectoryLinux
           
static java.lang.String povrayInstallationDirectoryWin
           
static boolean renderBondOrder
           
static short RENDERING_BALL_STICK
           
static short RENDERING_BEST
           
static short RENDERING_CPK
           
static short RENDERING_FAST
          Constants that define rendering quality.
static short RENDERING_LINES
          Constants that define structure rendering modes for each atom to allow different rendering of defined structure fragments.
static short RENDERING_RIBBON
           
static short RENDERING_STICK
           
static float renderingBestQuality
           
static float renderingFastQuality
          Numeric values that reflect quality of rendering.
static short renderingMode
           
static int RIBBON_CYLINDER_HELICES
           
static int RIBBON_FLAT_HELICES
           
static int RIBBON_LINE
           
static int RIBBON_RENDERED
           
static int RIBBON_UNIFORM_ROUND
           
static float ribbonDiameter
           
static float ribbonQuality
           
static int ribbonStyle
           
static boolean selectAtomLabel
           
static int SELECTION_ATOM
          Constants that define selection modes.
static int SELECTION_FRAGMENT
           
static int SELECTION_RESIDUE
           
static int SELECTION_STRUCTURE
           
static float[] selectionColor
           
static int selectionMode
          The variable that sets selection level between atom and residue
static java.awt.Color sequenceResidueColor
           
static java.awt.Font sequenceViewerFont
           
static boolean showBondOrder
           
static boolean showBoundWaters
           
static boolean showCellGrid
           
static boolean showResidueTips
           
static boolean showSs
           
static boolean showToolbarTips
           
static int SMOOTH_LAF
           
static boolean smoothRibbon
           
static double sphereRadius
           
static int startupMagnificationMode
           
static short startupRenderingQuality
           
static double stickSize
           
static float[] STRAND_COLOR
           
static int structureColorIndex
           
static java.awt.Color[] structureColors
           
static boolean structureColorSequence
           
static short structureView
           
static int SURFACE_DOT
           
static int SURFACE_MESH
           
static int SURFACE_QUALITY_HIGH
           
static int SURFACE_QUALITY_LOW
           
static int SURFACE_QUALITY_MEDIUM
           
static int SURFACE_QUALITY_ULTRA
           
static int SURFACE_SOLID
           
static boolean toolbarAngle
           
static boolean toolbarCenter
           
static boolean toolbarChanged
           
static boolean toolbarColoring
           
static boolean toolbarCommon
           
static boolean toolbarDihedral
           
static boolean toolbarDistance
           
static boolean toolbarFog
           
static boolean toolbarLabels
           
static boolean toolbarPDB
           
static int toolbarPosition
           
static boolean toolbarRendering
           
static boolean toolbarSeparate
           
static boolean toolbarUndo
           
static boolean toolbarVisibility
           
static float[] TURN_COLOR
           
static int undoBufferDepth
           
static boolean undoEnabled
           
static int UNIFORM_RADIUS
           
static java.lang.String workingDirectory
           
static boolean zoomMiddle
           
 
Constructor Summary
StylesPreferences(java.lang.String location)
           
 
Method Summary
 void exportPreferences(java.io.OutputStream out)
           
static void getSelectionColor(float[] color)
           
 void importPreferences(java.io.InputStream in)
           
 void readPreferences()
           
static void resetStylesDefaults()
          This method uses hard-coded defaults to restore the configuration of the application.
 void writePreferences()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELECTION_ATOM

public static final int SELECTION_ATOM
Constants that define selection modes.

See Also:
Constant Field Values

SELECTION_RESIDUE

public static final int SELECTION_RESIDUE
See Also:
Constant Field Values

SELECTION_FRAGMENT

public static final int SELECTION_FRAGMENT
See Also:
Constant Field Values

SELECTION_STRUCTURE

public static final int SELECTION_STRUCTURE
See Also:
Constant Field Values

POSITION_LEFT

public static final int POSITION_LEFT
See Also:
Constant Field Values

POSITION_TOP

public static final int POSITION_TOP
See Also:
Constant Field Values

RIBBON_LINE

public static final int RIBBON_LINE
See Also:
Constant Field Values

RIBBON_RENDERED

public static final int RIBBON_RENDERED
See Also:
Constant Field Values

RIBBON_CYLINDER_HELICES

public static final int RIBBON_CYLINDER_HELICES
See Also:
Constant Field Values

RIBBON_UNIFORM_ROUND

public static final int RIBBON_UNIFORM_ROUND
See Also:
Constant Field Values

RIBBON_FLAT_HELICES

public static final int RIBBON_FLAT_HELICES
See Also:
Constant Field Values

SURFACE_DOT

public static final int SURFACE_DOT
See Also:
Constant Field Values

SURFACE_MESH

public static final int SURFACE_MESH
See Also:
Constant Field Values

SURFACE_SOLID

public static final int SURFACE_SOLID
See Also:
Constant Field Values

SURFACE_QUALITY_LOW

public static final int SURFACE_QUALITY_LOW
See Also:
Constant Field Values

SURFACE_QUALITY_MEDIUM

public static final int SURFACE_QUALITY_MEDIUM
See Also:
Constant Field Values

SURFACE_QUALITY_HIGH

public static final int SURFACE_QUALITY_HIGH
See Also:
Constant Field Values

SURFACE_QUALITY_ULTRA

public static final int SURFACE_QUALITY_ULTRA
See Also:
Constant Field Values

RENDERING_LINES

public static final short RENDERING_LINES
Constants that define structure rendering modes for each atom to allow different rendering of defined structure fragments.

See Also:
Constant Field Values

RENDERING_STICK

public static final short RENDERING_STICK
See Also:
Constant Field Values

RENDERING_BALL_STICK

public static final short RENDERING_BALL_STICK
See Also:
Constant Field Values

RENDERING_CPK

public static final short RENDERING_CPK
See Also:
Constant Field Values

RENDERING_RIBBON

public static final short RENDERING_RIBBON
See Also:
Constant Field Values

RENDERING_FAST

public static final short RENDERING_FAST
Constants that define rendering quality.

See Also:
Constant Field Values

RENDERING_BEST

public static final short RENDERING_BEST
See Also:
Constant Field Values

ATOMIC_RADIUS

public static final int ATOMIC_RADIUS
See Also:
Constant Field Values

UNIFORM_RADIUS

public static final int UNIFORM_RADIUS
See Also:
Constant Field Values

MAGNIFICATION_MOVE

public static final int MAGNIFICATION_MOVE
Constants that define modes of motion: zooming into a structure by changing the angle of view or physically moving the camera (in the latter case, fog interferes with the motion)

See Also:
Constant Field Values

MAGNIFICATION_ZOOM

public static final int MAGNIFICATION_ZOOM
See Also:
Constant Field Values

SMOOTH_LAF

public static final int SMOOTH_LAF
See Also:
Constant Field Values

NATIVE_LAF

public static final int NATIVE_LAF
See Also:
Constant Field Values

defaultLAF

public static final int defaultLAF
See Also:
Constant Field Values

atomRadiusScale

public static double atomRadiusScale

cpkRadiusScale

public static double cpkRadiusScale

smoothRibbon

public static boolean smoothRibbon

helixThickness

public static float helixThickness

defaultCellBackgroundColor

public static final java.awt.Color defaultCellBackgroundColor

selectionColor

public static float[] selectionColor

backgroundColor

public static float[] backgroundColor
Color of background in 3D viewer


toolbarChanged

public static boolean toolbarChanged

toolbarPDB

public static boolean toolbarPDB

toolbarUndo

public static boolean toolbarUndo

toolbarVisibility

public static boolean toolbarVisibility

toolbarRendering

public static boolean toolbarRendering

toolbarColoring

public static boolean toolbarColoring

toolbarLabels

public static boolean toolbarLabels

toolbarCenter

public static boolean toolbarCenter

toolbarSeparate

public static boolean toolbarSeparate

toolbarCommon

public static boolean toolbarCommon

toolbarDistance

public static boolean toolbarDistance

toolbarAngle

public static boolean toolbarAngle

toolbarDihedral

public static boolean toolbarDihedral

toolbarFog

public static boolean toolbarFog

zoomMiddle

public static boolean zoomMiddle

fastGeometry

public static boolean fastGeometry

toolbarPosition

public static int toolbarPosition

selectAtomLabel

public static boolean selectAtomLabel

antialiasing

public static boolean antialiasing

povrayInstallationDirectoryWin

public static java.lang.String povrayInstallationDirectoryWin

povrayInstallationDirectoryLinux

public static java.lang.String povrayInstallationDirectoryLinux

monitorColor

public static float[] monitorColor
Color used to display distance monitors in StructureViewer


ribbonStyle

public static int ribbonStyle

renderBondOrder

public static boolean renderBondOrder

LAF

public static int LAF

structureColorIndex

public static int structureColorIndex

selectionMode

public static int selectionMode
The variable that sets selection level between atom and residue


renderingMode

public static short renderingMode

structureView

public static short structureView

cpkQuality

public static int cpkQuality

menuFontSize

public static int menuFontSize

structureColorSequence

public static boolean structureColorSequence

showCellGrid

public static boolean showCellGrid

showResidueTips

public static boolean showResidueTips

showSs

public static boolean showSs

sequenceViewerFont

public static java.awt.Font sequenceViewerFont

undoEnabled

public static boolean undoEnabled

undoBufferDepth

public static int undoBufferDepth

renderingFastQuality

public static float renderingFastQuality
Numeric values that reflect quality of rendering.


renderingBestQuality

public static float renderingBestQuality

ribbonQuality

public static float ribbonQuality

ribbonDiameter

public static float ribbonDiameter

cylinderDiameter

public static float cylinderDiameter

commonRibbonColoring

public static boolean commonRibbonColoring

commonColoring

public static boolean commonColoring

commonSelection

public static boolean commonSelection

stickSize

public static double stickSize

bondRadiusScale

public static double bondRadiusScale

sphereRadius

public static double sphereRadius

ballRadius

public static double ballRadius

ballRadiusOption

public static int ballRadiusOption

startupMagnificationMode

public static int startupMagnificationMode

startupRenderingQuality

public static short startupRenderingQuality

magnificationMode

public static int magnificationMode

workingDirectory

public static java.lang.String workingDirectory

showBondOrder

public static boolean showBondOrder

deriveBondOrder

public static boolean deriveBondOrder

showBoundWaters

public static boolean showBoundWaters

mouseFactor

public static int mouseFactor

fogEnabled

public static boolean fogEnabled

indexedColor

public static boolean indexedColor

chainColors

public static java.awt.Color[] chainColors

structureColors

public static java.awt.Color[] structureColors

lineWidth

public static double lineWidth

displayToolbar

public static boolean displayToolbar

showToolbarTips

public static boolean showToolbarTips

HELIX_COLOR

public static float[] HELIX_COLOR
Variables that define colors of the secondary structure elements.


STRAND_COLOR

public static float[] STRAND_COLOR

TURN_COLOR

public static float[] TURN_COLOR

COIL_COLOR

public static float[] COIL_COLOR

dockRama

public static boolean dockRama

sequenceResidueColor

public static java.awt.Color sequenceResidueColor

cellBackgroundColor

public static java.awt.Color cellBackgroundColor
Constructor Detail

StylesPreferences

public StylesPreferences(java.lang.String location)
Method Detail

resetStylesDefaults

public static void resetStylesDefaults()
This method uses hard-coded defaults to restore the configuration of the application. Both StructureStyles and persistent Preferences are updated.


writePreferences

public void writePreferences()

readPreferences

public void readPreferences()

importPreferences

public void importPreferences(java.io.InputStream in)
                       throws java.lang.Exception
Throws:
java.lang.Exception

exportPreferences

public void exportPreferences(java.io.OutputStream out)
                       throws java.lang.Exception
Throws:
java.lang.Exception

getSelectionColor

public static void getSelectionColor(float[] color)