|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.util.ColorTable
public class ColorTable
Holds a name and a 2D float array that represents a color table
| Nested Class Summary | |
|---|---|
static class |
ColorTable.Breakpoint
Class Breakpoint _more_ |
| Field Summary | |
|---|---|
static String |
CATEGORY_ATD_RADAR
the Atd-Radar category |
static String |
CATEGORY_BASIC
The "Basic" category |
static String |
CATEGORY_MISC
The Miscellaneous category |
static String |
CATEGORY_RADAR
The Radar category |
static String |
CATEGORY_SATELLITE
The Satellite category |
static String |
CATEGORY_SOLID
The solid category |
static int |
IDX_ALPHA
_more_ |
static int |
IDX_BLUE
_more_ |
static int |
IDX_GREEN
_more_ |
static int |
IDX_RED
_more_ |
| Constructor Summary | |
|---|---|
ColorTable()
Default constructor |
|
ColorTable(ColorTable otherTable)
Copy constructor |
|
ColorTable(String name,
String category,
float[][] table)
Create a new ColorTable. |
|
ColorTable(String id,
String name,
String category,
float[][] table)
Create a new ColorTable. |
|
ColorTable(String id,
String name,
String category,
float[][] table,
boolean tableFlipped)
Create a new ColorTable. |
|
| Method Summary | |
|---|---|
static float[][] |
addAlpha(ColorTable colorTable)
Wrapper around addAlpha(float[][]). |
static float[][] |
addAlpha(float[][] colorTable)
Make a color-alpha table for VisAD displays mapped to Display.RGBA; the 4th entry at each level being alpha (1.0) for transparency. |
static float[][] |
changeTransparency(float[][] colorTable,
float alpha)
Revise a color-alpha table for VisAD displays mapped to Display.RGBA; the 4th entry at each level (alpha) is reset to input arg alpha |
String |
dataToString()
Output the table as a String. |
boolean |
equalsTable(ColorTable other)
See if another color table is equivalent to this one |
boolean |
getActive()
Get the active flag. |
float[][] |
getAlphaTable()
Get the table with alpha. |
ArrayList |
getBreakpoints()
Get the breakpoints for this table. |
String |
getCategory()
Get the table category. |
ArrayList<Color> |
getColorList()
Convert the colorTable into a list of Color-s |
float[][] |
getColorTable()
Get the color table pallette. |
String |
getDescription()
Get the table description |
String |
getId()
Get the ID of this table |
String |
getName()
Get the name of this table. |
float[][] |
getNonAlphaTable()
Get the table without alpha values. |
Range |
getRange()
Get the Range for this color table. |
float[] |
getScaleFactor()
Get the ScaleFactor property. |
float[][] |
getTable()
Set the color table pallette Note: this is around for legacy purposes and we will move to a new setTableArray/getTableArray method |
ColorTable |
init(String name,
String category,
ArrayList colors,
ArrayList scales,
ArrayList breakpoints,
Range r)
Initialize a color table a new ColorTable. |
ColorTable |
init(String name,
String category,
ArrayList colors,
ArrayList breakpoints,
Range r)
Initialize a color table a new ColorTable. |
String |
print()
Print the table info |
static float[][] |
removeAlpha(float[][] colorTable)
Remove the alpha values |
void |
setActive(boolean a)
Set the active flag. |
void |
setBreakpoints(ArrayList l)
Set the breakpoints for this color table. |
void |
setCategory(String category)
Set the table category. |
void |
setDescription(String description)
Set the table description |
void |
setId(String id)
Set the id of this table |
void |
setName(String name)
Set the name of this table |
void |
setRange(Range r)
Set the range for this table. |
void |
setScaleFactor(float[] value)
Set the ScaleFactor property. |
void |
setTable(ArrayList colors)
Set the table with a list of colors |
void |
setTable(float[][] table)
Set the color table pallette Note: this is around for legacy purposes and we will move to a new setTableArray/getTableArray method |
void |
setTableArray(float[][] table)
_more_ |
void |
setTransparency(float alpha)
_more_ |
String |
toString()
Get a descriptive String for this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int IDX_RED
public static final int IDX_GREEN
public static final int IDX_BLUE
public static final int IDX_ALPHA
public static final String CATEGORY_BASIC
public static final String CATEGORY_MISC
public static final String CATEGORY_SATELLITE
public static final String CATEGORY_RADAR
public static final String CATEGORY_SOLID
public static final String CATEGORY_ATD_RADAR
| Constructor Detail |
|---|
public ColorTable(ColorTable otherTable)
otherTable - other table to copypublic ColorTable()
public ColorTable(String name,
String category,
float[][] table)
name - name of the tablecategory - category of the tabletable - table values
public ColorTable(String id,
String name,
String category,
float[][] table)
id - id of the tablename - name of the tablecategory - category of the tabletable - table values
public ColorTable(String id,
String name,
String category,
float[][] table,
boolean tableFlipped)
id - id of the tablename - name of the tablecategory - category of the tabletable - table valuestableFlipped - flipped flag| Method Detail |
|---|
public ColorTable init(String name,
String category,
ArrayList colors,
ArrayList breakpoints,
Range r)
name - name of the tablecategory - category of the tablecolors - table colorsbreakpoints - breakpointsr - Range of values
public ColorTable init(String name,
String category,
ArrayList colors,
ArrayList scales,
ArrayList breakpoints,
Range r)
name - name of the tablecategory - category of the tablecolors - table colorsscales - _more_breakpoints - breakpointsr - Range of values
public boolean equalsTable(ColorTable other)
other - other table to check
public void setRange(Range r)
r - rangepublic Range getRange()
public void setActive(boolean a)
a - true for activepublic boolean getActive()
public void setBreakpoints(ArrayList l)
l - list of breakpointspublic ArrayList getBreakpoints()
public float[][] getNonAlphaTable()
public float[][] getAlphaTable()
public float[][] getColorTable()
public void setTable(float[][] table)
table - table of valuespublic float[][] getTable()
public void setTableArray(float[][] table)
table - _more_public String getName()
getName in interface NamedObjectpublic void setName(String name)
setName in interface NamedObjectname - the new namepublic String getId()
public void setId(String id)
id - the table idpublic String getDescription()
getDescription in interface NamedObjectpublic void setDescription(String description)
description - the table descriptionpublic String getCategory()
public void setCategory(String category)
category - the new categorypublic String dataToString()
public String print()
public String toString()
toString in class Objectpublic void setTable(ArrayList colors)
colors - list of colorspublic ArrayList<Color> getColorList()
public static final float[][] addAlpha(ColorTable colorTable)
addAlpha(float[][]).
colorTable - color table to use
public static final float[][] removeAlpha(float[][] colorTable)
colorTable - color table values
public static final float[][] addAlpha(float[][] colorTable)
colorTable - a float [3][len], any usual VisAd color table
public void setTransparency(float alpha)
alpha - _more_
public static final float[][] changeTransparency(float[][] colorTable,
float alpha)
colorTable - a float [4][len], a VisAd color-alpha tablealpha - the new alpha value
public void setScaleFactor(float[] value)
value - The new value for ScaleFactorpublic float[] getScaleFactor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||