org.jmol.util

Class ColorEncoder

public class ColorEncoder extends Object

Field Summary
static intAMINO
static int[]argbsAmino
static int[]argbsCpk
static int[]argbsRoygb
static int[]argbsRwb
static int[]argbsShapely
static intBGYOR
static intBWR
static StringBYELEMENT_JMOL
static StringBYELEMENT_PREFIX
static StringBYELEMENT_RASMOL
static StringBYRESIDUE_AMINO
static StringBYRESIDUE_PREFIX
static StringBYRESIDUE_SHAPELY
static String[]colorSchemes
static intGRAY
static intHIGH
static intihalf
static booleanisColorIndex
static intJMOL
static intLOW
intpalette
static int[]rasmolScale
static intRASMOL
static intRESU
static intROYGB
static intRWB
static Hashtableschemes
static intSHAPELY
static StringthisName
static int[]thisScale
static int[]userScale
static intUSER
Constructor Summary
ColorEncoder()
Method Summary
static voidcheckColorIndex()
static intcolorIndex(int q, int segmentCount)
static StringfixName(String name)
static intgetArgbFromPalette(float val, float lo, float hi, int palette)
static shortgetColorIndex(int c)
static shortgetColorIndexFromPalette(float val, float lo, float hi, int palette)
shortgetColorIndexFromPalette(float val, float lo, float hi)
static intgetColorScheme(String colorScheme, boolean isOverloaded)
static intgetColorScheme(String colorScheme, boolean defaultToRoygb, boolean isOverloaded)
static int[]getColorSchemeArray(int palette)
static StringgetColorSchemeList(int[] scheme)
StringgetColorSchemeName()
static StringgetColorSchemeName(int i)
static int[]getRasmolScale(boolean forceNew)
static StringgetState(StringBuffer sfunc)
static intmakeColorScheme(String name, int[] scale, boolean isOverloaded)
static intquantize(float val, float lo, float hi, int segmentCount)
static intschemeIndex(String colorScheme)
intsetColorScheme(String colorScheme)
static voidsetUserScale(int[] scale)

Field Detail

AMINO

public static final int AMINO

argbsAmino

private static int[] argbsAmino

argbsCpk

private static int[] argbsCpk

argbsRoygb

private static int[] argbsRoygb

argbsRwb

private static int[] argbsRwb

argbsShapely

private static int[] argbsShapely

BGYOR

public static final int BGYOR

BWR

public static final int BWR

BYELEMENT_JMOL

private static final String BYELEMENT_JMOL

BYELEMENT_PREFIX

public static final String BYELEMENT_PREFIX

BYELEMENT_RASMOL

private static final String BYELEMENT_RASMOL

BYRESIDUE_AMINO

private static final String BYRESIDUE_AMINO

BYRESIDUE_PREFIX

public static final String BYRESIDUE_PREFIX

BYRESIDUE_SHAPELY

private static final String BYRESIDUE_SHAPELY

colorSchemes

private static final String[] colorSchemes

GRAY

private static final int GRAY

HIGH

public static final int HIGH

ihalf

private static int ihalf

isColorIndex

private static boolean isColorIndex

JMOL

public static final int JMOL

LOW

public static final int LOW

palette

private int palette

rasmolScale

private static int[] rasmolScale

RASMOL

public static final int RASMOL

RESU

public static final int RESU

ROYGB

public static final int ROYGB

RWB

public static final int RWB

schemes

private static Hashtable schemes

SHAPELY

public static final int SHAPELY

thisName

private static String thisName

thisScale

private static int[] thisScale

userScale

private static int[] userScale

USER

public static final int USER

Constructor Detail

ColorEncoder

public ColorEncoder()

Method Detail

checkColorIndex

private static void checkColorIndex()

colorIndex

public static final int colorIndex(int q, int segmentCount)

fixName

private static String fixName(String name)

getArgbFromPalette

public static final int getArgbFromPalette(float val, float lo, float hi, int palette)

getColorIndex

public static final short getColorIndex(int c)

getColorIndexFromPalette

public static final short getColorIndexFromPalette(float val, float lo, float hi, int palette)

getColorIndexFromPalette

public short getColorIndexFromPalette(float val, float lo, float hi)

getColorScheme

public static final int getColorScheme(String colorScheme, boolean isOverloaded)

getColorScheme

private static final int getColorScheme(String colorScheme, boolean defaultToRoygb, boolean isOverloaded)

getColorSchemeArray

public static final int[] getColorSchemeArray(int palette)

getColorSchemeList

public static String getColorSchemeList(int[] scheme)

getColorSchemeName

public String getColorSchemeName()

getColorSchemeName

public static final String getColorSchemeName(int i)

getRasmolScale

public static int[] getRasmolScale(boolean forceNew)

getState

public static final String getState(StringBuffer sfunc)

makeColorScheme

public static int makeColorScheme(String name, int[] scale, boolean isOverloaded)

quantize

public static final int quantize(float val, float lo, float hi, int segmentCount)

schemeIndex

private static final int schemeIndex(String colorScheme)

setColorScheme

public int setColorScheme(String colorScheme)

setUserScale

public static final void setUserScale(int[] scale)