org.opensourcephysics.display.axes
Interface DrawableAxes

All Superinterfaces:
Drawable
All Known Subinterfaces:
CartesianAxes, PolarAxes
All Known Implementing Classes:
AbstractAxes, AbstractPolarAxis, CartesianInteractive, CartesianType1, CartesianType2, CartesianType3, CustomAxes, PolarType1, PolarType2

public interface DrawableAxes
extends Drawable

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
 java.awt.Color getInteriorBackground()
          Gets the interior background color.
 java.lang.String getTitle()
          Gets the x title.
 java.lang.String getXLabel()
          Gets the x axis label.
 java.lang.String getYLabel()
          Gets the y axis label.
 void resizeFonts(double factor, DrawingPanel panel)
          Resizes fonts by the specified factor.
 void setInteriorBackground(java.awt.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 setTitle(java.lang.String s, java.lang.String font_name)
          Sets the title that will be drawn within the drawing panel.
 void setVisible(boolean isVisible)
          Sets the visibility of the axes.
 void setXLabel(java.lang.String s, java.lang.String font_name)
          Sets the x label of the axes.
 void setYLabel(java.lang.String s, java.lang.String font_name)
          Sets the y label of the axes.
 
Methods inherited from interface org.opensourcephysics.display.Drawable
draw
 

Method Detail

setXLabel

void setXLabel(java.lang.String s,
               java.lang.String font_name)
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 label
font_name - an optional font name

getXLabel

java.lang.String getXLabel()
Gets the x axis label.

Returns:
String

setYLabel

void setYLabel(java.lang.String s,
               java.lang.String font_name)
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 label
font_name - an optional font name

getYLabel

java.lang.String getYLabel()
Gets the y axis label.

Returns:
String

setTitle

void setTitle(java.lang.String s,
              java.lang.String font_name)
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 title
font_name - an optional font name

getTitle

java.lang.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

void setInteriorBackground(java.awt.Color color)
Sets the interior background color.


getInteriorBackground

java.awt.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

void resizeFonts(double factor,
                 DrawingPanel panel)
Resizes fonts by the specified factor.

Parameters:
factor - the factor
panel - the drawing panel on which these axes are drawn