Search in sources :

Example 11 with Color3f

use of javax.vecmath.Color3f in project ffx by mjschnie.

the class GraphicsCanvas method savePrefs.

/**
 * <p>
 * savePrefs</p>
 */
public void savePrefs() {
    String c = GraphicsCanvas.class.getName();
    prefs.putInt(c + ".bondwidth", RendererCache.bondwidth);
    prefs.putInt(c + ".detail", RendererCache.detail);
    prefs.putDouble(c + ".radius", RendererCache.radius);
    prefs.put(c + ".mouse", mouseMode.name());
    prefs.putBoolean(c + ".highlight", RendererCache.highlightSelections);
    Color col = RendererCache.selectionColor.get();
    prefs.put(c + ".highlightColor", "" + col.getRed() + " " + col.getGreen() + " " + col.getBlue());
    prefs.putBoolean(c + ".labelAtoms", RendererCache.labelAtoms);
    prefs.putBoolean(c + ".labelResidues", RendererCache.labelResidues);
    prefs.putInt(c + ".labelSize", getGraphics2D().getFont().getSize());
    Color fontColor = getGraphics2D().getColor();
    prefs.put(c + ".labelColor", "" + fontColor.getRed() + " " + fontColor.getGreen() + " " + fontColor.getBlue());
    col = RendererCache.pickingColor.get();
    prefs.put(c + ".pickColor", "" + col.getRed() + " " + col.getGreen() + " " + col.getBlue());
    prefs.putBoolean(c + ".picking", rendererPicking.getPicking());
    prefs.put(c + ".pickLevel", rendererPicking.getPickLevel());
    col = RendererCache.userColor.get();
    prefs.put(c + ".userColor", "" + col.getRed() + " " + col.getGreen() + " " + col.getBlue());
    Color3f temp = new Color3f();
    background.getColor(temp);
    col = temp.get();
    prefs.put(c + ".backgroundColor", "" + col.getRed() + " " + col.getGreen() + " " + col.getBlue());
}
Also used : Color(java.awt.Color) Color3f(javax.vecmath.Color3f)

Aggregations

Color3f (javax.vecmath.Color3f)11 Color (java.awt.Color)6 Appearance (javax.media.j3d.Appearance)3 BoundingSphere (javax.media.j3d.BoundingSphere)3 Point3d (javax.vecmath.Point3d)3 Vector3d (javax.vecmath.Vector3d)3 ColoringAttributes (javax.media.j3d.ColoringAttributes)2 LineArray (javax.media.j3d.LineArray)2 LineAttributes (javax.media.j3d.LineAttributes)2 RenderingAttributes (javax.media.j3d.RenderingAttributes)2 Shape3D (javax.media.j3d.Shape3D)2 Transform3D (javax.media.j3d.Transform3D)2 TransformGroup (javax.media.j3d.TransformGroup)2 Cone (com.sun.j3d.utils.geometry.Cone)1 Cylinder (com.sun.j3d.utils.geometry.Cylinder)1 Sphere (com.sun.j3d.utils.geometry.Sphere)1 SimpleUniverse (com.sun.j3d.utils.universe.SimpleUniverse)1 Atom (ffx.potential.bonded.Atom)1 Bond (ffx.potential.bonded.Bond)1 ROLS (ffx.potential.bonded.ROLS)1