org.jmol.viewer
Class ScriptVariable

java.lang.Object
  extended by org.jmol.viewer.Token
      extended by org.jmol.viewer.ScriptVariable

 class ScriptVariable
extends Token


Field Summary
private static int FLAG_CANINCREMENT
           
private static int FLAG_LOCALVAR
           
(package private)  int flags
           
(package private)  int index
           
(package private)  java.lang.String name
           
(package private) static javax.vecmath.Point3f pt0
           
(package private) static ScriptVariable vAll
           
private static ScriptVariable vF
           
private static ScriptVariable vT
           
 
Fields inherited from class org.jmol.viewer.Token
abs, absolute, acos, add, adpmax, adpmin, all, allfloat, altloc, ambient, amino, andequals, angle, animation, array, astrType, atomExpressionCommand, atomID, atomIndex, atomName, atomno, atomproperty, atoms, atomType, atomX, atomY, atomZ, average, axes, axis, axisangle, babel, back, backbone, background, backlit, bin, bitset, bondcount, bondmode, bondorder, bonds, bondset, bottom, boundbox, branch, breakcmd, calculate, carbohydrate, cartoon, cd, cell, center, centerAt, chain, clear, clickable, clipboard, colon, color, comma, command, comparator, configuration, connect, connected, console, constraint, continuecmd, contourlines, coord, cos, covalent, cross, data, decimal, defaultColors, defaultON, define, delay, delete, depth, diffuse, dipole, direction, displacement, display, displayed, distance, div, divide, dna, dollarsign, dot, dots, dotted, draw, echo, element, elemno, ellipsoid, elsecmd, elseif, end, endifcmd, exit, expression, expressionBegin, expressionEnd, file, fill, find, fixedtemp, floatproperty, flowCommand, font, fontsize, forcmd, formalCharge, format, fracX, fracXyz, fracY, fracZ, frame, frank, front, frontlit, frontonly, fullylit, function, geosurface, getproperty, gotocmd, group, group1, groupID, groupindex, halo, hbond, helix, help, hetero, hidden, hide, history, hkl, hover, hydrogen, identifier, identify, ifcmd, image, implicitStringCommand, info, initialize, insertion, integer, intproperty, intValue, invertSelected, ionic, isaromatic, isosurface, javascript, jmol, join, label, last, lcaocartoon, left, leftbrace, leftdivide, leftparen, leftsquare, length, lines, list, listf, load, loop, mathExpressionCommand, mathfunc, mathop, mathproperty, max, mep, mesh, meshRibbon, message, min, minimize, minmaxmask, minus, minusMinus, misc, mo, mode, model, modelindex, molecule, monitor, monomer, move, moveto, mul, nada, navigate, next, noArgs, nocontourlines, nodots, noeval, nofill, nomesh, none, normal, notfrontonly, notriangles, now, nucleic, occupancy, off, on, only, opAnd, opaque, opEQ, opGE, opGT, opIf, opLE, opLT, opNE, opNot, opOr, opToggle, opXor, orientation, partialCharge, pause, pdbheader, percent, period, phi, picking, pickingStyle, plane, play, playrev, plus, plusPlus, pmesh, point, point3f, point4f, pointgroup, polyhedra, polymer, polymerLength, predefinedset, prev, print, property, PROPERTYFLAGS, propselector, protein, psi, purine, pyrimidine, quaternion, quit, qw, radius, ramachandran, random, range, rasmol, refresh, replace, reset, residue, resno, restore, restrict, resume, returncmd, reverse, rewind, ribbon, right, rightbrace, rightparen, rightsquare, rna, rocket, rotate, rotateSelected, rotation, rubberband, sasurface, save, scale, scale3d, script, select, selected, selectionHalo, semicolon, seqcode, sequence, set, setparam, settable, shape, shapely, sheet, show, sidechain, sin, site, size, slab, solid, solvent, sort, spacefill, spacegroup, spec_alternate, spec_atom, spec_chain, spec_model, spec_model2, spec_name_pattern, spec_resid, spec_seqcode, spec_seqcode_range, specexponent, specialposition, specpercent, specpower, specular, spin, split, sqrt, ssbond, star, state, stddev, step, stereo, straightness, strands, string, strproperty, strucid, strucno, structure, sub, subset, substructure, sum2, surface, surfacedistance, symbol, symmetry, symop, sync, temperature, thismodel, times, tok, tokenAll, tokenAnd, tokenArray, tokenArraySelector, tokenColon, tokenComma, tokenCoordinateBegin, tokenCoordinateEnd, tokenDivide, tokenEquals, tokenExpressionBegin, tokenExpressionEnd, tokenIf, tokenLeftParen, tokenMinus, tokenOff, tokenOn, tokenOpIf, tokenOr, tokenPlus, tokenRightParen, tokenSet, tokenSetArray, tokenSetProperty, tokenSetVar, tokenTimes, top, torsion, trace, transform, translate, translateSelected, translation, translucent, transparent, triangles, trim, type, unaryMinus, unitcell, unitX, unitXyz, unitY, unitZ, url, user, valence, value, vanderwaals, var, vector, vibration, vibX, vibXyz, vibY, vibZ, visible, whilecmd, wireframe, within, write, xyz, zap, zoom, zoomTo
 
Constructor Summary
ScriptVariable()
           
ScriptVariable(java.util.BitSet bs, int index)
           
ScriptVariable(int tok)
           
ScriptVariable(int tok, int intValue)
           
ScriptVariable(int tok, int intValue, java.lang.Object value)
           
ScriptVariable(int tok, java.lang.Object value)
           
ScriptVariable(Token theToken)
           
 
Method Summary
(package private)  boolean asBoolean()
           
(package private)  float asFloat()
           
(package private)  int asInt()
           
(package private)  java.lang.String asString()
           
(package private) static java.util.BitSet bsSelect(ScriptVariable var)
           
(package private) static java.util.BitSet bsSelect(Token token)
           
(package private) static java.util.BitSet bsSelect(Token token, int n)
           
(package private) static boolean bValue(Token x)
           
(package private)  boolean canIncrement()
           
(package private) static java.lang.String[] concatList(ScriptVariable x1, ScriptVariable x2)
           
(package private)  java.lang.String escape()
           
(package private) static float fValue(Token x)
           
(package private) static ScriptVariable getBoolean(boolean value)
           
(package private)  java.lang.Object getValAsObj()
           
(package private) static ScriptVariable getVariable(java.lang.Object x)
           
(package private) static ScriptVariable getVariableSelected(int index, java.lang.Object value)
           
(package private)  boolean increment(int n)
           
(package private) static ScriptVariable intVariable(int intValue)
           
(package private) static int iValue(Token x)
           
(package private) static java.lang.Object nValue(Token x)
           
(package private) static java.lang.Object oValue(ScriptVariable x)
           
(package private) static ScriptVariable selectItem(ScriptVariable var)
           
(package private) static ScriptVariable selectItem(ScriptVariable var, int i2)
           
(package private) static Token selectItem(Token var)
           
(package private) static Token selectItem(Token tokenIn, int i2)
           
(package private)  ScriptVariable set(ScriptVariable v)
           
(package private)  ScriptVariable setGlobal()
           
(package private)  ScriptVariable setName(java.lang.String name)
           
(package private)  boolean setSelectedValue(int selector, ScriptVariable var)
           
(package private) static int sizeOf(Token x)
           
(package private) static java.lang.String sprintf(ScriptVariable[] args)
          sprintf accepts arguments from the format() function First argument is a format string.
(package private) static java.lang.Object sprintf(java.lang.String strFormat, ScriptVariable var)
           
private static java.lang.String sprintf(java.lang.String strFormat, ScriptVariable var, java.lang.Object[] of, int[] vd, float[] vf, double[] ve, boolean getS, boolean getP)
           
(package private) static java.lang.String sValue(ScriptVariable x)
           
(package private) static java.lang.String sValue(Token x)
           
(package private) static float toFloat(java.lang.String s)
           
 java.lang.String toString()
           
(package private) static ScriptVariable tValue(java.lang.String str)
           
(package private) static java.lang.String typeOf(ScriptVariable x)
           
(package private) static java.lang.Object unescapePointOrBitsetAsVariable(java.lang.String s)
           
 
Methods inherited from class org.jmol.viewer.Token
addToken, completeCommand, getCommandSet, getMaxMathParams, getPrecedence, getSettableTokFromString, getTokenFromName, getTokensLike, intToken, nameOf, tokAttr, tokAttrOr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

vT

private static final ScriptVariable vT

vF

private static final ScriptVariable vF

vAll

static ScriptVariable vAll

index

int index

name

java.lang.String name

FLAG_CANINCREMENT

private static final int FLAG_CANINCREMENT
See Also:
Constant Field Values

FLAG_LOCALVAR

private static final int FLAG_LOCALVAR
See Also:
Constant Field Values

flags

int flags

pt0

static final javax.vecmath.Point3f pt0
Constructor Detail

ScriptVariable

ScriptVariable()

ScriptVariable

ScriptVariable(int tok)

ScriptVariable

ScriptVariable(int tok,
               int intValue,
               java.lang.Object value)

ScriptVariable

ScriptVariable(int tok,
               java.lang.Object value)

ScriptVariable

ScriptVariable(int tok,
               int intValue)

ScriptVariable

ScriptVariable(java.util.BitSet bs,
               int index)

ScriptVariable

ScriptVariable(Token theToken)
Method Detail

getVariable

static ScriptVariable getVariable(java.lang.Object x)
Parameters:
x -
Returns:
a ScriptVariable of the input type, or if x is null, then a new ScriptVariable, or, if the type is not found, null

set

ScriptVariable set(ScriptVariable v)

setName

ScriptVariable setName(java.lang.String name)

setGlobal

ScriptVariable setGlobal()

canIncrement

boolean canIncrement()

increment

boolean increment(int n)

getVariableSelected

static ScriptVariable getVariableSelected(int index,
                                          java.lang.Object value)

asBoolean

boolean asBoolean()

asInt

int asInt()

asFloat

float asFloat()

asString

java.lang.String asString()

getValAsObj

java.lang.Object getValAsObj()

intVariable

static final ScriptVariable intVariable(int intValue)

oValue

static java.lang.Object oValue(ScriptVariable x)

nValue

static java.lang.Object nValue(Token x)

bValue

static boolean bValue(Token x)

iValue

static int iValue(Token x)

fValue

static float fValue(Token x)

toFloat

static float toFloat(java.lang.String s)

sValue

static java.lang.String sValue(Token x)

sValue

static java.lang.String sValue(ScriptVariable x)

sizeOf

static int sizeOf(Token x)

typeOf

static java.lang.String typeOf(ScriptVariable x)

concatList

static java.lang.String[] concatList(ScriptVariable x1,
                                     ScriptVariable x2)

bsSelect

static java.util.BitSet bsSelect(Token token)

bsSelect

static java.util.BitSet bsSelect(ScriptVariable var)

bsSelect

static java.util.BitSet bsSelect(Token token,
                                 int n)

selectItem

static ScriptVariable selectItem(ScriptVariable var)

selectItem

static Token selectItem(Token var)

selectItem

static ScriptVariable selectItem(ScriptVariable var,
                                 int i2)

selectItem

static Token selectItem(Token tokenIn,
                        int i2)

tValue

static ScriptVariable tValue(java.lang.String str)

setSelectedValue

boolean setSelectedValue(int selector,
                         ScriptVariable var)

escape

java.lang.String escape()

unescapePointOrBitsetAsVariable

static java.lang.Object unescapePointOrBitsetAsVariable(java.lang.String s)

getBoolean

static ScriptVariable getBoolean(boolean value)

sprintf

static java.lang.Object sprintf(java.lang.String strFormat,
                                ScriptVariable var)

sprintf

private static java.lang.String sprintf(java.lang.String strFormat,
                                        ScriptVariable var,
                                        java.lang.Object[] of,
                                        int[] vd,
                                        float[] vf,
                                        double[] ve,
                                        boolean getS,
                                        boolean getP)

sprintf

static java.lang.String sprintf(ScriptVariable[] args)
sprintf accepts arguments from the format() function First argument is a format string.

Parameters:
args -
Returns:
formatted string

toString

public java.lang.String toString()
Overrides:
toString in class Token