org.opensourcephysics.display.axes
Class AbstractPolarAxis

java.lang.Object
  extended by org.opensourcephysics.display.axes.AbstractAxes
      extended by org.opensourcephysics.display.axes.AbstractPolarAxis
All Implemented Interfaces:
DrawableAxes, PolarAxes, Drawable
Direct Known Subclasses:
PolarType1, PolarType2

public abstract class AbstractPolarAxis
extends AbstractAxes
implements PolarAxes

AbstractPolarAxis implements methods common to all polar axes.

Version:
1.0
Author:
Wolfgang Christian

Field Summary
protected  boolean autospaceRings
           
protected  double dr
           
protected  double dtheta
           
 
Fields inherited from class org.opensourcephysics.display.axes.AbstractAxes
defaultBottomGutter, defaultLeftGutter, defaultRightGutter, defaultTopGutter, drawingPanel, gridcolor, interiorColor, labelFont, labelFormat, superscriptFont, titleFont, titleLine, visible
 
Constructor Summary
protected AbstractPolarAxis(DrawingPanel drawingPanel)
          Creates polar axes that will display themselves within the given drawing panel.
 
Method Summary
 void autospaceRings(boolean autospace)
          Automatically sets the spacing of the radial grid.
protected  void drawRAxis(double dr, double rmax, DrawingPanel panel, java.awt.Graphics g)
          Draws the spokes for the polar plot.
 double drawRings(double rmax, DrawingPanel panel, java.awt.Graphics g)
          Draws the rings for the polar plot.
 void drawSpokes(double rmax, DrawingPanel panel, java.awt.Graphics g)
          Draws the spokes for the polar plot.
 double getDeltaR()
          Gets the spacing of the radial grid.
 double getDeltaTheta()
          Gets the spacing of the radial gridlines.
 void setDeltaR(double dr)
          Sets the spacing of the radial gridlines.
 void setDeltaTheta(double dtheta)
          Sets the spacing of the radial gridlines.
 void setLabelFormat(java.lang.String formatString)
          Method setLabelFormat
 
Methods inherited from class org.opensourcephysics.display.axes.AbstractAxes
getInteriorBackground, getTitle, isVisible, resetPanelGutters, resizeFonts, setDefaultGutters, setInteriorBackground, setTitle, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensourcephysics.display.axes.PolarAxes
setInteriorBackground
 
Methods inherited from interface org.opensourcephysics.display.axes.DrawableAxes
getInteriorBackground, getTitle, getXLabel, getYLabel, resizeFonts, setShowMajorXGrid, setShowMajorYGrid, setShowMinorXGrid, setShowMinorYGrid, setTitle, setVisible, setXLabel, setYLabel
 
Methods inherited from interface org.opensourcephysics.display.Drawable
draw
 

Field Detail

dr

protected double dr

dtheta

protected double dtheta

autospaceRings

protected boolean autospaceRings
Constructor Detail

AbstractPolarAxis

protected AbstractPolarAxis(DrawingPanel drawingPanel)
Creates polar axes that will display themselves within the given drawing panel.

Parameters:
drawingPanel - DrawingPanel
Method Detail

autospaceRings

public void autospaceRings(boolean autospace)
Automatically sets the spacing of the radial grid.

Specified by:
autospaceRings in interface PolarAxes
Parameters:
autoscaleR -

getDeltaR

public double getDeltaR()
Gets the spacing of the radial grid.

Specified by:
getDeltaR in interface PolarAxes

setDeltaR

public void setDeltaR(double dr)
Sets the spacing of the radial gridlines.

Specified by:
setDeltaR in interface PolarAxes
Parameters:
dr -

getDeltaTheta

public double getDeltaTheta()
Gets the spacing of the radial gridlines.

Specified by:
getDeltaTheta in interface PolarAxes

setDeltaTheta

public void setDeltaTheta(double dtheta)
Sets the spacing of the radial gridlines.

Specified by:
setDeltaTheta in interface PolarAxes
Parameters:
dtheta - in degree

setLabelFormat

public void setLabelFormat(java.lang.String formatString)
Method setLabelFormat

Parameters:
formatString -

drawRAxis

protected void drawRAxis(double dr,
                         double rmax,
                         DrawingPanel panel,
                         java.awt.Graphics g)
Draws the spokes for the polar plot.

Parameters:
panel -
g -

drawRings

public double drawRings(double rmax,
                        DrawingPanel panel,
                        java.awt.Graphics g)
Draws the rings for the polar plot.

Specified by:
drawRings in interface PolarAxes
Parameters:
panel -
g -
Returns:
double the ring separation used

drawSpokes

public void drawSpokes(double rmax,
                       DrawingPanel panel,
                       java.awt.Graphics g)
Draws the spokes for the polar plot.

Specified by:
drawSpokes in interface PolarAxes
Parameters:
panel -
g -