public class ContourInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DASH_DOT_STYLE
Dash-Dot line
|
static int |
DASH_STYLE
Dashed line
|
static boolean |
DEFAULT_DASH
Default contour dashing setting
|
static int |
DEFAULT_DASHED_STYLE
Default contour line style
|
static boolean |
DEFAULT_FILL
Default contour color fill value
|
static boolean |
DEFAULT_LABEL
Default contour labeling setting
|
static boolean |
DEFAULT_LABEL_ALIGNMENT
Default contour labeling alignment setting
|
static int |
DEFAULT_LABEL_FREQ
Default label frequency (per qualifying contour line)
|
static int |
DEFAULT_LABEL_SIZE
Default label size
|
static int |
DEFAULT_LINE_WIDTH
Default contour line width
|
static int |
DOT_STYLE
Dotted line
|
Constructor and Description |
---|
ContourInfo()
Construct an object to hold and transfer contour level settings,
such as to and from the dialog box ContLevelDialog using the
default values.
|
ContourInfo(ContourInfo s)
Copy constructor.
|
ContourInfo(double interval,
double base,
double min,
double max)
Construct an object to hold and transfer contour level settings,
such as to and from the dialog box ContLevelDialog.
|
ContourInfo(double interval,
double base,
double min,
double max,
boolean labelOn,
boolean dashOn)
Construct an object to hold and transfer contour level settings,
such as to and from the dialog box ContLevelDialog.
|
ContourInfo(double interval,
double base,
double min,
double max,
boolean labelOn,
boolean dashOn,
int width)
Construct an object to hold and transfer contour level settings,
such as to and from the dialog box ContLevelDialog.
|
ContourInfo(float[] values)
Create a ContourInfo from a float array.
|
ContourInfo(float interval,
float base,
float min,
float max)
Construct an object to hold and transfer contour level settings,
such as to and from the dialog box ContLevelDialog.
|
ContourInfo(float interval,
float base,
float min,
float max,
boolean labelOn,
boolean dashOn,
boolean isColorFilled)
Construct an object to hold and transfer contour level settings,
such as to and from the dialog box ContLevelDialog.
|
ContourInfo(float interval,
float base,
float min,
float max,
boolean labelOn,
boolean dashOn,
boolean isColorFilled,
int width)
Construct an object to hold and transfer contour level settings,
such as to and from the dialog box ContLevelDialog.
|
ContourInfo(java.lang.String params)
Create a contour info with the parameters encoded in the string
|
ContourInfo(java.lang.String levelsString,
double base,
double min,
double max,
boolean labelOn,
boolean dashOn,
boolean isColorFilled,
double width)
Construct an object to hold and transfer contour level settings,
such as to and from the dialog box ContLevelDialog.
|
ContourInfo(java.lang.String levelsString,
float base,
float min,
float max,
boolean labelOn,
boolean dashOn,
boolean isColorFilled,
int width)
Construct an object to hold and transfer contour level settings,
such as to and from the dialog box ContLevelDialog.
|
ContourInfo(java.lang.String levelsString,
float base,
float min,
float max,
boolean labelOn,
boolean dashOn,
boolean isColorFilled,
int width,
int dashedStyle)
Construct an object to hold and transfer contour level settings,
such as to and from the dialog box ContLevelDialog.
|
ContourInfo(java.lang.String levelsString,
float base,
float min,
float max,
boolean labelOn,
boolean dashOn,
boolean isColorFilled,
int width,
int dashedStyle,
int labelFreq,
int labelLineSkip,
int labelSize,
java.lang.Object font,
boolean align)
Construct an object to hold and transfer contour level settings,
such as to and from the dialog box ContLevelDialog.
|
ContourInfo(java.lang.String levelsString,
float base,
float min,
float max,
boolean labelOn,
boolean dashOn,
boolean isColorFilled,
int width,
int dashedStyle,
int labelFreq,
int labelSize,
java.lang.Object font,
boolean align)
Construct an object to hold and transfer contour level settings,
such as to and from the dialog box ContLevelDialog.
|
Modifier and Type | Method and Description |
---|---|
float[] |
asArray()
Return the contour parameters as an array.
|
static java.lang.String |
cleanupUserLevelString(java.lang.String levelString)
Clean up the user entered levels string
|
boolean |
getAlignLabels()
Get the label alignment
|
float |
getBase()
Get the contour base
|
boolean |
getBaseDefined()
See if the base has been defined.
|
float[] |
getContourLevels()
Get the contour levels.
|
float[] |
getContourLevels(java.lang.String levelString)
Get the contour levels from the given string.
|
int |
getDashedStyle()
Get the dash style
|
boolean |
getDashOn()
Get the dashing flag
|
java.lang.Object |
getFont()
Get the font.
|
float |
getInterval()
Get the contour interval
|
boolean |
getIntervalDefined()
See if an interval has been defined.
|
java.lang.String |
getIntervalString()
Get the interval as a string.
|
java.lang.String |
getIntervalString(boolean useDecimalFormat)
Get the interval as a string.
|
boolean |
getIsFilled()
Get the color fill flag.
|
boolean |
getIsLabeled()
Get the labelling flag
|
int |
getLabelFreq()
Get the label frequency.
|
int |
getLabelLineSkip() |
int |
getLabelSize()
Get the label (font) size.
|
java.lang.String |
getLevelsString()
Get the contour interval string
|
int |
getLineWidth()
Get the line width.
|
float |
getMax()
Get the contour maximum
|
boolean |
getMaxDefined()
See if the max has been defined.
|
float |
getMin()
Get the contour minimum
|
boolean |
getMinDefined()
See if the min has been defined.
|
boolean |
isDefined()
See if this has been defined
|
static boolean |
isIrregularInterval(java.lang.String intervalString)
See if a levelsString is an regular or an irregular
interval.
|
void |
processParamString(java.lang.String params)
Process the params string.
|
void |
set(ContourInfo that)
Set the contour parameters for this from another contour info.
|
void |
setAlignLabels(boolean align)
Set the label alignment.
|
void |
setBase(float v)
Set the contour base
|
void |
setDashedStyle(int v)
Set the dash style
|
void |
setDashOn(boolean v)
Set the dashing flag
|
void |
setFont(java.lang.Object font)
Set the font.
|
void |
setIfDefined(ContourInfo that)
Set the parameters if they are defined in the other.
|
void |
setInterval(float v)
Set the contour interval
|
void |
setIsFilled(boolean fill)
Set the color fill flag
|
void |
setIsLabeled(boolean v)
Set the labelling flag
|
void |
setLabelFreq(int freq)
Get the label frequency
|
void |
setLabelLineSkip(int labelLineSkip) |
void |
setLabelSize(int size)
Get the label (font) size
|
void |
setLevelsString(java.lang.String v)
Set the irregular contour intervals string
|
void |
setLineWidth(int width)
Set the line width.
|
void |
setMax(float v)
Set the contour maximum
|
void |
setMin(float v)
Set the contour minimum
|
java.lang.String |
toString()
Return a String representation of this object
|
void |
tweakIntervalForDash()
Tweak the interval for dashing.
|
public static final boolean DEFAULT_LABEL
public static final boolean DEFAULT_LABEL_ALIGNMENT
public static final boolean DEFAULT_DASH
public static final boolean DEFAULT_FILL
public static final int DEFAULT_LINE_WIDTH
public static final int DASH_STYLE
public static final int DOT_STYLE
public static final int DASH_DOT_STYLE
public static final int DEFAULT_DASHED_STYLE
public static final int DEFAULT_LABEL_SIZE
public static final int DEFAULT_LABEL_FREQ
public ContourInfo(float interval, float base, float min, float max, boolean labelOn, boolean dashOn, boolean isColorFilled)
interval
- the contour intervalbase
- the contour level below which one line must havemin
- the lower limit of plotted contour valuesmax
- the upper limit of samelabelOn
- whether labels aredashOn
- whether lines below base value are dashed or notisColorFilled
- flag for color filling contourspublic ContourInfo(float interval, float base, float min, float max, boolean labelOn, boolean dashOn, boolean isColorFilled, int width)
interval
- the contour intervalbase
- the contour level below which one line must havemin
- the lower limit of plotted contour valuesmax
- the upper limit of samelabelOn
- whether labels aredashOn
- whether lines below base value are dashed or notisColorFilled
- flag for color filling contourswidth
- line widthpublic ContourInfo(java.lang.String levelsString, float base, float min, float max, boolean labelOn, boolean dashOn, boolean isColorFilled, int width)
levelsString
- the contour levels as a stringbase
- the contour level below which one line must havemin
- the lower limit of plotted contour valuesmax
- the upper limit of samelabelOn
- whether labels aredashOn
- whether lines below base value are dashed or notisColorFilled
- flag for color filling contourswidth
- line widthpublic ContourInfo(java.lang.String levelsString, float base, float min, float max, boolean labelOn, boolean dashOn, boolean isColorFilled, int width, int dashedStyle)
levelsString
- the contour levels as a stringbase
- the contour level below which one line must havemin
- the lower limit of plotted contour valuesmax
- the upper limit of samelabelOn
- whether labels aredashOn
- whether lines below base value are dashed or notisColorFilled
- flag for color filling contourswidth
- line widthdashedStyle
- dashedStyle;public ContourInfo(java.lang.String levelsString, float base, float min, float max, boolean labelOn, boolean dashOn, boolean isColorFilled, int width, int dashedStyle, int labelFreq, int labelSize, java.lang.Object font, boolean align)
levelsString
- the contour levels as a stringbase
- the contour level below which one line must havemin
- the lower limit of plotted contour valuesmax
- the upper limit of samelabelOn
- whether labels aredashOn
- whether lines below base value are dashed or notisColorFilled
- flag for color filling contourswidth
- line widthdashedStyle
- dashedStylelabelFreq
- how many times to label each linelabelSize
- the label (font) sizefont
- the font - Font or HersheyFontalign
- the label alignment - true to be along contourspublic ContourInfo(java.lang.String levelsString, float base, float min, float max, boolean labelOn, boolean dashOn, boolean isColorFilled, int width, int dashedStyle, int labelFreq, int labelLineSkip, int labelSize, java.lang.Object font, boolean align)
levelsString
- the contour levels as a stringbase
- the contour level below which one line must havemin
- the lower limit of plotted contour valuesmax
- the upper limit of samelabelOn
- whether labels aredashOn
- whether lines below base value are dashed or notisColorFilled
- flag for color filling contourswidth
- line widthdashedStyle
- dashedStylelabelFreq
- how many times to label each linelabelLineSkip
- label every Nth linelabelSize
- the label (font) sizefont
- the font - Font or HersheyFontalign
- the label alignment - true to be along contourspublic ContourInfo()
public ContourInfo(double interval, double base, double min, double max)
interval
- the contour intervalbase
- the contour level below which one line must havemin
- the lower limit of plotted contour valuesmax
- the upper limit of samepublic ContourInfo(double interval, double base, double min, double max, boolean labelOn, boolean dashOn)
interval
- the contour intervalbase
- the contour level below which one line must havemin
- the lower limit of plotted contour valuesmax
- the upper limit of samelabelOn
- whether labels aredashOn
- whether lines below base value are dashed or notpublic ContourInfo(java.lang.String levelsString, double base, double min, double max, boolean labelOn, boolean dashOn, boolean isColorFilled, double width)
levelsString
- the contour levels as a stringbase
- the contour level below which one line must havemin
- the lower limit of plotted contour valuesmax
- the upper limit of samelabelOn
- whether labels aredashOn
- whether lines below base value are dashed or notisColorFilled
- flag for color filling contourswidth
- line widthpublic ContourInfo(double interval, double base, double min, double max, boolean labelOn, boolean dashOn, int width)
interval
- the contour intervalbase
- the contour level below which one line must havemin
- the lower limit of plotted contour valuesmax
- the upper limit of samelabelOn
- whether labels aredashOn
- whether lines below base value are dashed or notwidth
- line widthpublic ContourInfo(float interval, float base, float min, float max)
interval
- the contour intervalbase
- the contour level below which one line must havemin
- the lower limit of plotted contour valuesmax
- the upper limit of samepublic ContourInfo(ContourInfo s)
s
- ContourInfo to copy.public ContourInfo(float[] values)
values
- contour values (interval, base, min, max)public ContourInfo(java.lang.String params)
params
- The string paramspublic void processParamString(java.lang.String params)
&interval;base;min;max;or made up of any combination of name=value pairs. e.g.:interval=10;min=5;max=100;base=15;dashed=true;labels=false;
params
- The string paramspublic boolean isDefined()
public boolean getIntervalDefined()
public boolean getBaseDefined()
public boolean getMinDefined()
public boolean getMaxDefined()
public float getInterval()
public float getBase()
public float getMin()
public float getMax()
public void setIsLabeled(boolean v)
v
- true to labelpublic boolean getIsLabeled()
public void setDashOn(boolean v)
v
- true to dashpublic boolean getDashOn()
public void setInterval(float v)
v
- new intervalpublic void setLevelsString(java.lang.String v)
v
- new interval stringpublic java.lang.String getLevelsString()
public void setBase(float v)
v
- new basepublic void setMin(float v)
v
- new minimumpublic void setMax(float v)
v
- new maximumpublic void set(ContourInfo that)
that
- other ContourInfopublic void setIfDefined(ContourInfo that)
that
- other to usepublic float[] asArray()
public void tweakIntervalForDash()
public java.lang.String getIntervalString()
public java.lang.String getIntervalString(boolean useDecimalFormat)
useDecimalFormat
- format as decimal for XML storagepublic java.lang.String toString()
toString
in class java.lang.Object
public void setIsFilled(boolean fill)
fill
- true to color fillpublic boolean getIsFilled()
public void setLineWidth(int width)
width
- line width (pixels)public int getLineWidth()
public void setDashedStyle(int v)
v
- new dash stylepublic int getDashedStyle()
public float[] getContourLevels()
public float[] getContourLevels(java.lang.String levelString)
levelString
- string representation of the levelspublic int getLabelFreq()
public void setLabelFreq(int freq)
freq
- the label frequencypublic int getLabelLineSkip()
public void setLabelLineSkip(int labelLineSkip)
labelLineSkip
- the labelLineSkip to setpublic int getLabelSize()
public void setLabelSize(int size)
size
- the label (font) sizepublic java.lang.Object getFont()
public void setFont(java.lang.Object font)
font
- the font to set - must be a Font or HersheyFontpublic boolean getAlignLabels()
public void setAlignLabels(boolean align)
align
- - true for along contourspublic static java.lang.String cleanupUserLevelString(java.lang.String levelString)
levelString
- string representation of the levelspublic static boolean isIrregularInterval(java.lang.String intervalString)
intervalString
- to check