|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.util.ContourInfo
public class ContourInfo
A class to hold and transfer contour level settings, as to and from the dialog box ContLevelDialog.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
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(String params)
Create a contour info with the parameters encoded in the string |
|
ContourInfo(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(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(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(String levelsString,
float base,
float min,
float max,
boolean labelOn,
boolean dashOn,
boolean isColorFilled,
int width,
int dashedStyle,
int labelFreq,
int labelSize,
Object font,
boolean align)
Construct an object to hold and transfer contour level settings, such as to and from the dialog box ContLevelDialog. |
|
| Method Summary | |
|---|---|
float[] |
asArray()
Return the contour parameters as an array. |
static String |
cleanupUserLevelString(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(String levelString)
Get the contour levels from the given string. |
int |
getDashedStyle()
Get the dash style |
boolean |
getDashOn()
Get the dashing flag |
Object |
getFont()
Get the font. |
float |
getInterval()
Get the contour interval |
boolean |
getIntervalDefined()
See if an interval has been defined. |
String |
getIntervalString()
Get the interval as a string. |
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 |
getLabelSize()
Get the label (font) size. |
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(String intervalString)
See if a levelsString is an regular or an irregular interval. |
void |
processParamString(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(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 |
setLabelSize(int size)
Get the label (font) size |
void |
setLevelsString(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 |
String |
toString()
Return a String representation of this object |
void |
tweakIntervalForDash()
Tweak the interval for dashing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
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 contours
public 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 width
public ContourInfo(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 width
public ContourInfo(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(String levelsString,
float base,
float min,
float max,
boolean labelOn,
boolean dashOn,
boolean isColorFilled,
int width,
int dashedStyle,
int labelFreq,
int labelSize,
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 - dashedStylelabelSize - 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 same
public 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 not
public ContourInfo(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 width
public 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 width
public 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(String params)
params - The string params| Method Detail |
|---|
public void processParamString(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(String v)
v - new interval stringpublic 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 String getIntervalString()
public String getIntervalString(boolean useDecimalFormat)
useDecimalFormat - format as decimal for XML storage
public String toString()
toString in class Objectpublic 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(String levelString)
levelString - string representation of the levels
public int getLabelFreq()
public void setLabelFreq(int freq)
freq - the label frequencypublic int getLabelSize()
public void setLabelSize(int size)
size - the label (font) sizepublic Object getFont()
public void setFont(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 String cleanupUserLevelString(String levelString)
levelString - string representation of the levels
public static boolean isIrregularInterval(String intervalString)
intervalString - to check
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||