public class ContoursRenderer extends Renderer
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTROL_KEY_FORMAT |
static java.lang.String |
CONTROL_KEY_LABEL_CADENCE |
static java.lang.String |
CONTROL_KEY_LABEL_ORIENT |
static java.lang.String |
CONTROL_KEY_LABELS |
static java.lang.String |
CONTROL_KEY_LEVELS |
protected static java.util.logging.Logger |
logger |
static java.lang.String |
PROP_FONTSIZE |
static java.lang.String |
PROP_FORMAT
format, empty string means use the default format.
|
static java.lang.String |
PROP_LABELORIENT |
static java.lang.String |
PROP_LINESTYLE |
static java.lang.String |
PROP_LINETHICK
handle for the property lineThick.
|
static java.lang.String |
PROP_SIMPLIFYPATHS |
bottomDecorator, colorBar, control, CONTROL_KEY_COLOR, CONTROL_KEY_COLOR_TABLE, CONTROL_KEY_DRAW_ERROR, CONTROL_KEY_FILL_COLOR, CONTROL_KEY_FILL_DIRECTION, CONTROL_KEY_FILL_TEXTURE, CONTROL_KEY_FONT_SIZE, CONTROL_KEY_LINE_STYLE, CONTROL_KEY_LINE_THICK, CONTROL_KEY_MODULO_X, CONTROL_KEY_MODULO_Y, CONTROL_KEY_REFERENCE, CONTROL_KEY_SPECIAL_COLORS, CONTROL_KEY_SYMBOL, CONTROL_KEY_SYMBOL_SIZE, drawLegendLabel, ds, firstValidIndex, id, lastException, lastValidIndex, legendLabel, MARKER_DATASET, MARKER_X_AXIS_RANGE, MARKER_Y_AXIS_RANGE, needWorkMarkers, PROP_ACTIVE, PROP_BOTTOMDECORATOR, PROP_COLORBAR, PROP_CONTROL, PROP_DRAWLEGENDLABEL, PROP_ID, PROP_LEGENDLABEL, PROP_RECORDFILE, PROP_TOPDECORATOR, propertyChangeSupport, renderException, topDecorator
Constructor and Description |
---|
ContoursRenderer() |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptContext(int x,
int y)
Returns true if the render will accept the context for a point.
|
boolean |
acceptsDataSet(QDataSet ds)
return true if the dataset appears to be in a scheme accepted by this renderer.
|
static QDataSet |
doAutorange(QDataSet ds)
autorange on the data, returning a rank 2 bounds for the dataset.
|
java.awt.Color |
getColor()
Get the color for contour lines
|
java.lang.String |
getContours()
return the contour locations, a comma-separated list
|
java.lang.String |
getControl()
get the string which summarizes the state of the renderer.
|
java.lang.String |
getFontSize() |
java.lang.String |
getFormat() |
java.lang.String |
getLabelCadence()
return the inter-label distance, in ems.
|
java.lang.String |
getLabelOrient() |
PsymConnector |
getLineStyle() |
double |
getLineThick()
get the line thickness in pixels.
|
javax.swing.Icon |
getListIcon()
An icon can be provided that will be shown in a list
along with the textual description of the element.
|
java.lang.String |
getListLabel()
return a
String that will help the user
identify this item when choosing from a list. |
boolean |
isDrawLabels()
true if labels should be drawn.
|
boolean |
isSimplifyPaths()
return true if we should reduce paths to remove features that fall within a pixel, etc.
|
void |
render(java.awt.Graphics2D g1,
DasAxis xAxis,
DasAxis yAxis)
Render is called whenever the image needs to be refreshed or the content
has changed.
|
void |
setColor(java.awt.Color color)
Set the color for contour lines
|
void |
setContours(java.lang.String contours)
set the contour locations, a comma-separated list
|
void |
setControl(java.lang.String s)
set the control string which contains a number of properties.
|
void |
setDataSet(QDataSet ds)
Set the dataset to be plotted.
|
void |
setDrawLabels(boolean drawLabels)
true if labels should be drawn.
|
void |
setFontSize(java.lang.String fontSize) |
void |
setFormat(java.lang.String value)
explicitly set the format.
|
void |
setLabelCadence(java.lang.String labelCadence)
set the inter-label distance, in ems.
|
void |
setLabelOrient(java.lang.String labelOrient) |
void |
setLineStyle(PsymConnector lineStyle) |
void |
setLineThick(double newlineThick)
set the line thickness in pixels.
|
void |
setParent(DasPlot parent) |
void |
setSimplifyPaths(boolean newsimplifyPaths)
set to true if we should reduce paths to remove features that fall within a pixel, etc.
|
void |
updatePlotImage(DasAxis xAxis,
DasAxis yAxis,
ProgressMonitor monitor)
updatePlotImage is called once the expensive operation of loading
the data is completed.
|
addPropertyChangeListener, addPropertyChangeListener, addToStats, decodeDatum, decodeFillStyle, decodePlotSymbolConnectorControl, decodePlotSymbolControl, drawListIcon, encodeBooleanControl, encodeColorControl, encodeDatum, encodeFillStyle, encodePlotSymbolConnectorControl, encodePlotSymbolControl, formatControl, getAffineTransform, getBooleanControl, getBottomDecorator, getColorBar, getColorControl, getConsumedDataSet, getControl, getDataLoader, getDataSet, getDataSetDescriptor, getDataSetID, getDatumControl, getDoubleArrayControl, getDoubleControl, getId, getIntegerControl, getInternalDataSet, getLastException, getLegendLabel, getParent, getRenderCount, getStatsFile, getTopDecorator, getUpdateCount, getXmemento, getYmemento, hasControl, incrementRenderCount, incrementUpdateCount, installRenderer, invalidateParentCacheImage, isActive, isDrawLegendLabel, isDumpDataSet, isTableDataSet, parseControl, parseLayoutString, postException, postMessage, postMessage, refresh, refreshImage, removePropertyChangeListener, removePropertyChangeListener, renderException, resetCounters, setActive, setBottomDecorator, setColorBar, setDataSetDescriptor, setDataSetID, setDataSetLoader, setDrawLegendLabel, setDumpDataSet, setException, setId, setLastException, setLegendLabel, setStatsFile, setTopDecorator, setUpFont, setUpFont, uninstallRenderer, update, updateCacheImage, updateImmediately
protected static final java.util.logging.Logger logger
public static final java.lang.String CONTROL_KEY_LEVELS
public static final java.lang.String CONTROL_KEY_LABELS
public static final java.lang.String CONTROL_KEY_LABEL_CADENCE
public static final java.lang.String CONTROL_KEY_FORMAT
public static final java.lang.String CONTROL_KEY_LABEL_ORIENT
public static final java.lang.String PROP_FONTSIZE
public static final java.lang.String PROP_FORMAT
public static final java.lang.String PROP_LABELORIENT
public static final java.lang.String PROP_SIMPLIFYPATHS
public static final java.lang.String PROP_LINETHICK
public static final java.lang.String PROP_LINESTYLE
public static QDataSet doAutorange(QDataSet ds)
ds
- the dataset.Schemes.boundingBox()
public void render(java.awt.Graphics2D g1, DasAxis xAxis, DasAxis yAxis)
Renderer
public void setControl(java.lang.String s)
Renderer
setControl
in class Renderer
s
- the controletc
public java.lang.String getControl()
Renderer
getControl
in class Renderer
public boolean acceptsDataSet(QDataSet ds)
Renderer
acceptsDataSet
in class Renderer
public void setDataSet(QDataSet ds)
Renderer
setDataSet
in class Renderer
public java.lang.String getFontSize()
public void setFontSize(java.lang.String fontSize)
public java.lang.String getFormat()
public void setFormat(java.lang.String value)
value
- public java.lang.String getLabelOrient()
public void setLabelOrient(java.lang.String labelOrient)
public javax.swing.Icon getListIcon()
Displayable
null
if there
is no icon available, or a roughly 16x16 pixel icon.getListIcon
in interface Displayable
getListIcon
in class Renderer
public java.lang.String getListLabel()
Displayable
String
that will help the user
identify this item when choosing from a list.getListLabel
in interface Displayable
getListLabel
in class Renderer
public void updatePlotImage(DasAxis xAxis, DasAxis yAxis, ProgressMonitor monitor) throws DasException
Renderer
updatePlotImage
in class Renderer
xAxis
- the axis relating x data coordinates to horizontal pixel coordinatesyAxis
- the axis relating y data coordinates to horizontal pixel coordinatesmonitor
- a monitor for the operation. Note the updatePlotImage operation should be fast (<1000ms).DasException
public java.lang.String getContours()
public void setContours(java.lang.String contours)
contours
- the contour locations, a comma-separated listpublic java.lang.String getLabelCadence()
public void setLabelCadence(java.lang.String labelCadence)
labelCadence
- the inter-label distance, in ems.public boolean acceptContext(int x, int y)
Renderer
acceptContext
in class Renderer
x
- the x coordinate in the canvas coordinate system.y
- the y coordinate in the canvas coordinate system.public boolean isDrawLabels()
public void setDrawLabels(boolean drawLabels)
drawLabels
- true if labels should be drawn.public java.awt.Color getColor()
public void setColor(java.awt.Color color)
color
- the color for contour linespublic boolean isSimplifyPaths()
public void setSimplifyPaths(boolean newsimplifyPaths)
newsimplifyPaths
- true if we should reduce pathspublic double getLineThick()
public void setLineThick(double newlineThick)
newlineThick
- the line thickness in pixels.public PsymConnector getLineStyle()
public void setLineStyle(PsymConnector lineStyle)