|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.das2.graph.GraphUtil
public class GraphUtil
Constructor Summary | |
---|---|
GraphUtil()
|
Method Summary | |
---|---|
static java.awt.geom.AffineTransform |
calculateAT(DasAxis xaxis0,
DasAxis yaxis0,
DasAxis xaxis1,
DasAxis yaxis1)
calculates the AffineTransform between two sets of x and y axes, if possible. |
static java.awt.geom.AffineTransform |
calculateAT(DatumRange xaxis0,
DatumRange yaxis0,
DasAxis xaxis1,
DasAxis yaxis1)
|
static javax.swing.Icon |
colorIcon(java.awt.Color iconColor,
int w,
int h)
return a block with the color and size. |
static java.lang.String |
describe(java.awt.geom.GeneralPath path,
boolean enumeratePoints)
|
static java.lang.String |
getATScaleTranslateString(java.awt.geom.AffineTransform at)
|
static java.awt.geom.GeneralPath |
getPath(DasAxis xAxis,
DasAxis yAxis,
VectorDataSet xds,
boolean histogram)
|
static java.awt.geom.GeneralPath |
getPath(DasAxis xAxis,
DasAxis yAxis,
VectorDataSet xds,
VectorDataSet yds,
boolean histogram)
|
static java.awt.Color |
getRicePaperColor()
|
static double[] |
getSlopeIntercept(double x0,
double y0,
double x1,
double y1)
calculates the slope and intercept of a line going through two points. |
static DasPlot |
guessPlot(DataSet ds)
|
static Renderer |
guessRenderer(DataSet ds)
|
static DasAxis |
guessXAxis(DataSet ds)
|
static DasAxis |
guessYAxis(DataSet dsz)
|
static DasAxis |
guessZAxis(DataSet dsz)
|
static DatumRange |
invTransformRange(DasAxis axis,
double x1,
double x2)
|
static java.awt.geom.Point2D |
lineIntersection(java.awt.geom.Line2D line1,
java.awt.geom.Line2D line2,
boolean noBoundsCheck)
returns the point where the two line segments intersect, or null. |
static java.awt.geom.Point2D |
lineRectangleIntersection(java.awt.geom.Point2D p0,
java.awt.geom.Point2D p1,
java.awt.geom.Rectangle2D r0)
|
static javax.swing.JTabbedPane |
loadCanvas(java.io.InputStream in)
|
static DasPlot |
newDasPlot(DasCanvas canvas,
DatumRange x,
DatumRange y)
|
static double |
pointsAlongCurve(java.awt.geom.PathIterator it,
double[] pathlen,
java.awt.geom.Point2D.Double[] result,
double[] orientation,
boolean stopAtMoveTo)
return the points along a curve. |
static java.awt.geom.GeneralPath |
reducePath(java.awt.geom.PathIterator it,
java.awt.geom.GeneralPath result)
Returns the input GeneralPath filled with new points which will be rendered identically to the input path, but contains a minimal number of points. |
static void |
serializeCanvas(DasCanvas canvas,
java.io.OutputStream out)
|
static double[] |
transformRange(DasAxis axis,
DatumRange range)
returns pixel range of the datum range, guarenteeing that the first element will be less than or equal to the second. |
static DasPlot |
visualize(DataSet ds)
|
static DasPlot |
visualize(DataSet ds,
boolean ylog)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GraphUtil()
Method Detail |
---|
public static DasPlot newDasPlot(DasCanvas canvas, DatumRange x, DatumRange y)
public static void serializeCanvas(DasCanvas canvas, java.io.OutputStream out)
public static javax.swing.JTabbedPane loadCanvas(java.io.InputStream in) throws java.lang.Exception
java.lang.Exception
public static java.awt.geom.GeneralPath getPath(DasAxis xAxis, DasAxis yAxis, VectorDataSet xds, boolean histogram)
public static java.awt.geom.GeneralPath getPath(DasAxis xAxis, DasAxis yAxis, VectorDataSet xds, VectorDataSet yds, boolean histogram)
public static java.awt.geom.AffineTransform calculateAT(DasAxis xaxis0, DasAxis yaxis0, DasAxis xaxis1, DasAxis yaxis1)
xaxis0
- the original reference frame x axisyaxis0
- the original reference frame y axisxaxis1
- the new reference frame x axisyaxis1
- the new reference frame y axis
public static java.awt.geom.AffineTransform calculateAT(DatumRange xaxis0, DatumRange yaxis0, DasAxis xaxis1, DasAxis yaxis1)
public static DasAxis guessYAxis(DataSet dsz)
public static DasAxis guessXAxis(DataSet ds)
public static DasAxis guessZAxis(DataSet dsz)
public static Renderer guessRenderer(DataSet ds)
public static DasPlot guessPlot(DataSet ds)
public static DasPlot visualize(DataSet ds)
public static DasPlot visualize(DataSet ds, boolean ylog)
public static java.awt.geom.GeneralPath reducePath(java.awt.geom.PathIterator it, java.awt.geom.GeneralPath result)
it
- A path iterator with minute details that will be lost when rendering.result
- A GeneralPath to put the result into.
public static double pointsAlongCurve(java.awt.geom.PathIterator it, double[] pathlen, java.awt.geom.Point2D.Double[] result, double[] orientation, boolean stopAtMoveTo)
pathlen
- monotonically increasing path lengths at which the position is to be located. May be null if only the total path length is desired.result
- the resultant points will be put into this array. This array should have the same number of elements as pathlenorientation
- the local orientation, in radians, of the point at will be put into this array. This array should have the same number of elements as pathlenit
- PathIterator first point is used to start the length.stopAtMoveTo
- treat SEG_MOVETO as the end of the path. The pathIterator will be left at this point.
public static java.lang.String getATScaleTranslateString(java.awt.geom.AffineTransform at)
public static double[] getSlopeIntercept(double x0, double y0, double x1, double y1)
public static java.awt.Color getRicePaperColor()
public static java.lang.String describe(java.awt.geom.GeneralPath path, boolean enumeratePoints)
public static java.awt.geom.Point2D lineIntersection(java.awt.geom.Line2D line1, java.awt.geom.Line2D line2, boolean noBoundsCheck)
line1
- line2
- noBoundsCheck
- if true, then do not check the segment bounds.
public static java.awt.geom.Point2D lineRectangleIntersection(java.awt.geom.Point2D p0, java.awt.geom.Point2D p1, java.awt.geom.Rectangle2D r0)
public static double[] transformRange(DasAxis axis, DatumRange range)
axis
- range
-
public static DatumRange invTransformRange(DasAxis axis, double x1, double x2)
public static javax.swing.Icon colorIcon(java.awt.Color iconColor, int w, int h)
w
- h
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |