Package org.jmol.modelset
Class LabelToken
java.lang.Object
org.jmol.modelset.LabelToken
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LabelToken[]
Compiles a set of tokens for each primitive element of a label.formatLabel
(Viewer vwr, Atom atom, String strFormat, P3 ptTemp) static String
formatLabelAtomArray
(Viewer vwr, Atom atom, LabelToken[] tokens, char chAtom, int[] indices, P3 ptTemp) returns a formatted string based on the precompiled label tokensstatic String
formatLabelBond
(Viewer vwr, Bond bond, LabelToken[] tokens, Map<String, Object> values, int[] indices, P3 ptTemp) static String
formatLabelMeasure
(Viewer vwr, Measurement m, String label, float value, String units) static String
getLabel
(LabelToken[] tokens) static void
setValues
(LabelToken[] tokens, Map<String, Object> values)
-
Field Details
-
STANDARD_LABEL
- See Also:
-
-
Constructor Details
-
LabelToken
public LabelToken()
-
-
Method Details
-
compile
public static LabelToken[] compile(Viewer vwr, String strFormat, char chAtom, Map<String, Object> htValues) Compiles a set of tokens for each primitive element of a label. This is the efficient way to create a set of labels.- Parameters:
vwr
-strFormat
-chAtom
-htValues
-- Returns:
- array of tokens
-
formatLabel
-
formatLabelAtomArray
public static String formatLabelAtomArray(Viewer vwr, Atom atom, LabelToken[] tokens, char chAtom, int[] indices, P3 ptTemp) returns a formatted string based on the precompiled label tokens- Parameters:
vwr
-atom
-tokens
-chAtom
-indices
-ptTemp
-- Returns:
- formatted string
-
getBondLabelValues
-
formatLabelBond
-
formatLabelMeasure
public static String formatLabelMeasure(Viewer vwr, Measurement m, String label, float value, String units) -
setValues
-
getLabel
-