org.das2.graph.DasColorBar.Type
enumeration of the types of colorbars.
Type( String desc, int[] colorTable )
create a new color table Type.
COLOR_WEDGE
Rainbow colorbar used by default. TODO: this is a misnomer, where
color_wedge was the type of object in das1, not the instance of the type,
and this should be renamed to "rainbow"
APL_RAINBOW_BLACK0
rainbow colorbar used at APL that has black at the bottom.
APL_RAINBOW_WHITE0
rainbow colorbar used at APL that has white at the bottom.
APL_COLOR_QUANTIZATION
Colorbar to make adjacent values distinct (particularly useful for Color Scatter plots).
GSFC_RP_SPECIAL
rainbow colorbar introduced for use at Goddard Space Flight Center.
MATLAB_JET
Mimic the default Matlab colorbar for comparison with Matlab-generated spectrograms.
MATLAB_JET_BLACK0
Mimic the default Matlab colorbar for comparison with Matlab-generated spectrograms, but with black for the bottom most color.
MATLAB_HSV
Mimic the default Matlab colorbar HSV.
BLUE_TO_ORANGE
BLUE_WHITE_ORANGE
blue-white-orange is a modified BLUE_TO_ORANGE, but visits white in the middle. Requested by iwc.
BLUE_GREEN_WHITE_YELLOW_RED
blue-green-white-yellow-red was provided by iwc.
RED_CYAN_BLUE_YELLOW_RED
modulo colorbar has same start and end, so it can be used to show angles.
GRAYSCALE
gray scale with white at the minimum (bottom) and black at the maximum.
INVERSE_GRAYSCALE
gray scale with black at the minimum (bottom) and white at the maximum.
WRAPPED_COLOR_WEDGE
rainbow that wraps around so that the top and bottom are the same color,
When used with care this is useful for spaces that wrap around (modulo),
such as longitude.
BLUE_BLACK_RED_WEDGE
colorbar with black in the middle, blue at the minimum and red at the maximum
for showing deviations from the center.
BLUE_WHITE_RED_WEDGE
colorbar with white in the middle, blue at the minimum and red at the maximum
for showing deviations from the center.
BLACK_RED
black to red, introduced to show the red component of RGB images
BLACK_GREEN
black to green, introduced to show the green component of RGB images
BLACK_BLUE
black to blue, introduced to show the blue component of RGB images
WHITE_RED
white to red, introduced to show grayscale-like image with color for comparisons
WHITE_GREEN
white to green, introduced to show grayscale-like image with color for comparisons
WHITE_BLUE
white to blue, introduced to show grayscale-like image with color for comparisons
WHITE_BLUE_BLACK
white to blue to black
INVERSE_WHITE_BLUE_BLACK
black to blue to white
VIOLET_YELLOW
Violet -Yellow
SCIPY_PLASMA
SciPy Plasma
AJ4CO_RAINBOW
AJ4CO_RAINBOW for Radio JOVE community
drawListIcon
drawListIcon( java.awt.Graphics2D g, int x, int y ) → void
Parameters
g - a Graphics2D
x - an int
y - an int
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getAllTypes
getAllTypes( ) → List
return a list of all defined Types, in the order in which they were constructed.
Returns:
list of Type objects.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getColorCount
getColorCount( ) → int
Return the number of colors in the color bar. Fill (gray) is an additional
color, and it's understood that the colors indeces from 0 to getColorCount()-1
are the color wedge, and getColorCount() is the fill color.
Returns:
the number of colors.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getHorizontalScaledImage
getHorizontalScaledImage( int width, int height ) → BufferedImage
return an image showing the colors from left to right.
Parameters
width - the width of the image
height - the height of the image
Returns:
the image
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getListIcon
getListIcon( ) → Icon
Returns:
javax.swing.Icon
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getListLabel
getListLabel( ) → String
Returns:
java.lang.String
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getRGB
getRGB( int index ) → int
return the RGB encoded color for the index.
Parameters
index - the index, from 0 to getColorCount().
Returns:
the RGB color
See Also:
Color#Color(int)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getVerticalScaledImage
getVerticalScaledImage( int width, int height ) → BufferedImage
return an image showing the colors from bottom to top.
Parameters
width - the width of the image
height - the height of the image
Returns:
the image
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
makeColorTable
makeColorTable( int[] index, int[] red, int[] green, int[] blue, int ncolor, int bottom, int top ) → int
returns a color table with interpolated colors for the wedge from 0 to ncolor-1, and at ncolor, the fill color.
Parameters
index - set of indeces that are control points for interpolation, including 0 and ncolor-1.
red - the red value from 0 to 255 at each index
green - the green value from 0 to 255 at each index
blue - the blue value from 0 to 255 at each index
ncolor - number of colors, typically COLORTABLE_SIZE=240.
bottom - the bottom, typically 0.
top - the top, typically COLORTABLE_SIZE=240.
Returns:
an array of RGB colors.
See Also:
Color#Color(int)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
maybeInitializeIcon
maybeInitializeIcon( ) → void
initialize the icon representing this colorbar, if not done already.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
parse
parse( String s ) → Type
from the string, identify the type.
Parameters
s - string like "apl_rainbow_black0"
Returns:
type like Type.APL_RAINBOW_BLACK0.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
toString
toString( ) → String
Returns:
java.lang.String
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]