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.


Variable Index

 o amax
 o amin
Protected Variables
 o axiscolor
 o BOTTOM
 o data_window
 o dataset
 o drawgrid
Public Variables
 o drawzero
 o exponent
 o force_end_labels
 o gridcolor
 o guess_label_number
 o HORIZONTAL
Public Static Values
 o label
 o label_count
 o label_exponent
 o label_start
 o label_step
 o label_string
 o label_value
 o LEFT
 o major_tic_size
 o max_label_width
 o maximum
 o minimum
 o minor_tic_count
 o minor_tic_size
 o NUMBER_OF_TICS
 o orientation
 o position
 o redraw
 o RIGHT
 o title
 o TOP
 o VERTICAL
 o width
 o zerocolor

Constructor Index

 o Axis()
Constructors
 o Axis(int)

Method Index

 o attachDataSet(DataSet)
 o attachXdata(DataSet)
 o attachYdata(DataSet)
 o calculateGridLabels()
 o detachAll()
 o detachDataSet(DataSet)
 o drawAxis(Graphics)
 o drawHAxis(Graphics)
Protected Methods
 o drawVAxis(Graphics)
 o getAxisPos()
 o getAxisWidth(Graphics)
 o getDataMax()
 o getDataMin()
 o getDouble(int)
 o getInteger(double)
 o log10(double)
 o positionAxis(int, int, int, int)
 o resetRange()
 o RoundUp(double)
Private Methods
 o setPosition(int)
Public Methods

Variables

 o HORIZONTAL
 static final int HORIZONTAL
Public Static Values

 o VERTICAL
 static final int VERTICAL
 o LEFT
 static final int LEFT
 o RIGHT
 static final int RIGHT
 o TOP
 static final int TOP
 o BOTTOM
 static final int BOTTOM
 o NUMBER_OF_TICS
 static final int NUMBER_OF_TICS
 o drawgrid
 public boolean drawgrid
Public Variables

 o drawzero
 public boolean drawzero
 o gridcolor
 public java.awt.Color gridcolor
 o zerocolor
 public java.awt.Color zerocolor
 o redraw
 public boolean redraw
 o force_end_labels
 public boolean force_end_labels
 o major_tic_size
 public int major_tic_size
 o minor_tic_size
 public int minor_tic_size
 o minor_tic_count
 public int minor_tic_count
 o axiscolor
 public java.awt.Color axiscolor
 o minimum
 public double minimum
 o maximum
 public double maximum
 o data_window
 public java.awt.Dimension data_window
 o title
 public grapher.TextLine title
 o amin
 protected java.awt.Point amin
Protected Variables

 o amax
 protected java.awt.Point amax
 o orientation
 protected int orientation
 o position
 protected int position
 o width
 protected int width
 o label
 protected grapher.TextLine label
 o exponent
 protected grapher.TextLine exponent
 o max_label_width
 protected int max_label_width
 o dataset
 protected java.util.Vector dataset
 o label_string
 protected java.lang.String label_string[]
 o label_value
 protected double label_value[]
 o label_start
 protected double label_start
 o label_step
 protected double label_step
 o label_exponent
 protected int label_exponent
 o label_count
 protected int label_count
 o guess_label_number
 protected int guess_label_number

Constructors

 o Axis
 public Axis()
Constructors

 o Axis
 public Axis(int p)

Methods

 o setPosition
 public void setPosition(int p)
Public Methods

 o attachDataSet
 public void attachDataSet(grapher.DataSet d)
 o detachDataSet
 public void detachDataSet(grapher.DataSet d)
 o detachAll
 public void detachAll()
 o getDataMin
 public double getDataMin()
 o getDataMax
 public double getDataMax()
 o getInteger
 public int getInteger(double v)
 o getDouble
 public double getDouble(int i)
 o resetRange
 public void resetRange()
 o getAxisPos
 public int getAxisPos()
 o getAxisWidth
 public int getAxisWidth(java.awt.Graphics g)
 o positionAxis
 public boolean positionAxis(int xmin,
                             int xmax,
                             int ymin,
                             int ymax)
 o drawAxis
 public void drawAxis(java.awt.Graphics g)
 o drawHAxis
 protected void drawHAxis(java.awt.Graphics g)
Protected Methods

 o drawVAxis
 protected void drawVAxis(java.awt.Graphics g)
 o attachXdata
 protected void attachXdata(grapher.DataSet d)
 o attachYdata
 protected void attachYdata(grapher.DataSet d)
 o calculateGridLabels
 protected void calculateGridLabels()
 o RoundUp
 private double RoundUp(double val)
Private Methods

 o log10
 private double log10(double a) throws java.lang.ArithmeticException

All Packages  Class Hierarchy  This Package  Previous  Next  Index