Class GraphPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--GraphPane

public class GraphPane
extends java.awt.Canvas

A JDK1.1-compatible plotting frame

See Also:
Serialized Form

Field Summary
 int traceCase
          The index of the case that is currently being traced
protected  double traceX
          The tracing point, tracked in data coordinates
protected  double traceY
          The tracing point, tracked in data coordinates
 java.lang.String xLabel
          The text label for the horizontal axis
 double xMax
          The maximum value on the horizontal axis in the visible graph
 double xMin
          The minimum value on the horizontal axis in the visible graph
 java.lang.String yLabel
          The text label for the vertical axis
 double yMax
          The maximum value on the vertical axis in the visible graph
 double yMin
          The minimum value on the vertical axis in the visible graph
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
GraphPane()
          Initializes a new GraphPane
 
Method Summary
 java.awt.Point dataToScreen(double x, double y)
          Given the x,y coordinates of a data point, converts them too an x,y point in the graphing pane's coordinate system.
 double getOutput(Case c, double z)
           
 void getTplot(Case c)
           
 void paint(java.awt.Graphics g)
          Paints the Graphpane Any valid plots will be drawn
 void scaleGraph()
          Automatically set the graph's bounds to the appropriate values by rounding up to the next billion years
 double[] screenToData(java.awt.Point inputPoint)
          Given the x,y coorinates of a point on the graphing pane's coordinate system, converts them to an x,y point in the data's coordinate system
 void setXLabel(java.lang.String s)
          Set the horizontal axis label to s
 void setXMax(double xMax)
          Set the maximum value on the horizontal axis
 void setXMin(double xMin)
          Set the minimum value on the horizontal axis
 void setYLabel(java.lang.String s)
          Set the vertical axis label to s
 void setYMax(double yMax)
          Set the maximum value on the vertical axis
 void setYMin(double yMin)
          Set the minimum value on the vertical axis
 void updateTraceY()
           
 
Methods inherited from class java.awt.Canvas
addNotify
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

xMax

public double xMax
The maximum value on the horizontal axis in the visible graph

xMin

public double xMin
The minimum value on the horizontal axis in the visible graph

yMax

public double yMax
The maximum value on the vertical axis in the visible graph

yMin

public double yMin
The minimum value on the vertical axis in the visible graph

xLabel

public java.lang.String xLabel
The text label for the horizontal axis

yLabel

public java.lang.String yLabel
The text label for the vertical axis

traceCase

public int traceCase
The index of the case that is currently being traced

traceX

protected double traceX
The tracing point, tracked in data coordinates

traceY

protected double traceY
The tracing point, tracked in data coordinates
Constructor Detail

GraphPane

public GraphPane()
Initializes a new GraphPane
Method Detail

updateTraceY

public void updateTraceY()

paint

public void paint(java.awt.Graphics g)
Paints the Graphpane Any valid plots will be drawn
Overrides:
paint in class java.awt.Canvas

dataToScreen

public java.awt.Point dataToScreen(double x,
                                   double y)
Given the x,y coordinates of a data point, converts them too an x,y point in the graphing pane's coordinate system.

screenToData

public double[] screenToData(java.awt.Point inputPoint)
Given the x,y coorinates of a point on the graphing pane's coordinate system, converts them to an x,y point in the data's coordinate system

getOutput

public double getOutput(Case c,
                        double z)

getTplot

public void getTplot(Case c)

setXLabel

public void setXLabel(java.lang.String s)
Set the horizontal axis label to s

setYLabel

public void setYLabel(java.lang.String s)
Set the vertical axis label to s

setXMin

public void setXMin(double xMin)
Set the minimum value on the horizontal axis

setXMax

public void setXMax(double xMax)
Set the maximum value on the horizontal axis

setYMin

public void setYMin(double yMin)
Set the minimum value on the vertical axis

setYMax

public void setYMax(double yMax)
Set the maximum value on the vertical axis

scaleGraph

public void scaleGraph()
Automatically set the graph's bounds to the appropriate values by rounding up to the next billion years