Class PolarType1

All Implemented Interfaces:
DrawableAxes, PolarAxes, Dimensioned, Drawable

public class PolarType1 extends AbstractPolarAxis implements PolarAxes, Dimensioned
  • Constructor Details

    • PolarType1

      public PolarType1(PlottingPanel panel, String rLabel, String phiLabel, double phiOffset)
      Constructs polar coordinate axes for the given panel.
      Parameters:
      panel - PlottingPanel
      rLabel -
      phiLabel -
      phiOffset - double offset the phi coordinate
    • PolarType1

      public PolarType1(PlottingPanel panel)
      Constructs polar coordinate axes for the given panel.
      Parameters:
      panel - PlottingPanel
  • Method Details

    • getInterior

      public Dimension getInterior(DrawingPanel panel)
      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 interface Dimensioned
      Parameters:
      panel - the drawing panel that requested the interior
      Returns:
      the interior dimension
    • setXLabel

      public void setXLabel(String s, 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.
      Specified by:
      setXLabel in interface DrawableAxes
      Parameters:
      s - the label
      font_name - an optional font name
    • setYLabel

      public void setYLabel(String s, 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.
      Specified by:
      setYLabel in interface DrawableAxes
      Parameters:
      s - the label
      font_name - an optional font name
    • getXLabel

      public String getXLabel()
      Gets the x axis label.
      Specified by:
      getXLabel in interface DrawableAxes
      Returns:
      String
    • getYLabel

      public String getYLabel()
      Gets the y axis label.
      Specified by:
      getYLabel in interface DrawableAxes
      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 interface DrawableAxes
    • setShowMinorXGrid

      public void setShowMinorXGrid(boolean showGrid)
      Shows a grid line for every x axis minor tickmark.
      Specified by:
      setShowMinorXGrid in interface DrawableAxes
    • setShowMajorYGrid

      public void setShowMajorYGrid(boolean showGrid)
      Shows a grid line for every y axis major tickmark.
      Specified by:
      setShowMajorYGrid in interface DrawableAxes
    • setShowMinorYGrid

      public void setShowMinorYGrid(boolean showGrid)
      Shows a grid line for every y axis minor tickmark.
      Specified by:
      setShowMinorYGrid in interface DrawableAxes
    • draw

      public void draw(DrawingPanel panel, Graphics g)
      Draws a representation of an object in a drawing panel.
      Specified by:
      draw in interface Drawable
      Parameters:
      panel -
      g -