org.jmol.modelset
Class LabelToken

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

public class LabelToken
extends Object


Field Summary
private  boolean alignLeft
           
private  char ch1
           
private  float[] data
           
private  boolean intAsFloat
           
private  String key
           
private static int[] labelTokenIds
           
private static String labelTokenParams
           
private  int precision
           
private  int pt
           
static String STANDARD_LABEL
           
private  String text
           
private  int tok
           
private static int[] twoCharLabelTokenIds
           
private static String twoCharLabelTokenParams
           
private  int width
           
private  boolean zeroPad
           
 
Constructor Summary
private LabelToken(int pt)
           
private LabelToken(String text)
           
 
Method Summary
private static void appendAtomTokenValue(Viewer viewer, Atom atom, LabelToken t, StringBuffer strLabel, int[] indices)
           
static LabelToken[] compile(Viewer viewer, String strFormat, char chAtom, Hashtable htValues)
           
private  String format(float floatT, String strT, Tuple3f ptT)
           
static String formatLabel(Viewer viewer, Atom atom, String strFormat)
           
static String formatLabel(Viewer viewer, Atom atom, String strFormat, LabelToken[] tokens, char chAtom, int[] indices)
           
static String formatLabel(Viewer viewer, Bond bond, LabelToken[] tokens, Hashtable values, int[] indices)
           
static String formatLabel(Viewer viewer, Measurement measurement, String label, float value, String units)
           
static Hashtable getBondLabelValues()
           
static String getLabel(LabelToken[] tokens)
           
private static boolean isLabelPropertyTok(int tok)
           
private static int setToken(Viewer viewer, String strFormat, LabelToken lt, int cch, int chAtom, Hashtable htValues)
           
static void setValues(LabelToken[] tokens, Hashtable values)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

text

private String text

key

private String key

data

private float[] data

tok

private int tok

pt

private int pt

ch1

private char ch1

width

private int width

precision

private int precision

alignLeft

private boolean alignLeft

zeroPad

private boolean zeroPad

intAsFloat

private boolean intAsFloat

labelTokenParams

private static final String labelTokenParams
See Also:
Constant Field Values

labelTokenIds

private static final int[] labelTokenIds

twoCharLabelTokenParams

private static final String twoCharLabelTokenParams
See Also:
Constant Field Values

twoCharLabelTokenIds

private static final int[] twoCharLabelTokenIds

STANDARD_LABEL

public static final String STANDARD_LABEL
See Also:
Constant Field Values
Constructor Detail

LabelToken

private LabelToken(String text)

LabelToken

private LabelToken(int pt)
Method Detail

isLabelPropertyTok

private static boolean isLabelPropertyTok(int tok)

compile

public static LabelToken[] compile(Viewer viewer,
                                   String strFormat,
                                   char chAtom,
                                   Hashtable htValues)

setToken

private static int setToken(Viewer viewer,
                            String strFormat,
                            LabelToken lt,
                            int cch,
                            int chAtom,
                            Hashtable htValues)

formatLabel

public static String formatLabel(Viewer viewer,
                                 Atom atom,
                                 String strFormat)

formatLabel

public static String formatLabel(Viewer viewer,
                                 Atom atom,
                                 String strFormat,
                                 LabelToken[] tokens,
                                 char chAtom,
                                 int[] indices)

appendAtomTokenValue

private static void appendAtomTokenValue(Viewer viewer,
                                         Atom atom,
                                         LabelToken t,
                                         StringBuffer strLabel,
                                         int[] indices)

getBondLabelValues

public static Hashtable getBondLabelValues()

formatLabel

public static String formatLabel(Viewer viewer,
                                 Bond bond,
                                 LabelToken[] tokens,
                                 Hashtable values,
                                 int[] indices)

formatLabel

public static String formatLabel(Viewer viewer,
                                 Measurement measurement,
                                 String label,
                                 float value,
                                 String units)

format

private String format(float floatT,
                      String strT,
                      Tuple3f ptT)

setValues

public static void setValues(LabelToken[] tokens,
                             Hashtable values)

getLabel

public static String getLabel(LabelToken[] tokens)