org.opensourcephysics.display.axes
Class XAxis
java.lang.Object
org.opensourcephysics.display.axes.XYAxis
org.opensourcephysics.display.axes.XAxis
- All Implemented Interfaces:
- Drawable, Interactive, Measurable
public class XAxis
- extends XYAxis
XAxis: an x axis that knows how to draw itself in a drawing panel.
Copyright: Copyright (c) 2005 Gould, Christian, and Tobochnik
- Version:
- 1.0
- Author:
- Wolfgang Christian
Constructor Summary |
XAxis()
Constructor XAxis |
XAxis(java.lang.String title)
Constructor XAxis |
Methods inherited from class org.opensourcephysics.display.axes.XYAxis |
calculateLabels, drawMultiplier, getX, getXMax, getXMin, getY, getYMax, getYMin, isEnabled, isMeasured, log10, setAxisType, setEnabled, setLabelFormat, setLabelFormat, setLocation, setLocationType, setShowMajorGrid, setTitle, setTitle, setTitleFont, setX |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XAxis
public XAxis()
- Constructor XAxis
XAxis
public XAxis(java.lang.String title)
- Constructor XAxis
- Parameters:
title
-
draw
public void draw(DrawingPanel drawingPanel,
java.awt.Graphics g)
- Draws the axis in the drawing panel.
- Specified by:
draw
in interface Drawable
- Specified by:
draw
in class XYAxis
- Parameters:
drawingPanel
- g
-
findInteractive
public Interactive findInteractive(DrawingPanel panel,
int xpix,
int ypix)
- Specified by:
findInteractive
in interface Interactive
- Overrides:
findInteractive
in class XYAxis
setXY
public void setXY(double x,
double y)
- Specified by:
setXY
in interface Interactive
- Overrides:
setXY
in class XYAxis
setY
public void setY(double y)
- Specified by:
setY
in interface Interactive
- Overrides:
setY
in class XYAxis