|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectutil.ColorScheme
public class ColorScheme
This class represents the color scheme for the amino acids in the alignment.
Field Summary | |
---|---|
static java.lang.String |
CLUSTAL_X
|
static java.util.HashMap<java.lang.Character,java.awt.Color> |
defScheme
Default Clustal X color scheme. |
static java.lang.String |
HDF
|
static java.util.HashMap<java.lang.Character,java.lang.Double> |
hdfScheme
Hdf color scheme. |
static java.lang.String |
MW
|
static java.util.HashMap<java.lang.Character,java.lang.Double> |
mwScheme
MW color scheme. |
static int |
PAL_RED_BLUE
|
static int |
PAL_RED_GREEN_BLUE
|
static int |
PALETTE_HEIGHT
|
static double |
PALETTE_STEPS
|
static int |
PALETTE_TEXT_MARGIN
|
static int |
PALETTE_WIDTH
|
static java.lang.String |
POL_G
|
static java.util.HashMap<java.lang.Character,java.lang.Double> |
polScheme
Pol G color scheme. |
static java.lang.String |
USER_DEF
|
Constructor Summary | |
---|---|
ColorScheme()
Constructor of the color scheme hash map. |
Method Summary | |
---|---|
static void |
addGradualScheme(java.util.HashMap<java.lang.Character,java.lang.Double> colorScheme,
java.lang.String schemeName)
Function to add a new numeric color scheme. |
static boolean |
containsKey(java.lang.Character key)
|
static java.awt.Color |
getColor(java.lang.Character key)
Get the color associated to residue on current color scheme |
static java.awt.Color |
getColorFromValue(double value,
double maxValue,
double minValue,
double scale,
int colorPalette)
Function to get the color associated to value in the specified range and palette. |
static int |
getColorPalette()
Getter for colorPallete |
static int |
getColorScheme()
Getter for new color scheme |
static java.util.Vector<java.lang.String> |
getColorSchemeNames()
|
static ColorSchemeInfo |
getPaletteImage()
Function which shows an image of the current palette |
static void |
init()
|
static boolean |
loadColorScheme(AlignFrame alignFrame)
Function which shows a file dialog to load a new color schema |
static void |
setColorPalette(int colorPaletteCode)
Changes color pallete and reclacule colors for all numeric color schemes |
static void |
setColorScheme(java.lang.String colorSchemeName)
Setter for new color scheme |
static void |
setUserDefSchemeValues(java.util.HashMap<java.lang.Character,java.lang.Double> newUserDefSchemeValues)
Setter for user defined color scheme |
static void |
updatePaletteImage(ColorSchemeInfo paletteCanvas)
Function which shows an image of the current palette |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLUSTAL_X
public static final java.lang.String MW
public static final java.lang.String POL_G
public static final java.lang.String HDF
public static final java.lang.String USER_DEF
public static final int PAL_RED_GREEN_BLUE
public static final int PAL_RED_BLUE
public static final int PALETTE_WIDTH
public static final int PALETTE_HEIGHT
public static final int PALETTE_TEXT_MARGIN
public static final double PALETTE_STEPS
public static final java.util.HashMap<java.lang.Character,java.awt.Color> defScheme
public static final java.util.HashMap<java.lang.Character,java.lang.Double> mwScheme
public static final java.util.HashMap<java.lang.Character,java.lang.Double> polScheme
public static final java.util.HashMap<java.lang.Character,java.lang.Double> hdfScheme
Constructor Detail |
---|
public ColorScheme()
Method Detail |
---|
public static void init()
public static java.awt.Color getColor(java.lang.Character key)
Residue
- to find color
public static void setColorPalette(int colorPaletteCode)
Identifier
- of color palettepublic static int getColorPalette()
public static void setUserDefSchemeValues(java.util.HashMap<java.lang.Character,java.lang.Double> newUserDefSchemeValues)
New
- user defined color schemepublic static void addGradualScheme(java.util.HashMap<java.lang.Character,java.lang.Double> colorScheme, java.lang.String schemeName)
colorScheme
- HashMap with values of new color schemeschemeName
- Name of the new schemepublic static java.awt.Color getColorFromValue(double value, double maxValue, double minValue, double scale, int colorPalette)
value
- Value to get colormaxValue
- Maximum value in rangeminValue
- Minimum value in rangecolorPalette
- Identifier of the color palette
public static boolean containsKey(java.lang.Character key)
public static void setColorScheme(java.lang.String colorSchemeName)
colorSchemeName
- Selected color scheme namepublic static int getColorScheme()
public static java.util.Vector<java.lang.String> getColorSchemeNames()
public static boolean loadColorScheme(AlignFrame alignFrame)
alignFrame
- Main frame of the applicationpublic static ColorSchemeInfo getPaletteImage()
public static void updatePaletteImage(ColorSchemeInfo paletteCanvas)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |