public class ContourControl extends Control
| Modifier and Type | Field and Description |
|---|---|
static int |
EVERY_NTH_DEFAULT |
static int |
EVERY_NTH_MAX |
static int |
EVERY_NTH_MIN |
static int |
LABEL_FREQ_HI |
static int |
LABEL_FREQ_LO |
static int |
LABEL_FREQ_MED |
| Constructor and Description |
|---|
ContourControl(DisplayImpl d)
Construct a new ContourControl for the display
|
| Modifier and Type | Method and Description |
|---|---|
void |
addProjectionControlListener(ControlListener cl,
ProjectionControl pcntrl)
remove previous projListener from pcntrl, and save cl as
new projListener
|
Object |
clone() |
boolean |
contourFilled() |
void |
enableContours(boolean on)
set contour enable
|
void |
enableLabels(boolean on)
set label enable
|
boolean |
equals(Object o)
Indicates whether or not this instance equals an Object
|
boolean |
getAlignLabels() |
boolean |
getAutoSizeLabels() |
int |
getDashedStyle()
Get the line style for lines that are styled.
|
int |
getEveryNth() |
static double |
getInitScale() |
byte[] |
getLabelColor()
Gets the label color.
|
Object |
getLabelFont()
Get contour label font
|
int |
getLabelFreq() |
double |
getLabelSize() |
float[] |
getLevels(float[] lowhibase,
boolean[] dashes)
get 'new' descriptors for 2-D contour lines
|
void |
getMainContours(boolean[] bvalues,
float[] fvalues)
get parameters for IsoContour depictions
|
boolean |
getPublicSet() |
String |
getSaveString() |
void |
nullControl()
End this control (called by ScalarMap.nullDisplay()).
|
void |
reLabel()
If zoom scale has changed sufficiently, re-transform in
order to recompute labels.
|
void |
setAlignLabels(boolean flag)
Set the contour label alignment policy
|
void |
setAutoScaleLabels(boolean flag)
set enable for label auto-size
|
void |
setContourFill(boolean flag) |
void |
setContourInterval(float interval,
float low,
float hi,
float ba)
Sets the parameters for contour iso-lines.
|
void |
setContourLimits(float low,
float hi)
Set low and high iso-line levels
|
void |
setDashedStyle(int style)
Set the line style to apply to dashed lines.
|
void |
setEveryNth(int lineCount)
Set how often we label lines
|
void |
setLabelColor(byte[] color)
Sets the color for label.
|
void |
setLabelColor(byte[] color,
boolean change)
Sets the label color.
|
void |
setLabelFont(Object font)
Set the contour label Font
|
void |
setLabelFreq(int freq)
set label frequency
|
void |
setLabelSize(double factor)
set size for label auto-size
|
void |
setLevels(float[] levels,
float base,
boolean dash)
Set arbitrary levels for 2-D contour lines;
levels below base are dashed if dash == true
|
void |
setSaveString(String save)
reconstruct this ContourControl using the specified save string
|
void |
setSurfaceValue(float value)
Set level for iso-surfaces
|
void |
setSurfaceValue(float value,
boolean setLevels)
Set level for iso-surfaces
|
void |
syncControl(Control rmt)
copy the state of a remote control to this control
|
addControlListener, animation_string, changeControl, checkTicks, getDisplay, getDisplayRenderer, getInstanceNumber, incTick, peekTicks, removeControlListener, resetTicks, setTicks, subCheckTicks, subPeekTicks, subResetTicks, subSetTicks, toStringpublic static final int LABEL_FREQ_LO
public static final int LABEL_FREQ_MED
public static final int LABEL_FREQ_HI
public static final int EVERY_NTH_MIN
public static final int EVERY_NTH_DEFAULT
public static final int EVERY_NTH_MAX
public ContourControl(DisplayImpl d)
d - Display to associate with thispublic void setSurfaceValue(float value)
throws VisADException,
RemoteException
value - value of the iso-surface to displayVisADException - VisAD errorRemoteException - Java RMI failure.public void setSurfaceValue(float value,
boolean setLevels)
throws VisADException,
RemoteException
value - value of the iso-surface to displaysetLevels - true if this should be used for contour levelsVisADException - VisAD errorRemoteException - Java RMI failure.public void setContourInterval(float interval,
float low,
float hi,
float ba)
throws VisADException,
RemoteException
ControlListener.controlChanged(ControlEvent) method of all
registered listeners;interval - The contour interval. Must be non-zero. If
negative, then contour lines below the base will
be dashed. Must not be NaN.low - The minimum contour value. No contour line less
than this value will be drawn. Must not be NaN.hi - The maximum contour value. No contour line
greater than this value will be drawn. Must not
be NaN.ba - The base contour value. The contour lines will
be integer multiples of the interval away from
this value. Must not be NaN.VisADException - The interval is zero or too small.RemoteException - Java RMI failure.public void setContourLimits(float low,
float hi)
throws VisADException,
RemoteException
low - The minimum contour value. No contour line less
than this value will be drawn. Must not be NaN.hi - The maximum contour value. No contour line
greater than this value will be drawn. Must not
be NaN.VisADException - VisAD errorRemoteException - Java RMI failure.public boolean getPublicSet()
public void setLevels(float[] levels,
float base,
boolean dash)
throws VisADException,
RemoteException
levels - An array of contour values to display.base - The base contour value for dashing. Levels
below base are dashed if dash is truedash - flag for making dashed contours below the
base contour value.VisADException - VisAD errorRemoteException - Java RMI failure.public float[] getLevels(float[] lowhibase,
boolean[] dashes)
lowhibase - must be dimensioned float[3], where
lowhibase[0] used to return low limit
lowhibase[1] used to return high limit
lowhibase[2] used to return basedashes - must be dimensioned boolean[1], where
dashed[0] used to return dash enablepublic void enableLabels(boolean on)
throws VisADException,
RemoteException
on - new value for label enableVisADException - a VisAD error occurredRemoteException - an RMI error occurredpublic void enableContours(boolean on)
throws VisADException,
RemoteException
on - new value for contour enableVisADException - a VisAD error occurredRemoteException - an RMI error occurredpublic void getMainContours(boolean[] bvalues,
float[] fvalues)
throws VisADException
bvalues - must be dimensioned boolean[2], where
bvalues[0] used to return contour enable
bvalues[1] used to return label enablefvalues - must be dimensioned float[5], where
fvalues[0] used to return level for iso-surface
fvalues[1] used to return interval for iso-lines
fvalues[2] used to return low limit for iso-lines
fvalues[3] used to return high limit for iso-lines
fvalues[4] used to return base for iso-linesVisADException - a VisAD error occurredpublic void setContourFill(boolean flag)
throws VisADException,
RemoteException
VisADExceptionRemoteExceptionpublic boolean contourFilled()
public static double getInitScale()
public void setAutoScaleLabels(boolean flag)
flag - new value for label auto-size enablepublic boolean getAutoSizeLabels()
public void setAlignLabels(boolean flag)
throws RemoteException,
VisADException
flag - true: labels follow the contour line, false: labels are horizontal, default: trueVisADExceptionRemoteExceptionpublic boolean getAlignLabels()
public void setLabelColor(byte[] color)
throws RemoteException,
VisADException
color - RGB color array, if null label takes contour colorVisADExceptionRemoteExceptionpublic void setLabelColor(byte[] color,
boolean change)
throws RemoteException,
VisADException
color - RGB color array, if null label takes contour colorchange - If false, no ControlEvent is fired.RemoteExceptionVisADExceptionpublic byte[] getLabelColor()
public void setLabelFont(Object font) throws RemoteException, VisADException
font - can be java.awt.Font or visad.util.HersheyFont. The former are rendered as
filled polygons which can exhibit co-planar artifacts, the latter as lines
which will always be visible, front or back, on co-planar surfaces. Can be
null, the default, which results in the Times Roman HersheyFont.VisADExceptionRemoteExceptionpublic Object getLabelFont()
public void setLabelFreq(int freq)
throws VisADException,
RemoteException
freq - how many labels to attempt per lineVisADException - a VisAD error occurredRemoteException - an RMI error occurredpublic int getLabelFreq()
public int getEveryNth()
public void setEveryNth(int lineCount)
throws VisADException,
RemoteException
lineCount - how many lines to skip before next labeled lineVisADException - a VisAD error occurredRemoteException - an RMI error occurredpublic void setLabelSize(double factor)
throws VisADException,
RemoteException
factor - new size for label auto-sizeVisADException - a VisAD error occurredRemoteException - an RMI error occurredpublic double getLabelSize()
public int getDashedStyle()
GraphicsModeControl.public void setDashedStyle(int style)
throws RemoteException,
VisADException
style - One of the line style constants from GraphicsModeControl.RemoteExceptionVisADExceptionpublic String getSaveString()
getSaveString in class Controlpublic void setSaveString(String save) throws VisADException, RemoteException
setSaveString in class Controlsave - - String representation for reconstructionVisADException - if a VisAD error occursRemoteException - if an RMI error occurspublic void addProjectionControlListener(ControlListener cl, ProjectionControl pcntrl)
cl - new ControlListener for projListenerpcntrl - ProjectionControlpublic void syncControl(Control rmt) throws VisADException
syncControl in class Controlrmt - remote Control whose state is copiedVisADException - if a VisAD error occurspublic boolean equals(Object o)
public Object clone()
public void reLabel()
throws VisADException,
RemoteException
setContourFill(boolean) has been set.VisADException - if a VisAD error occursRemoteException - if an RMI error occurspublic void nullControl()
nullControl in class ControlCopyright © 1996–2023 The SSEC Visualization Project. All rights reserved.