Class PolarType1
java.lang.Object
org.opensourcephysics.display.axes.AbstractAxes
org.opensourcephysics.display.axes.AbstractPolarAxis
org.opensourcephysics.display.axes.PolarType1
- All Implemented Interfaces:
DrawableAxes
,PolarAxes
,Dimensioned
,Drawable
-
Field Summary
Fields inherited from class org.opensourcephysics.display.axes.AbstractPolarAxis
autospaceRings, dr, 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
ConstructorsConstructorDescriptionPolarType1
(PlottingPanel panel) Constructs polar coordinate axes for the given panel.PolarType1
(PlottingPanel panel, String rLabel, String phiLabel, double phiOffset) Constructs polar coordinate axes for the given panel. -
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(DrawingPanel panel, Graphics g) Draws a representation of an object in a drawing panel.getInterior
(DrawingPanel panel) Gets the interior dimension of the drawing panel in pixel units.Gets the x axis label.Gets the y axis label.void
setShowMajorXGrid
(boolean showGrid) Shows a grid line for every x axis major tickmark.void
setShowMajorYGrid
(boolean showGrid) Shows a grid line for every y axis major tickmark.void
setShowMinorXGrid
(boolean showGrid) Shows a grid line for every x axis minor tickmark.void
setShowMinorYGrid
(boolean showGrid) Shows a grid line for every y axis minor tickmark.void
Sets the x label of the axes.void
setXLog
(boolean isLog) Sets the x axis to linear or logarithmic.void
Sets the y label of the axes.void
setYLog
(boolean isLog) Sets the y axis to linear or logarithmic.Methods inherited from class org.opensourcephysics.display.axes.AbstractPolarAxis
autospaceRings, drawRAxis, drawRings, drawSpokes, getDeltaR, getDeltaTheta, setDeltaR, setDeltaTheta, 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.Drawable
isInteractive
Methods inherited from interface org.opensourcephysics.display.axes.DrawableAxes
getInteriorBackground, getTitle, resizeFonts, setTitle, setVisible
Methods inherited from interface org.opensourcephysics.display.axes.PolarAxes
autospaceRings, drawRings, drawSpokes, getDeltaR, getDeltaTheta, setDeltaR, setDeltaTheta, setInteriorBackground
-
Constructor Details
-
PolarType1
Constructs polar coordinate axes for the given panel.- Parameters:
panel
- PlottingPanelrLabel
-phiLabel
-phiOffset
- double offset the phi coordinate
-
PolarType1
Constructs polar coordinate axes for the given panel.- Parameters:
panel
- PlottingPanel
-
-
Method Details
-
getInterior
Gets the interior dimension of the drawing panel in pixel units. Because this method is called before the pixel scale is set, it may change the gutters and the preferred scale.- Specified by:
getInterior
in interfaceDimensioned
- Parameters:
panel
- the drawing panel that requested the interior- Returns:
- the interior dimension
-
setXLabel
Sets the x label of the axes. The font names understood are those understood by java.awt.Font.decode(). If the font name is null, the font remains unchanged.- Specified by:
setXLabel
in interfaceDrawableAxes
- Parameters:
s
- the labelfont_name
- an optional font name
-
setYLabel
Sets the y label of the axes. The font names understood are those understood by java.awt.Font.decode(). If the font name is null, the font remains unchanged.- Specified by:
setYLabel
in interfaceDrawableAxes
- Parameters:
s
- the labelfont_name
- an optional font name
-
getXLabel
Gets the x axis label.- Specified by:
getXLabel
in interfaceDrawableAxes
- Returns:
- String
-
getYLabel
Gets the y axis label.- Specified by:
getYLabel
in interfaceDrawableAxes
- Returns:
- String
-
setXLog
public void setXLog(boolean isLog) Sets the x axis to linear or logarithmic.- Parameters:
isLog
- true for log scale; false otherwise
-
setYLog
public void setYLog(boolean isLog) Sets the y axis to linear or logarithmic.- Parameters:
isLog
- true for log scale; false otherwise
-
setShowMajorXGrid
public void setShowMajorXGrid(boolean showGrid) Shows a grid line for every x axis major tickmark.- Specified by:
setShowMajorXGrid
in interfaceDrawableAxes
-
setShowMinorXGrid
public void setShowMinorXGrid(boolean showGrid) Shows a grid line for every x axis minor tickmark.- Specified by:
setShowMinorXGrid
in interfaceDrawableAxes
-
setShowMajorYGrid
public void setShowMajorYGrid(boolean showGrid) Shows a grid line for every y axis major tickmark.- Specified by:
setShowMajorYGrid
in interfaceDrawableAxes
-
setShowMinorYGrid
public void setShowMinorYGrid(boolean showGrid) Shows a grid line for every y axis minor tickmark.- Specified by:
setShowMinorYGrid
in interfaceDrawableAxes
-
draw
Draws a representation of an object in a drawing panel.
-