public class ContoursView extends TiledView implements ColorMapped
Modifier and Type | Class and Description |
---|---|
static class |
ContoursView.Line |
static class |
ContoursView.Orientation
Orientation of sample axes x1 and x2.
|
Constructor and Description |
---|
ContoursView(float[][] f)
Constructs a contours view of the specified sampled function f(x1,x2).
|
ContoursView(Sampling s1,
Sampling s2,
float[][] f)
Constructs a contours view of the specified sampled function f(x1,x2).
|
Modifier and Type | Method and Description |
---|---|
void |
addColorMapListener(ColorMapListener cml)
Adds the specified color map listener.
|
float |
getClipMax()
Gets the maximum clip value.
|
float |
getClipMin()
Gets the minimum clip value.
|
ColorMap |
getColorMap()
Gets the color map.
|
float[] |
getContours()
Gets the contour values.
|
ContoursView.Orientation |
getOrientation()
Gets the orientation of sample axes.
|
float |
getPercentileMax()
Gets the maximum percentile.
|
float |
getPercentileMin()
Gets the minimum percentile.
|
void |
paint(java.awt.Graphics2D g2d)
Paints this tiled view.
|
void |
removeColorMapListener(ColorMapListener cml)
Removes the specified color map listener.
|
void |
set(float[][] f)
Sets the sampled function f(x1,x2) for this view.
|
void |
set(Sampling s1,
Sampling s2,
float[][] f)
Sets the sampled function f(x1,x2) for this view.
|
void |
setClips(float clipMin,
float clipMax)
Sets the clips for this view.
|
void |
setColorModel(java.awt.image.IndexColorModel colorModel)
Sets the color model used to map contour values to colors.
|
void |
setContours(float[] c)
Sets the contour values to those in the specified array.
|
void |
setContours(int n)
Sets the number of contour values.
|
void |
setContours(Sampling cs)
Sets the contour values to the specified sampling.
|
void |
setLineColor(java.awt.Color color)
Sets the color of each contour line to the specified color.
|
void |
setLineStyle(ContoursView.Line style)
Sets the contour line style.
|
void |
setLineStyleNegative(ContoursView.Line style)
Sets the contour line style for negative-valued contours.
|
void |
setLineWidth(float width)
Sets the contour line width.
|
void |
setOrientation(ContoursView.Orientation orientation)
Sets the orientation of sample axes.
|
void |
setPercentiles(float percMin,
float percMax)
Sets the percentiles used to compute clips for this view.
|
void |
setReadableContours(boolean readableContours)
Enables or disables automatically computed readable contour values.
|
getBestHorizontalProjector, getBestVerticalProjector, getHorizontalProjector, getLineWidth, getTile, getTranscaler, getVerticalProjector, repaint, setBestProjectors
public ContoursView(float[][] f)
f
- array[n2][n1] of sampled function values f(x1,x2), where
n1 = f[0].length and n2 = f.length.public ContoursView(Sampling s1, Sampling s2, float[][] f)
s1
- the sampling of the variable x1; must be uniform.s2
- the sampling of the variable x2; must be uniform.f
- array[n2][n1] of sampled function values f(x1,x2), where
n1 and n2 denote the number of samples in s1 and s2, respectively.public void set(float[][] f)
f
- array[n2][n1] of sampled function values f(x1,x2), where
n1 = f[0].length and n2 = f.length.public void set(Sampling s1, Sampling s2, float[][] f)
s1
- the sampling of the variable x1; must be uniform.s2
- the sampling of the variable x2; must be uniform.f
- array[n2][n1] of sampled function values f(x1,x2), where
n1 and n2 denote the number of samples in s1 and s2, respectively.public void setOrientation(ContoursView.Orientation orientation)
orientation
- the orientation.public ContoursView.Orientation getOrientation()
public void setLineStyle(ContoursView.Line style)
style
- the line style.public void setLineStyleNegative(ContoursView.Line style)
style
- the line style.public void setLineWidth(float width)
width
- the line width.public void setLineColor(java.awt.Color color)
color
- the contour line color.public void setColorModel(java.awt.image.IndexColorModel colorModel)
colorModel
- the color model.public ColorMap getColorMap()
ColorMapped
getColorMap
in interface ColorMapped
public void setReadableContours(boolean readableContours)
readableContours
- true, for readable contours; false, otherwise.public void setContours(int n)
n
- the number of contour values.public void setContours(float[] c)
c
- the array of contour values.public void setContours(Sampling cs)
cs
- the contour sampling.public float[] getContours()
public void setClips(float clipMin, float clipMax)
Calling this method disables the computation of clips from percentiles. Previous clip values will be forgotten.
clipMin
- the lower bound on contour values.clipMax
- the upper bound on contour values.public float getClipMin()
public float getClipMax()
public void setPercentiles(float percMin, float percMax)
Calling this method enables the computation of clips from percentiles. Any clip values specified or computed previously will be forgotten.
percMin
- the percentile corresponding to clipMin.percMax
- the percentile corresponding to clipMax.public float getPercentileMin()
public float getPercentileMax()
public void addColorMapListener(ColorMapListener cml)
cml
- the listener.public void removeColorMapListener(ColorMapListener cml)
cml
- the listener.public void paint(java.awt.Graphics2D g2d)
TiledView
Tiled views should not replace (set) entirely the transform in the specified graphics context. This transform may already have been set by the tile or its mosaic. Therefore, tiled views should modify this transform only by specifying additional scaling, translation, etc.