graphics.grapher
Class Axis

java.lang.Object
  extended by graphics.grapher.Axis

public 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 (affineTransform 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.


Field Summary
 java.awt.Color axiscolor
           
static int BOTTOM
           
 java.awt.Dimension data_window
           
 boolean drawgrid
          Public Variables
 boolean drawzero
           
 boolean force_end_labels
           
 java.awt.Color gridcolor
           
static int HORIZONTAL
          Public Static Values
static int LEFT
           
 int major_tic_size
           
 double maximum
           
 double minimum
           
 int minor_tic_count
           
 int minor_tic_size
           
 boolean redraw
           
static int RIGHT
           
 TextLine title
           
static int TOP
           
static int VERTICAL
           
 java.awt.Color zerocolor
           
 
Constructor Summary
Axis()
          Constructors
Axis(int p)
           
 
Method Summary
 void attachDataSet(DataSet d)
           
 void detachAll()
           
 void detachDataSet(DataSet d)
           
 void drawAxis(java.awt.Graphics g)
           
 int getAxisPos()
           
 int getAxisWidth(java.awt.Graphics g)
           
 double getDataMax()
           
 double getDataMin()
           
 double getDouble(int i)
           
 int getInteger(double v)
           
 boolean positionAxis(int xmin, int xmax, int ymin, int ymax)
           
 void resetRange()
           
 void setPosition(int p)
          Public Methods
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HORIZONTAL

public static final int HORIZONTAL
Public Static Values

See Also:
Constant Field Values

VERTICAL

public static final int VERTICAL
See Also:
Constant Field Values

LEFT

public static final int LEFT
See Also:
Constant Field Values

RIGHT

public static final int RIGHT
See Also:
Constant Field Values

TOP

public static final int TOP
See Also:
Constant Field Values

BOTTOM

public static final int BOTTOM
See Also:
Constant Field Values

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 TextLine title
Constructor Detail

Axis

public Axis()
Constructors


Axis

public Axis(int p)
Method Detail

setPosition

public void setPosition(int p)
Public Methods


attachDataSet

public void attachDataSet(DataSet d)

detachDataSet

public void detachDataSet(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)