nz.org.venice.chart
Class GraphTools
java.lang.Object
nz.org.venice.chart.GraphTools
- public class GraphTools
- extends java.lang.Object
|
Method Summary |
static int |
calcYCoord(int yoffset,
double yValue,
double topLineValue,
double bottomLineValue,
double verticalScale,
int vertDirection)
Utility method for calculating screen points given a data value, scale and direction. |
static double |
getPointFromScale(double point,
double offset,
double height,
double scale)
|
static void |
renderBar(java.awt.Graphics g,
Graphable source,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double topLineValue,
double bottomLineValue,
java.util.List xRange)
|
static void |
renderBar(java.awt.Graphics g,
Graphable source,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double topLineValue,
double bottomLineValue,
java.util.List xRange,
boolean vertOrientation)
|
static void |
renderChar(java.awt.Graphics g,
PFGraphable source,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double topLineValue,
double bottomLineValue,
java.util.List xRange)
|
static void |
renderChar(java.awt.Graphics g,
PFGraphable source,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double topLineValue,
double bottomLineValue,
java.util.List xRange,
boolean vertOrientation)
|
static void |
renderHorizontalLine(java.awt.Graphics g,
double yValue,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double topLineValue,
double bottomLineValue,
java.util.List xRange,
boolean vertOrientation)
|
static void |
renderLine(java.awt.Graphics g,
Graphable source,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double topLineValue,
double bottomLineValue,
java.util.List xRange)
|
static void |
renderLine(java.awt.Graphics g,
Graphable source,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double topLineValue,
double bottomLineValue,
java.util.List xRange,
boolean vertOrientation)
|
static void |
renderMarker(java.awt.Graphics g,
PFGraphable source,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double topLineValue,
double bottomLineValue,
java.util.List xRange)
|
static void |
renderMarker(java.awt.Graphics g,
PFGraphable source,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double topLineValue,
double bottomLineValue,
java.util.List xRange,
boolean vertOrientation)
|
static int |
scaleAndFitPoint(double point,
double offset,
double scale)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GraphTools
public GraphTools()
renderHorizontalLine
public static void renderHorizontalLine(java.awt.Graphics g,
double yValue,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double topLineValue,
double bottomLineValue,
java.util.List xRange,
boolean vertOrientation)
renderLine
public static void renderLine(java.awt.Graphics g,
Graphable source,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double topLineValue,
double bottomLineValue,
java.util.List xRange)
renderLine
public static void renderLine(java.awt.Graphics g,
Graphable source,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double topLineValue,
double bottomLineValue,
java.util.List xRange,
boolean vertOrientation)
renderBar
public static void renderBar(java.awt.Graphics g,
Graphable source,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double topLineValue,
double bottomLineValue,
java.util.List xRange)
renderBar
public static void renderBar(java.awt.Graphics g,
Graphable source,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double topLineValue,
double bottomLineValue,
java.util.List xRange,
boolean vertOrientation)
scaleAndFitPoint
public static int scaleAndFitPoint(double point,
double offset,
double scale)
getPointFromScale
public static double getPointFromScale(double point,
double offset,
double height,
double scale)
renderChar
public static void renderChar(java.awt.Graphics g,
PFGraphable source,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double topLineValue,
double bottomLineValue,
java.util.List xRange)
renderChar
public static void renderChar(java.awt.Graphics g,
PFGraphable source,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double topLineValue,
double bottomLineValue,
java.util.List xRange,
boolean vertOrientation)
renderMarker
public static void renderMarker(java.awt.Graphics g,
PFGraphable source,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double topLineValue,
double bottomLineValue,
java.util.List xRange)
renderMarker
public static void renderMarker(java.awt.Graphics g,
PFGraphable source,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double topLineValue,
double bottomLineValue,
java.util.List xRange,
boolean vertOrientation)
calcYCoord
public static int calcYCoord(int yoffset,
double yValue,
double topLineValue,
double bottomLineValue,
double verticalScale,
int vertDirection)
- Utility method for calculating screen points given a data value, scale and direction.
- Parameters:
yoffset - The yoffset in the graphics object where the graph
startsyValue - The data point (Y value)topLineValue - The Y value of the highest line in the graphbottomLineValue - The Y value of the lowest line in the graphverticalScale - The verticalScale used to convert between
Y value and cartesian coordinate y.vertDirection - A flag indicating the vertical direction of the
graph: 1 = Graph is drawn from top to bottom
-1 = Graph is drawn from bottom to top