Package org.jmol.viewer
Class StateCreator
java.lang.Object
org.jmol.viewer.JmolStateCreator
org.jmol.viewer.StateCreator
StateCreator handles all aspects of working with the "state" as
generally defined, including
-- creating the state script
-- general output, including logging
-- handling undo/redo
-- processing SYNC directives
Called by reflection only; all state generation script here, for
modularization in JavaScript
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate voidaddFunctions(javajs.util.SB s, Map<String, JmolScriptFunction> ht, String selectedFunction, boolean isGeneric, boolean namesOnly) private static voidaddTickInfo(javajs.util.SB sb, TickInfo tickInfo, boolean addFirst) private voidprivate voidappendLoadStates(javajs.util.SB cmds) private voidappendTickInfo(String myType, javajs.util.SB sb, TickInfo t) private static Stringprivate void(package private) StringgetAllSettings(String prefix) private StringgetAnimState(AnimationManager am, javajs.util.SB sfunc) (package private) StringgetAtomicPropertyState(int taintWhat, javajs.util.BS bsSelected) (package private) voidgetAtomicPropertyStateBuffer(javajs.util.SB commands, int type, javajs.util.BS bs, String label, float[] fData) getAtomShapeState(AtomShape shape) private StringgetAxesState(Axes axes) private StringgetBondState(Sticks shape) private intgetCEState(ColorEncoder p, javajs.util.SB s) private StringgetColorState(ColorManager cm, javajs.util.SB sfunc) (package private) StringgetCommands(Map<String, javajs.util.BS> htDefine, Map<String, javajs.util.BS> htMore, String selectCmd) private StringgetCommands2(Map<String, javajs.util.BS> ht, javajs.util.SB s, String setPrev, String selectCmd) private StringgetDataState(javajs.util.SB sfunc) private Stringprivate StringgetDefinedState(javajs.util.SB sfunc, boolean isAll) private voidgetEchoState(javajs.util.SB sb, Text t) private StringgetFileState(javajs.util.SB sfunc) private Stringprivate StringgetFontState(String myType, Font font3d) (package private) StringA relatively static method that is only called on a new StateCreator so as to all StateCreator to be modular.voidgetInlineData(javajs.util.SB loadScript, String strModel, boolean isAppend, Integer appendToModelIndex, String loadFilter) (package private) StringgetLightingState(boolean isAll) private StringgetMeasurementState(Measures shape) (package private) StringgetModelState(javajs.util.SB sfunc, boolean isAll, boolean withProteinStructure) private StringgetParameterState(GlobalSettings global, javajs.util.SB sfunc) note that these are not user variables, only global jmol parametersprivate StringgetSelectionState(SelectionManager sm, javajs.util.SB sfunc) private StringgetShapeState(Shape shape) private voidgetShapeStatePriv(javajs.util.SB commands, boolean isAll, int iShape) (package private) StringgetSpinState(boolean isAll) (package private) StringgetStateScript(String type, int width, int height) private StringgetViewState(TransformManager tm, javajs.util.SB sfunc) private StringgetWindowState(javajs.util.SB sfunc, int width, int height) private voidgetZshadeState(javajs.util.SB s, TransformManager tm, boolean isAll) private static booleanisTainted(javajs.util.BS[] tainted, int atomIndex, int type) (package private) void(package private) intundoMoveAction(int action, int n) (package private) voidundoMoveActionClear(int taintedAtom, int type, boolean clearRedo)
-
Field Details
-
undoWorking
private boolean undoWorking -
MAX_ACTION_UNDO
private static final int MAX_ACTION_UNDO- See Also:
-
actionStates
-
actionStatesRedo
-
vwr
-
temp
-
temp2
-
temp3
-
-
Constructor Details
-
StateCreator
public StateCreator()
-
-
Method Details
-
setViewer
- Specified by:
setViewerin classJmolStateCreator
-
getStateScript
- Specified by:
getStateScriptin classJmolStateCreator
-
getDataState
-
getDefinedState
-
getModelState
- Specified by:
getModelStatein classJmolStateCreator
-
getWindowState
-
getLightingState
- Specified by:
getLightingStatein classJmolStateCreator
-
getFileState
-
appendLoadStates
private void appendLoadStates(javajs.util.SB cmds) -
getInlineData
public void getInlineData(javajs.util.SB loadScript, String strModel, boolean isAppend, Integer appendToModelIndex, String loadFilter) - Specified by:
getInlineDatain classJmolStateCreator
-
getColorState
-
getCEState
-
getAnimState
-
getParameterState
note that these are not user variables, only global jmol parameters- Parameters:
global-sfunc-- Returns:
- String
-
getDefaultLabelState
-
getSelectionState
-
getViewState
-
getZshadeState
-
getSpinState
- Specified by:
getSpinStatein classJmolStateCreator- Parameters:
isAll-- Returns:
- spin state
-
getCommands
String getCommands(Map<String, javajs.util.BS> htDefine, Map<String, javajs.util.BS> htMore, String selectCmd) - Specified by:
getCommandsin classJmolStateCreator
-
getCommands2
-
app
-
addBs
-
getFontState
-
appendTickInfo
-
addTickInfo
-
getMeasurementState
-
getShapeStatePriv
private void getShapeStatePriv(javajs.util.SB commands, boolean isAll, int iShape) -
getBondState
-
clearTemp
private void clearTemp() -
getShapeState
-
getFontLineShapeState
-
getAxesState
-
getAtomShapeState
- Specified by:
getAtomShapeStatein classJmolStateCreator
-
getEchoState
-
getAllSettings
- Specified by:
getAllSettingsin classJmolStateCreator
-
chop
-
getFunctionCalls
A relatively static method that is only called on a new StateCreator so as to all StateCreator to be modular.- Specified by:
getFunctionCallsin classJmolStateCreator
-
addFunctions
private void addFunctions(javajs.util.SB s, Map<String, JmolScriptFunction> ht, String selectedFunction, boolean isGeneric, boolean namesOnly) -
isTainted
private static boolean isTainted(javajs.util.BS[] tainted, int atomIndex, int type) -
getAtomicPropertyState
- Specified by:
getAtomicPropertyStatein classJmolStateCreator
-
getAtomicPropertyStateBuffer
void getAtomicPropertyStateBuffer(javajs.util.SB commands, int type, javajs.util.BS bs, String label, float[] fData) - Specified by:
getAtomicPropertyStateBufferin classJmolStateCreator
-
undoMoveAction
int undoMoveAction(int action, int n) - Specified by:
undoMoveActionin classJmolStateCreator
-
undoMoveActionClear
void undoMoveActionClear(int taintedAtom, int type, boolean clearRedo) - Specified by:
undoMoveActionClearin classJmolStateCreator
-