Class AbstractPolarAxis
java.lang.Object
org.opensourcephysics.display.axes.AbstractAxes
org.opensourcephysics.display.axes.AbstractPolarAxis
- All Implemented Interfaces:
DrawableAxes
,PolarAxes
,Drawable
- Direct Known Subclasses:
PolarType1
,PolarType2
AbstractPolarAxis implements methods common to all polar axes.
- Version:
- 1.0
- Author:
- Wolfgang Christian
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected double
protected double
Fields inherited from class org.opensourcephysics.display.axes.AbstractAxes
defaultBottomGutter, defaultLeftGutter, defaultRightGutter, defaultTopGutter, drawingPanel, gridcolor, interiorColor, labelFont, labelFormat, superscriptFont, titleFont, titleLine, visible
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractPolarAxis
(DrawingPanel drawingPanel) Creates polar axes that will display themselves within the given drawing panel. -
Method Summary
Modifier and TypeMethodDescriptionvoid
autospaceRings
(boolean autospace) Automatically sets the spacing of the radial grid.protected void
drawRAxis
(double dr, double rmax, DrawingPanel panel, Graphics g) Draws the spokes for the polar plot.double
drawRings
(double rmax, DrawingPanel panel, Graphics g) Draws the rings for the polar plot.void
drawSpokes
(double rmax, DrawingPanel panel, Graphics g) Draws the spokes for the polar plot.double
Gets the spacing of the radial grid.double
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
(String formatString) Method setLabelFormatMethods 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.Drawable
draw, isInteractive
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.axes.PolarAxes
setInteriorBackground
-
Field Details
-
dr
protected double dr -
dtheta
protected double dtheta -
autospaceRings
protected boolean autospaceRings
-
-
Constructor Details
-
AbstractPolarAxis
Creates polar axes that will display themselves within the given drawing panel.- Parameters:
drawingPanel
- DrawingPanel
-
-
Method Details
-
autospaceRings
public void autospaceRings(boolean autospace) Automatically sets the spacing of the radial grid.- Specified by:
autospaceRings
in interfacePolarAxes
- Parameters:
autoscaleR
-
-
getDeltaR
public double getDeltaR()Gets the spacing of the radial grid. -
setDeltaR
public void setDeltaR(double dr) Sets the spacing of the radial gridlines. -
getDeltaTheta
public double getDeltaTheta()Gets the spacing of the radial gridlines.- Specified by:
getDeltaTheta
in interfacePolarAxes
-
setDeltaTheta
public void setDeltaTheta(double dtheta) Sets the spacing of the radial gridlines.- Specified by:
setDeltaTheta
in interfacePolarAxes
- Parameters:
dtheta
- in degree
-
setLabelFormat
Method setLabelFormat- Parameters:
formatString
-
-
drawRAxis
Draws the spokes for the polar plot.- Parameters:
panel
-g
-
-
drawRings
Draws the rings for the polar plot. -
drawSpokes
Draws the spokes for the polar plot.- Specified by:
drawSpokes
in interfacePolarAxes
- Parameters:
panel
-g
-
-