Class AbstractAxes
java.lang.Object
org.opensourcephysics.display.axes.AbstractAxes
- All Implemented Interfaces:
- DrawableAxes,- Drawable
- Direct Known Subclasses:
- AbstractPolarAxis,- CartesianType1,- CartesianType2,- CartesianType3,- CustomAxes
An abstract class for axes that defines font and title accessor methods.
 
Copyright (c) 2024
- Version:
- 1.0
- Author:
- Wolfgang Christian
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected intprotected intdefault gutters.protected intprotected intprotected DrawingPanelprotected Colorprotected Colorprotected Fontprotected DecimalFormatprotected Fontprotected Fontprotected DrawableTextLineprotected boolean
- 
Constructor SummaryConstructorsConstructorDescriptionAbstractAxes(DrawingPanel drawingPanel) Creates axes that will display themselves within the given drawing panel.
- 
Method SummaryModifier and TypeMethodDescriptionGets the color of the interior of the axes.getTitle()Gets the title.booleanGets the visibility of the axes.voidvoidresizeFonts(double factor, DrawingPanel panel) Resizes fonts by the specified factor.voidsetDefaultGutters(int left, int top, int right, int bottom) Sets gutters that give the best appearance.voidsetInteriorBackground(Color color) Sets the interior background color.voidSet a title that will be drawn within the drawing panel.voidsetVisible(boolean isVisible) Sets the visibility of the axes.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensourcephysics.display.Drawabledraw, isInteractiveMethods inherited from interface org.opensourcephysics.display.axes.DrawableAxesgetXLabel, getYLabel, setShowMajorXGrid, setShowMajorYGrid, setShowMinorXGrid, setShowMinorYGrid, setXLabel, setYLabel
- 
Field Details- 
defaultLeftGutterprotected int defaultLeftGutterdefault gutters.
- 
defaultTopGutterprotected int defaultTopGutter
- 
defaultRightGutterprotected int defaultRightGutter
- 
defaultBottomGutterprotected int defaultBottomGutter
- 
visibleprotected boolean visible
- 
titleFont
- 
labelFont
- 
superscriptFont
- 
labelFormat
- 
gridcolor
- 
interiorColor
- 
titleLine
- 
drawingPanel
 
- 
- 
Constructor Details- 
AbstractAxesCreates axes that will display themselves within the given drawing panel.- Parameters:
- drawingPanel- DrawingPanel
 
 
- 
- 
Method Details- 
setDefaultGutterspublic void setDefaultGutters(int left, int top, int right, int bottom) Sets gutters that give the best appearance.- Parameters:
- left-
- top-
- right-
- bottom-
 
- 
resetPanelGutterspublic void resetPanelGutters()
- 
setVisiblepublic void setVisible(boolean isVisible) Sets the visibility of the axes.- Specified by:
- setVisiblein interface- DrawableAxes
- Parameters:
- isVisible- true if the axes are visible
 
- 
isVisiblepublic boolean isVisible()Gets the visibility of the axes.- Returns:
- true if the axes is drawn
 
- 
setInteriorBackgroundSets the interior background color.- Specified by:
- setInteriorBackgroundin interface- DrawableAxes
- Parameters:
- color- The new interiorBackground value
 
- 
getInteriorBackgroundGets the color of the interior of the axes.- Specified by:
- getInteriorBackgroundin interface- DrawableAxes
- Returns:
- Color
 
- 
resizeFontsResizes fonts by the specified factor.- Specified by:
- resizeFontsin interface- DrawableAxes
- Parameters:
- factor- the factor
- panel- the drawing panel on which these axes are drawn
 
- 
getTitleGets the title.- Specified by:
- getTitlein interface- DrawableAxes
- Returns:
- String
 
- 
setTitleSet a 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.- Specified by:
- setTitlein interface- DrawableAxes
- Parameters:
- s- the label
- font_name- an optional font name
 
 
-