All Packages Class Hierarchy This Package Previous Next Index
Class grapher.Axis
java.lang.Object
|
+----grapher.Axis
- class Axis
- extends java.lang.Object
Class Axis
Version 1.0 October 1995
Version 1.1 December 1995
Version 1.2 January 1996
Copyright (C) 1995, 1996 Leigh Brookshaw
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
This class is designed to be used in conjunction with
the Graph2D class and DataSet class for plotting 2D graphs.
-
amax
-
-
amin
- Protected Variables
-
axiscolor
-
-
BOTTOM
-
-
data_window
-
-
dataset
-
-
drawgrid
- Public Variables
-
drawzero
-
-
exponent
-
-
force_end_labels
-
-
gridcolor
-
-
guess_label_number
-
-
HORIZONTAL
- Public Static Values
-
label
-
-
label_count
-
-
label_exponent
-
-
label_start
-
-
label_step
-
-
label_string
-
-
label_value
-
-
LEFT
-
-
major_tic_size
-
-
max_label_width
-
-
maximum
-
-
minimum
-
-
minor_tic_count
-
-
minor_tic_size
-
-
NUMBER_OF_TICS
-
-
orientation
-
-
position
-
-
redraw
-
-
RIGHT
-
-
title
-
-
TOP
-
-
VERTICAL
-
-
width
-
-
zerocolor
-
-
Axis()
- Constructors
-
Axis(int)
-
-
attachDataSet(DataSet)
-
-
attachXdata(DataSet)
-
-
attachYdata(DataSet)
-
-
calculateGridLabels()
-
-
detachAll()
-
-
detachDataSet(DataSet)
-
-
drawAxis(Graphics)
-
-
drawHAxis(Graphics)
- Protected Methods
-
drawVAxis(Graphics)
-
-
getAxisPos()
-
-
getAxisWidth(Graphics)
-
-
getDataMax()
-
-
getDataMin()
-
-
getDouble(int)
-
-
getInteger(double)
-
-
log10(double)
-
-
positionAxis(int, int, int, int)
-
-
resetRange()
-
-
RoundUp(double)
- Private Methods
-
setPosition(int)
- Public Methods
HORIZONTAL
static final int HORIZONTAL
- Public Static Values
VERTICAL
static final int VERTICAL
LEFT
static final int LEFT
RIGHT
static final int RIGHT
TOP
static final int TOP
BOTTOM
static final int BOTTOM
NUMBER_OF_TICS
static final int NUMBER_OF_TICS
drawgrid
public boolean drawgrid
- Public Variables
drawzero
public boolean drawzero
gridcolor
public java.awt.Color gridcolor
zerocolor
public java.awt.Color zerocolor
redraw
public boolean redraw
force_end_labels
public boolean force_end_labels
major_tic_size
public int major_tic_size
minor_tic_size
public int minor_tic_size
minor_tic_count
public int minor_tic_count
axiscolor
public java.awt.Color axiscolor
minimum
public double minimum
maximum
public double maximum
data_window
public java.awt.Dimension data_window
title
public grapher.TextLine title
amin
protected java.awt.Point amin
- Protected Variables
amax
protected java.awt.Point amax
orientation
protected int orientation
position
protected int position
width
protected int width
label
protected grapher.TextLine label
exponent
protected grapher.TextLine exponent
max_label_width
protected int max_label_width
dataset
protected java.util.Vector dataset
label_string
protected java.lang.String label_string[]
label_value
protected double label_value[]
label_start
protected double label_start
label_step
protected double label_step
label_exponent
protected int label_exponent
label_count
protected int label_count
guess_label_number
protected int guess_label_number
Axis
public Axis()
- Constructors
Axis
public Axis(int p)
setPosition
public void setPosition(int p)
- Public Methods
attachDataSet
public void attachDataSet(grapher.DataSet d)
detachDataSet
public void detachDataSet(grapher.DataSet d)
detachAll
public void detachAll()
getDataMin
public double getDataMin()
getDataMax
public double getDataMax()
getInteger
public int getInteger(double v)
getDouble
public double getDouble(int i)
resetRange
public void resetRange()
getAxisPos
public int getAxisPos()
getAxisWidth
public int getAxisWidth(java.awt.Graphics g)
positionAxis
public boolean positionAxis(int xmin,
int xmax,
int ymin,
int ymax)
drawAxis
public void drawAxis(java.awt.Graphics g)
drawHAxis
protected void drawHAxis(java.awt.Graphics g)
- Protected Methods
drawVAxis
protected void drawVAxis(java.awt.Graphics g)
attachXdata
protected void attachXdata(grapher.DataSet d)
attachYdata
protected void attachYdata(grapher.DataSet d)
calculateGridLabels
protected void calculateGridLabels()
RoundUp
private double RoundUp(double val)
- Private Methods
log10
private double log10(double a) throws java.lang.ArithmeticException
All Packages Class Hierarchy This Package Previous Next Index