Class WorldGrid

java.lang.Object
org.opensourcephysics.cabrillo.tracker.WorldGrid
All Implemented Interfaces:
Drawable, Trackable

public class WorldGrid extends Object implements Trackable
This draws a world grid on a TrackerPanel.
Author:
Douglas Brown
  • Constructor Details

    • WorldGrid

      public WorldGrid()
  • Method Details

    • draw

      public void draw(DrawingPanel panel, Graphics g)
      Description copied from interface: Drawable
      Draws a representation of an object in a drawing panel.
      Specified by:
      draw in interface Drawable
    • getMark

      protected Mark getMark(TrackerPanel trackerPanel)
    • getColor

      public Color getColor()
      Gets the color.
      Returns:
      the line color
    • setColor

      public void setColor(Color color)
      Sets the color.
      Parameters:
      color - the desired line color
    • getAlpha

      public int getAlpha()
      Gets the alpha.
      Returns:
      the line color alpha
    • setAlpha

      public void setAlpha(int alpha)
      Sets the alpha.
      Parameters:
      alpha - the desired alpha
    • setVisible

      public void setVisible(boolean isVisible)
      Sets the visibility of the axes.
      Parameters:
      isVisible - true if the axes are visible
    • isVisible

      public boolean isVisible()
      Gets the visibility of the axes.
      Returns:
      true if the axes is drawn
    • isCustom

      public boolean isCustom()
      Determines if the color or alpha has been customized.
      Returns:
      true if a custom color or alpha has been set
    • setMajorXGridVisible

      public void setMajorXGridVisible(boolean visible)
      Sets the visibility of the major x grid lines.
      Parameters:
      visible - true to display the major x grid lines
    • setMinorXGridVisible

      public void setMinorXGridVisible(boolean visible)
      Sets the visibility of the minor x grid lines.
      Parameters:
      visible - true to display the minor x grid lines
    • setMajorYGridVisible

      public void setMajorYGridVisible(boolean visible)
      Sets the visibility of the major y grid lines.
      Parameters:
      visible - true to display the major y grid lines
    • setMinorYGridVisible

      public void setMinorYGridVisible(boolean visible)
      Sets the visibility of the minor y grid lines.
      Parameters:
      visible - true to display the minor y grid lines