pisgah
Class GraphMethods
java.lang.Object
|
+--pisgah.GraphMethods
- public class GraphMethods
- extends java.lang.Object
static methods for graph classes
|
Method Summary |
static void |
paintScale(java.awt.Graphics g,
int scalePosition,
float[] grid,
int direction,
double lowValue,
double highValue,
int offset,
int graphSize,
java.awt.Color scaleColor,
java.awt.Font f,
java.awt.Color fontColor,
boolean labelAxes,
java.lang.String axisLabel)
|
protected static int |
scale(double value,
double lowValue,
double highValue,
int direction,
int offset,
int graphSize)
|
static float[] |
setGrid(float lowValue,
float highValue)
try to find nice grid values for axes |
static int |
setMaxFractionDigits(double max,
double min)
try to determine a reasonable number of decimal places
to show in labels |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HORIZONTAL
public static final int HORIZONTAL
- See Also:
- Constant Field Values
VERTICAL
public static final int VERTICAL
- See Also:
- Constant Field Values
LOW
public static final int LOW
- See Also:
- Constant Field Values
HIGH
public static final int HIGH
- See Also:
- Constant Field Values
GraphMethods
public GraphMethods()
setMaxFractionDigits
public static int setMaxFractionDigits(double max,
double min)
- try to determine a reasonable number of decimal places
to show in labels
setGrid
public static float[] setGrid(float lowValue,
float highValue)
- try to find nice grid values for axes
- Parameters:
lowValue - is the lower endpoint of the scalehighValue - is the upper endpoint of the scale
paintScale
public static void paintScale(java.awt.Graphics g,
int scalePosition,
float[] grid,
int direction,
double lowValue,
double highValue,
int offset,
int graphSize,
java.awt.Color scaleColor,
java.awt.Font f,
java.awt.Color fontColor,
boolean labelAxes,
java.lang.String axisLabel)
scale
protected static int scale(double value,
double lowValue,
double highValue,
int direction,
int offset,
int graphSize)