public final class DataGeneralPathBuilder
extends java.lang.Object
script:sftp://jbf@nudnik.physics.uiowa.edu/home/jbf/project/juno/users/masafumi/20171114/dataMasherDemo.jy
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_HISTOGRAM_MODE |
Constructor and Description |
---|
DataGeneralPathBuilder(DasAxis xaxis,
DasAxis yaxis) |
Modifier and Type | Method and Description |
---|---|
void |
addBreak()
manually assert that the line script be interrupted at this point.
|
void |
addDataPoint(boolean valid,
Datum x,
Datum y)
add a data point to the curve.
|
void |
addDataPoint(boolean valid,
double x,
double y)
add a point to the curve, where x and y are the magnitude in data coordinates.
|
void |
finishThought() |
double |
getCadenceDouble()
return the x cadence used as a double.
|
java.awt.geom.GeneralPath |
getGeneralPath()
get the generalPath for drawing.
|
java.awt.geom.PathIterator |
getPathIterator()
get the path iterator.
|
java.awt.geom.Point2D |
getPenPosition()
this is added so that the fill-to-zero code can add the returns.
|
Units |
getXUnits()
return the units of the xaxis.
|
Units |
getYUnits()
return the units of the yaxis.
|
void |
insertLineTo(double x,
double y)
allow client to insert a point.
|
boolean |
isCadenceRatiometric()
return true if the spacing in x has been identified as ratiometric
(linearly spaced on a log axis).
|
boolean |
isHistogramMode() |
void |
setCadence(Datum sw)
set the limit where two points are considered adjacent, or null
if no check should be done.
|
void |
setHistogramFillFlag()
kludge to tell the builder to subtract a half cadence from the next point
|
void |
setHistogramMode(boolean histogramMode) |
void |
setModuloY(Datum mody)
set the value for which two values of Y are equivalent.
|
void |
setName(java.lang.String name)
set the name of this DataGeneralPathBuilder when logging.
|
public static final java.lang.String PROP_HISTOGRAM_MODE
public void setCadence(Datum sw)
sw
- public void setModuloY(Datum mody)
mody
- public double getCadenceDouble()
public boolean isHistogramMode()
public void setHistogramMode(boolean histogramMode)
public Units getXUnits()
public Units getYUnits()
public boolean isCadenceRatiometric()
public void addDataPoint(boolean valid, Datum x, Datum y)
valid
- if invalid, then break the line at this point.x
- the x valuey
- the y valuepublic void setHistogramFillFlag()
public void setName(java.lang.String name)
name
- "" or the name of the general path object in log messages.public void addBreak()
public void addDataPoint(boolean valid, double x, double y)
valid
- if invalid, then break the line at this point.x
- the x value in xaxis units.y
- the y value in yaxis units.public java.awt.geom.GeneralPath getGeneralPath()
public java.awt.geom.Point2D getPenPosition()
public void finishThought()
public void insertLineTo(double x, double y)
x
- pixel positiony
- pixel positionpublic java.awt.geom.PathIterator getPathIterator()