# Class LabelToken

java.lang.Object
org.jmol.modelset.LabelToken

public class LabelToken extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`STANDARD_LABEL`

## Constructor Summary

Constructors
Constructor
Description
`LabelToken()`

## Method Summary

Modifier and Type
Method
Description
`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.
`String`
`formatLabel(Viewer vwr, Atom atom, String strFormat, P3 ptTemp)`
///////// label formatting for atoms, bonds, and measurements ///////////
`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
`static 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 Map<String,Object>`
`getBondLabelValues()`
`static String`
`getLabel(LabelToken[] tokens)`
`static void`
`setValues(LabelToken[] tokens, Map<String,Object> values)`

### Methods inherited from class Object

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

## Field Details

### STANDARD_LABEL

public static final String STANDARD_LABEL

See Also:
  - Constant Field Values

## 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

public String formatLabel(Viewer vwr, Atom atom, String strFormat, P3 ptTemp)
///////// label formatting for atoms, bonds, and measurements ///////////

### 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

public static Map<String,Object> getBondLabelValues()

### formatLabelBond

public static String formatLabelBond(Viewer vwr, Bond bond, LabelToken[] tokens, Map<String,Object> values, int[] indices, P3 ptTemp)

### formatLabelMeasure

public static String formatLabelMeasure(Viewer vwr, Measurement m, String label, float value, String units)

### setValues

public static void setValues(LabelToken[] tokens, Map<String,Object> values)

### getLabel

public static String getLabel(LabelToken[] tokens)