Class PolarType2
java.lang.Object
org.opensourcephysics.display.axes.AbstractAxes
org.opensourcephysics.display.axes.AbstractPolarAxis
org.opensourcephysics.display.axes.PolarType2
- All Implemented Interfaces:
DrawableAxes,PolarAxes,Drawable
-
Field Summary
Fields inherited from class org.opensourcephysics.display.axes.AbstractPolarAxis
autospaceRings, dr, dthetaFields inherited from class org.opensourcephysics.display.axes.AbstractAxes
defaultBottomGutter, defaultLeftGutter, defaultRightGutter, defaultTopGutter, drawingPanel, gridcolor, interiorColor, labelFont, labelFormat, superscriptFont, titleFont, titleLine, visible -
Constructor Summary
ConstructorsConstructorDescriptionPolarType2(PlottingPanel panel) Constructs polar coordinate axes for the given panel.PolarType2(PlottingPanel panel, String rLabel, String phiLabel, double phiOffset) Constructs polar coordinate axes for the given panel. -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(DrawingPanel panel, Graphics g) Draws a representation of an object in a drawing panel.Gets the x axis label.Gets the y axis label.voidsetShowMajorXGrid(boolean showGrid) Shows a grid line for every x axis major tickmark.voidsetShowMajorYGrid(boolean showGrid) Shows a grid line for every y axis major tickmark.voidsetShowMinorXGrid(boolean showGrid) Shows a grid line for every x axis minor tickmark.voidsetShowMinorYGrid(boolean showGrid) Shows a grid line for every y axis minor tickmark.voidSets the x label of the axes.voidsetXLog(boolean isLog) Sets the x axis to linear or logarithmic.voidSets the y label of the axes.voidsetYLog(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, setLabelFormatMethods inherited from class org.opensourcephysics.display.axes.AbstractAxes
getInteriorBackground, getTitle, isVisible, resetPanelGutters, resizeFonts, setDefaultGutters, setInteriorBackground, setTitle, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensourcephysics.display.Drawable
isInteractiveMethods inherited from interface org.opensourcephysics.display.axes.DrawableAxes
getInteriorBackground, getTitle, resizeFonts, setTitle, setVisibleMethods inherited from interface org.opensourcephysics.display.axes.PolarAxes
autospaceRings, drawRings, drawSpokes, getDeltaR, getDeltaTheta, setDeltaR, setDeltaTheta, setInteriorBackground
-
Constructor Details
-
PolarType2
Constructs polar coordinate axes for the given panel.- Parameters:
panel- PlottingPanelrLabel-phiLabel-phiOffset- double offset the phi coordinate
-
PolarType2
Constructs polar coordinate axes for the given panel.- Parameters:
panel- PlottingPanel
-
-
Method Details
-
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:
setXLabelin 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:
setYLabelin interfaceDrawableAxes- Parameters:
label- the labels- an optional font name
-
getXLabel
Gets the x axis label.- Specified by:
getXLabelin interfaceDrawableAxes- Returns:
- String
-
getYLabel
Gets the y axis label.- Specified by:
getYLabelin 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:
setShowMajorXGridin interfaceDrawableAxes
-
setShowMinorXGrid
public void setShowMinorXGrid(boolean showGrid) Shows a grid line for every x axis minor tickmark.- Specified by:
setShowMinorXGridin interfaceDrawableAxes
-
setShowMajorYGrid
public void setShowMajorYGrid(boolean showGrid) Shows a grid line for every y axis major tickmark.- Specified by:
setShowMajorYGridin interfaceDrawableAxes
-
setShowMinorYGrid
public void setShowMinorYGrid(boolean showGrid) Shows a grid line for every y axis minor tickmark.- Specified by:
setShowMinorYGridin interfaceDrawableAxes
-
draw
Draws a representation of an object in a drawing panel.
-