public final class TickCurveRenderer extends Renderer
Modifier and Type | Class and Description |
---|---|
static class |
TickCurveRenderer.TickStyle |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTROL_TICK_LENGTH |
protected static java.util.logging.Logger |
logger |
static java.lang.String |
PROP_FONTSIZE |
static java.lang.String |
PROP_TICK_STYLE |
static java.lang.String |
PROP_TICKDIRECTION |
static java.lang.String |
PROP_TICKSPACING |
static java.lang.String |
PROP_TICKVALUES |
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 |
---|
TickCurveRenderer() |
TickCurveRenderer(QDataSet ds,
java.lang.String xplane,
java.lang.String yplane,
TickVDescriptor tickv)
Create a new renderer with the x and y planes of the bundle ds identified.
|
Modifier and Type | Method and Description |
---|---|
boolean |
acceptContext(int x,
int y)
Returns true if the render will accept the context for a point.
|
static boolean |
acceptsData(QDataSet ds)
return true if the data is ds[:,3] (T,X,Y) or ds[x[t]] t→x→y
|
double |
checkTickV(QDataSet tds)
returns the minimal distance between consecutive ticks, or Double.MAX_VALUE if fewer than two ticks are found.
|
static QDataSet |
doAutorange(QDataSet ds1)
autorange on the data, returning a rank 2 bounds for the dataset.
|
java.awt.Color |
getColor()
get the color of the orbit
|
java.lang.String |
getControl()
get the string which summarizes the state of the renderer.
|
java.lang.String |
getFontSize() |
double |
getLineWidth()
Getter for property lineWidth.
|
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 |
getTickDirection() |
TickLabeller |
getTickLabeller()
provide access to the tick labelling code
|
java.lang.String |
getTickLength()
Getter for property tickLength.
|
java.lang.String |
getTickSpacing()
get the spacing between ticks, which might be "" meaning automatic.
|
TickCurveRenderer.TickStyle |
getTickStyle()
Getter for property tickStyle.
|
java.lang.String |
getTickValues() |
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.
|
java.awt.Shape |
selectionArea() |
void |
setColor(java.awt.Color color)
set the color of the orbit
|
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 |
setFontSize(java.lang.String fontSize)
relative font size.
|
void |
setLineWidth(double lineWidth)
Setter for property lineWidth.
|
void |
setTickDirection(java.lang.String tickDirection) |
void |
setTickLabeller(TickLabeller tickLabeller)
set the tick labelling code.
|
void |
setTickLength(java.lang.String tickLength)
Setter for property tickLength.
|
void |
setTickSpacing(java.lang.String tickSpacing)
set the spacing between ticks, for example "2hr" is every two hours, and an
empty string is the default automatic behavior.
|
void |
setTickStyle(TickCurveRenderer.TickStyle tickStyle)
Setter for property tickStyle.
|
void |
setTickValues(java.lang.String tickValues)
set like the axis control, with values like:
+2hr for every two hours
2019-11-26T00:02,2019-11-26T00:07 for explicit positions
|
void |
setTickVDescriptor(TickVDescriptor ticks)
manually set the ticks for the renderer, or null means use automatic.
|
acceptsDataSet, 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, getListLabel, 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, setParent, setStatsFile, setTopDecorator, setUpFont, setUpFont, uninstallRenderer, update, updateCacheImage, updateImmediately, updatePlotImage
protected static final java.util.logging.Logger logger
public static final java.lang.String PROP_TICK_STYLE
public static final java.lang.String CONTROL_TICK_LENGTH
public static final java.lang.String PROP_FONTSIZE
public static final java.lang.String PROP_TICKDIRECTION
public static final java.lang.String PROP_TICKSPACING
public static final java.lang.String PROP_TICKVALUES
public TickCurveRenderer(QDataSet ds, java.lang.String xplane, java.lang.String yplane, TickVDescriptor tickv)
ds
- xplane
- yplane
- tickv
- null or ticks for manual specification.public TickCurveRenderer()
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 java.lang.String getFontSize()
public void setFontSize(java.lang.String fontSize)
fontSize
- Renderer.CONTROL_KEY_FONT_SIZE
public java.lang.String getTickDirection()
public void setTickDirection(java.lang.String tickDirection)
public static boolean acceptsData(QDataSet ds)
ds
- the datasetpublic 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 java.awt.Shape selectionArea()
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 static QDataSet doAutorange(QDataSet ds1)
ds1
- the datasetpublic double checkTickV(QDataSet tds)
tds
- public void setDataSet(QDataSet ds)
Renderer
setDataSet
in class Renderer
public void render(java.awt.Graphics2D g1, DasAxis xAxis, DasAxis yAxis)
Renderer
public TickLabeller getTickLabeller()
public void setTickLabeller(TickLabeller tickLabeller)
tickLabeller
- public TickCurveRenderer.TickStyle getTickStyle()
public void setTickStyle(TickCurveRenderer.TickStyle tickStyle)
tickStyle
- New value of property tickStyle.public java.lang.String getTickSpacing()
public void setTickSpacing(java.lang.String tickSpacing)
tickSpacing
- public java.lang.String getTickValues()
public void setTickValues(java.lang.String tickValues)
tickValues
- public double getLineWidth()
public void setLineWidth(double lineWidth)
lineWidth
- New value of property lineWidth.public java.awt.Color getColor()
public void setColor(java.awt.Color color)
color
- public java.lang.String getTickLength()
public void setTickLength(java.lang.String tickLength)
tickLength
- New value of property tickLength.public void setTickVDescriptor(TickVDescriptor ticks)
ticks
-