Interface DrawableAxes
- All Superinterfaces:
Drawable
- All Known Subinterfaces:
CartesianAxes
,PolarAxes
- All Known Implementing Classes:
AbstractAxes
,AbstractPolarAxis
,CartesianInteractive
,CartesianType1
,CartesianType2
,CartesianType3
,CustomAxes
,DataToolTab.DataToolAxes
,PolarType1
,PolarType2
DrawableAxes defines axes that render themselves in a drawing panel.
Axes use the plotting panel's gutters, pixel scale, and affine
transformation.
- Author:
- W. Christian
-
Method Summary
Modifier and TypeMethodDescriptionGets the interior background color.getTitle()
Gets the x title.Gets the x axis label.Gets the y axis label.void
resizeFonts
(double factor, DrawingPanel panel) Resizes fonts by the specified factor.void
setInteriorBackground
(Color color) Sets the interior background color.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 title that will be drawn within the drawing panel.void
setVisible
(boolean isVisible) Sets the visibility of the axes.void
Sets the x label of the axes.void
Sets the y label of the axes.Methods inherited from interface org.opensourcephysics.display.Drawable
draw, isInteractive
-
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.- Parameters:
s
- the labelfont_name
- an optional font name
-
getXLabel
String getXLabel()Gets the x axis label.- Returns:
- String
-
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.- Parameters:
s
- the labelfont_name
- an optional font name
-
getYLabel
String getYLabel()Gets the y axis label.- Returns:
- String
-
setTitle
Sets the title that will be drawn within the drawing panel. The font names understood are those understood by java.awt.Font.decode(). If the font name is null, the font remains unchanged.- Parameters:
s
- the titlefont_name
- an optional font name
-
getTitle
String getTitle()Gets the x title.- Returns:
- String
-
setVisible
void setVisible(boolean isVisible) Sets the visibility of the axes.- Parameters:
isVisible
- true if the axes are visible
-
setInteriorBackground
Sets the interior background color. -
getInteriorBackground
Color getInteriorBackground()Gets the interior background color. -
setShowMajorXGrid
void setShowMajorXGrid(boolean showGrid) Shows a grid line for every x axis major tickmark. -
setShowMinorXGrid
void setShowMinorXGrid(boolean showGrid) Shows a grid line for every x axis minor tickmark. -
setShowMajorYGrid
void setShowMajorYGrid(boolean showGrid) Shows a grid line for every y axis major tickmark. -
setShowMinorYGrid
void setShowMinorYGrid(boolean showGrid) Shows a grid line for every y axis minor tickmark. -
resizeFonts
Resizes fonts by the specified factor.- Parameters:
factor
- the factorpanel
- the drawing panel on which these axes are drawn
-