StateManager
Date: 2019-10-22

org.jmol.viewer

## Class StateManager

- java.lang.Object
- - org.jmol.viewer.StateManager

-     public class StateManager
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.lang.String` | `lastConnections`
    `private java.lang.String` | `lastContext`
    `private java.lang.String` | `lastCoordinates`
    `private java.lang.String` | `lastOrientation`
    `private java.lang.String` | `lastScene`
    `private java.lang.String` | `lastSelected`
    `private java.lang.String` | `lastShape`
    `private java.lang.String` | `lastState`
    `static int` | `OBJ_AXIS1`
    `static int` | `OBJ_AXIS2`
    `static int` | `OBJ_AXIS3`
    `static int` | `OBJ_BACKGROUND`
    `static int` | `OBJ_BOUNDBOX`
    `static int` | `OBJ_FRANK`
    `static int` | `OBJ_MAX`
    `static int` | `OBJ_UNITCELL`
    `private static java.lang.String` | `objectNameList`
    `protected java.util.Map<java.lang.String,java.lang.Object>` | `saved`
    `protected Viewer` | `vwr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StateManager(Viewer vwr)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) void` | `clear(GlobalSettings global)`
    `void` | `deleteSaved(java.lang.String namelike)`
    `private void` | `deleteSavedType(java.lang.String type)`
    `java.lang.Object` | `getContext(java.lang.String saveName)`
    `private static java.lang.Object` | `getNoCase(java.util.Map<java.lang.String,java.lang.Object> saved, java.lang.String name)`
    `static int` | `getObjectIdFromName(java.lang.String name)`
    `(package private) static java.lang.String` | `getObjectNameFromId(int objId)`
    `(package private) Orientation` | `getOrientation()`
    `private Orientation` | `getOrientationFor(java.lang.String saveName)`
    `java.lang.String` | `getSavedCoordinates(java.lang.String saveName)`
    `(package private) java.lang.String` | `getSavedOrientationText(java.lang.String saveName)`
    `java.lang.String` | `getSavedState(java.lang.String saveName)`
    `java.lang.String` | `getSavedStructure(java.lang.String saveName)`
    `static java.lang.String` | `getVariableList(java.util.Map<java.lang.String,SV> htVariables, int nMax, boolean withSites, boolean definedOnly)`
    `java.lang.String` | `listSavedStates()`
    `void` | `resetLighting()` Reset lighting to Jmol defaults
    `boolean` | `restoreBonds(java.lang.String saveName)`
    `boolean` | `restoreOrientation(java.lang.String saveName, float timeSeconds, boolean isAll)`
    `boolean` | `restoreScene(java.lang.String saveName, float timeSeconds)`
    `boolean` | `restoreSelection(java.lang.String saveName)`
    `void` | `saveBonds(java.lang.String saveName)`
    `void` | `saveContext(java.lang.String saveName, java.lang.Object context)`
    `void` | `saveCoordinates(java.lang.String saveName, javajs.util.BS bsSelected)`
    `void` | `saveOrientation(java.lang.String saveName, float[] pymolView)`
    `void` | `saveScene(java.lang.String saveName, java.util.Map<java.lang.String,java.lang.Object> scene)`
    `void` | `saveSelection(java.lang.String saveName, javajs.util.BS bsSelected)`
    `void` | `saveState(java.lang.String saveName)`
    `void` | `saveStructure(java.lang.String saveName)`
    `private void` | `setCommonDefaults()`
    `(package private) void` | `setCrystallographicDefaults()`
    `(package private) void` | `setJmolDefaults()`
    `(package private) void` | `setPyMOLDefaults()`
    `(package private) void` | `setRasMolDefaults()`
    `static java.lang.String` | `varClip(java.lang.String name, java.lang.String sv, int nMax)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### OBJ_BACKGROUND

          public static final int OBJ_BACKGROUND

      See Also:
        Constant Field Values

    - #### OBJ_AXIS1

          public static final int OBJ_AXIS1

      See Also:
        Constant Field Values

    - #### OBJ_AXIS2

          public static final int OBJ_AXIS2

      See Also:
        Constant Field Values

    - #### OBJ_AXIS3

          public static final int OBJ_AXIS3

      See Also:
        Constant Field Values

    - #### OBJ_BOUNDBOX

          public static final int OBJ_BOUNDBOX

      See Also:
        Constant Field Values

    - #### OBJ_UNITCELL

          public static final int OBJ_UNITCELL

      See Also:
        Constant Field Values

    - #### OBJ_FRANK

          public static final int OBJ_FRANK

      See Also:
        Constant Field Values

    - #### OBJ_MAX

          public static final int OBJ_MAX

      See Also:
        Constant Field Values

    - #### objectNameList

          private static final java.lang.String objectNameList

      See Also:
        Constant Field Values

    - #### vwr

          protected final Viewer vwr

    - #### saved

          protected java.util.Map<java.lang.String,java.lang.Object> saved

    - #### lastOrientation

          private java.lang.String lastOrientation

    - #### lastContext

          private java.lang.String lastContext

    - #### lastConnections

          private java.lang.String lastConnections

    - #### lastScene

          private java.lang.String lastScene

    - #### lastSelected

          private java.lang.String lastSelected

    - #### lastState

          private java.lang.String lastState

    - #### lastShape

          private java.lang.String lastShape

    - #### lastCoordinates

          private java.lang.String lastCoordinates

  - ### Constructor Detail

    - #### StateManager

          StateManager(Viewer vwr)

  - ### Method Detail

    - #### getVariableList

          public static java.lang.String getVariableList(java.util.Map<java.lang.String,SV> htVariables,
                                                         int nMax,
                                                         boolean withSites,
                                                         boolean definedOnly)

    - #### getObjectIdFromName

          public static int getObjectIdFromName(java.lang.String name)

    - #### getObjectNameFromId

          static java.lang.String getObjectNameFromId(int objId)

    - #### clear

          void clear(GlobalSettings global)

    - #### resetLighting

          public void resetLighting()

      Reset lighting to Jmol defaults

    - #### setCrystallographicDefaults

          void setCrystallographicDefaults()

    - #### setCommonDefaults

          private void setCommonDefaults()

    - #### setJmolDefaults

          void setJmolDefaults()

    - #### setRasMolDefaults

          void setRasMolDefaults()

    - #### setPyMOLDefaults

          void setPyMOLDefaults()

    - #### getNoCase

          private static java.lang.Object getNoCase(java.util.Map<java.lang.String,java.lang.Object> saved,
                                                    java.lang.String name)

    - #### listSavedStates

          public java.lang.String listSavedStates()

    - #### deleteSavedType

          private void deleteSavedType(java.lang.String type)

    - #### deleteSaved

          public void deleteSaved(java.lang.String namelike)

    - #### saveSelection

          public void saveSelection(java.lang.String saveName,
                                    javajs.util.BS bsSelected)

    - #### restoreSelection

          public boolean restoreSelection(java.lang.String saveName)

    - #### saveState

          public void saveState(java.lang.String saveName)

    - #### getSavedState

          public java.lang.String getSavedState(java.lang.String saveName)

    - #### saveStructure

          public void saveStructure(java.lang.String saveName)

    - #### getSavedStructure

          public java.lang.String getSavedStructure(java.lang.String saveName)

    - #### saveCoordinates

          public void saveCoordinates(java.lang.String saveName,
                                      javajs.util.BS bsSelected)

    - #### getSavedCoordinates

          public java.lang.String getSavedCoordinates(java.lang.String saveName)

    - #### getOrientation

          Orientation getOrientation()

    - #### getSavedOrientationText

          java.lang.String getSavedOrientationText(java.lang.String saveName)

    - #### saveScene

          public void saveScene(java.lang.String saveName,
                                java.util.Map<java.lang.String,java.lang.Object> scene)

    - #### restoreScene

          public boolean restoreScene(java.lang.String saveName,
                                      float timeSeconds)

    - #### saveOrientation

          public void saveOrientation(java.lang.String saveName,
                                      float[] pymolView)

    - #### restoreOrientation

          public boolean restoreOrientation(java.lang.String saveName,
                                            float timeSeconds,
                                            boolean isAll)

    - #### getOrientationFor

          private Orientation getOrientationFor(java.lang.String saveName)

    - #### saveContext

          public void saveContext(java.lang.String saveName,
                                  java.lang.Object context)

    - #### getContext

          public java.lang.Object getContext(java.lang.String saveName)

    - #### saveBonds

          public void saveBonds(java.lang.String saveName)

    - #### restoreBonds

          public boolean restoreBonds(java.lang.String saveName)

    - #### varClip

          public static java.lang.String varClip(java.lang.String name,
                                                 java.lang.String sv,
                                                 int nMax)