|
NetCharts Pro | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetcharts.pro.common.NFBaseClass
netcharts.pro.common.NFColorSpectrum
public class NFColorSpectrum
Defines attributes for a color spectrum. A color spectrum is generated from two colors which are the starting and ending colors and from the number of steps which is the number of color buckets. The minimum and maximim values represent the data range for the entire spectrum. Each color bucket in the spectrum represents a certain data range. So if a data point falls within that range, it will be shown with its associated color. The spectrum colors start at color1, go to white or almost white, depending on the number of steps, and then end at color2. The number of steps determines the amount each color bucket is changed by and the data values each color represents.
Field Summary | |
---|---|
static double |
DEFAULT_MAX
Default value for the max value if not specified. |
static double |
DEFAULT_MIN
Default value for the min value if not specified. |
static int |
DEFAULT_NUM_STEPS
Default value for the number of steps if not specified. |
static int |
MIN_STEPS
Minimum number of steps allowed |
Constructor Summary | |
---|---|
NFColorSpectrum()
Constructs a default color spectrum object. |
|
NFColorSpectrum(java.awt.Color color1,
java.awt.Color color2)
Constructs a color spectrum object from the specified colors. |
|
NFColorSpectrum(java.awt.Color color1,
java.awt.Color color2,
double min,
double max,
int numSteps)
Constructs a color spectrum object from the specified colors, minimum value, maximum value and number of steps. |
|
NFColorSpectrum(java.awt.Color color1,
java.awt.Color color2,
int numSteps)
Constructs a color spectrum object from the specified colors and the specified number of steps. |
Method Summary | |
---|---|
java.lang.String |
getCDL()
Generate CDL parameters representing the color spectrum |
void |
getCDL(java.lang.StringBuffer sb,
boolean includeParens)
Append CDL parameters representing the color spectrum to the given StringBuffer. |
java.awt.Color |
getColor1()
Returns the color to start with in the spectrum |
java.awt.Color |
getColor2()
Returns the color to end with in the spectrum |
double |
getMax()
Return the maximum range value for the color spectrum. |
double |
getMin()
Return the minimum range value for the color spectrum. |
int |
getNumSteps()
Returns the number of steps in the spectrum. |
void |
setCDL(java.lang.String cdl)
Configures this object from a CDL parameter representation. |
int |
setCDL(java.lang.String[] elements,
int offset)
Configures this object from a CDL parameter representation. |
void |
setColor1(java.awt.Color color1)
Sets the color to start with in the spectrum |
void |
setColor2(java.awt.Color color2)
Sets the color to end with in the spectrum |
void |
setMax(double max)
Set the maximum range value for the color spectrum. |
void |
setMin(double min)
Set the minimum range value for the color spectrum. |
void |
setNumSteps(int numSteps)
Sets the number of steps in the spectrum. |
java.lang.String |
toString()
Returns a String object representing the color spectrum. |
Methods inherited from class netcharts.pro.common.NFBaseClass |
---|
clone, getModified, getUserObject, setModified, setUserObject |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_NUM_STEPS
public static final double DEFAULT_MIN
public static final double DEFAULT_MAX
public static final int MIN_STEPS
Constructor Detail |
---|
public NFColorSpectrum()
public NFColorSpectrum(java.awt.Color color1, java.awt.Color color2)
public NFColorSpectrum(java.awt.Color color1, java.awt.Color color2, int numSteps)
public NFColorSpectrum(java.awt.Color color1, java.awt.Color color2, double min, double max, int numSteps)
Method Detail |
---|
public void setColor1(java.awt.Color color1)
color1
- starting colorpublic java.awt.Color getColor1()
public void setColor2(java.awt.Color color2)
color2
- ending colorpublic java.awt.Color getColor2()
public void setMin(double min)
min
- minimum range valuepublic double getMin()
DEFAULT_MIN
if not setpublic void setMax(double max)
max
- maximum range valuepublic double getMax()
DEFAULT_MAX
if not setpublic void setNumSteps(int numSteps)
MIN_STEPS
.
numSteps
- number of stepspublic int getNumSteps()
MIN_STEPS
.
DEFAULT_NUM_STEPS
if not setpublic java.lang.String getCDL()
getCDL
in interface NFCDLGenerator
(color1, color2, min, max, numSteps)
public void getCDL(java.lang.StringBuffer sb, boolean includeParens)
sb
- Target buffer to append the CDL parametersincludeParens
- If true, this will cause the parameters to be delimited
with parenthesis.public java.lang.String toString()
toString
in interface NFCDLGenerator
toString
in class java.lang.Object
public void setCDL(java.lang.String cdl)
setCDL
in interface NFCDLGenerator
cdl
- CDL in the form:
(color1, color2, min, max, numSteps)
public int setCDL(java.lang.String[] elements, int offset)
elements
- Array of parameter elements. This array is expected
to contain consecutive elements containing color1,
color2, min value, max value, and number of steps.offset
- Offset into the elements array.
|
NetCharts Pro | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Visual Mining, Inc. | Copyright © Visual Mining, Inc. 1996 - 2011 |
Last Modified: Jun 28, 2011 |