|
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.NFColorExpression
public class NFColorExpression
The NFHeatmapColorExpression class contains attributes for a single color expression. Each color expression has an operator, value(s) to compare against, and a color to use if the expression is true. The BETWEEN operator is the only operator that uses two compare values as follows: value1 < x < value2.
Field Summary | |
---|---|
static int |
BETWEEN
Between operator |
static int |
DEFAULT_OPERATOR
Default value for the operator if not specified. |
static double |
DEFAULT_VALUE1
Default value for value1 if not specified. |
static double |
DEFAULT_VALUE2
Default value for value2 if not specified. |
static int |
EQUALS
Equals operator |
static int |
GREATER_THAN
Greater than operator |
static int |
GREATER_THAN_OR_EQUAL
Greater than or equal operator |
static int |
LESS_THAN
Less than operator |
static int |
LESS_THAN_OR_EQUAL
Less than or equal operator |
static int |
NOT_EQUALS
Not equals operator |
Constructor Summary | |
---|---|
NFColorExpression()
Constructs a color expression object with defaults |
|
NFColorExpression(int operator,
double value,
java.awt.Color color)
Constructs a color expression object with the specified operator, value and color. |
|
NFColorExpression(int operator,
double value1,
double value2,
java.awt.Color color)
Constructs a color expression object with the specified operator, compare values and color. |
Method Summary | |
---|---|
java.lang.String |
getCDL()
Generate CDL parameters representing the color expression |
void |
getCDL(java.lang.StringBuffer sb,
boolean includeParens)
Append CDL parameters representing the color expression to the given StringBuffer. |
java.awt.Color |
getColor()
Returns the color to use if the expression is true |
int |
getOperator()
Returns the expression operator |
double |
getValue1()
Returns the value to compare against |
double |
getValue2()
Returns the second compare value used for the BETWEEN operator |
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 |
setColor(java.awt.Color color)
Sets the color to use if the expression is true |
void |
setOperator(int operator)
Sets the expression operator |
void |
setValue1(double value1)
Sets the value to compare against |
void |
setValue2(double value2)
Sets the second compare value used for the BETWEEN operator. |
java.lang.String |
toString()
Returns a String object representing the color expression. |
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 EQUALS
public static final int NOT_EQUALS
public static final int GREATER_THAN
public static final int GREATER_THAN_OR_EQUAL
public static final int LESS_THAN
public static final int LESS_THAN_OR_EQUAL
public static final int BETWEEN
public static final int DEFAULT_OPERATOR
public static final double DEFAULT_VALUE1
public static final double DEFAULT_VALUE2
Constructor Detail |
---|
public NFColorExpression()
public NFColorExpression(int operator, double value, java.awt.Color color)
public NFColorExpression(int operator, double value1, double value2, java.awt.Color color)
Method Detail |
---|
public void setOperator(int operator)
If the specified expression operator is not valid then an IllegalArgumentException will be thrown.
operator
- expression operatorpublic int getOperator()
DEFAULT_OPERATOR
if not setpublic void setValue1(double value1)
value1
- compare valuepublic double getValue1()
DEFAULT_VALUE1
if not setpublic void setValue2(double value2)
BETWEEN
operator.
For example, if value1 is set to 1 and value2 is set to 10 then
the expression would be: 1 < cell value < 10.
value2
- second compare valuepublic double getValue2()
BETWEEN
operator
DEFAULT_VALUE2
if not setpublic void setColor(java.awt.Color color)
color
- expression colorpublic java.awt.Color getColor()
public java.lang.String getCDL()
getCDL
in interface NFCDLGenerator
(operator, value1, value2, color)
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:
(operator, value1, value2, color)
public int setCDL(java.lang.String[] elements, int offset)
elements
- Array of parameter elements. This array is expected
to contain consecutive elements containing operator,
value1, value2 and color.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 |