Class WorldGrid
java.lang.Object
org.opensourcephysics.cabrillo.tracker.WorldGrid
This draws a world grid on a TrackerPanel.
- Author:
- Douglas Brown
-
Field Summary
Fields inherited from interface org.opensourcephysics.media.core.Trackable
PROPERTY_ADJUSTING
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(DrawingPanel panel, Graphics g) Draws a representation of an object in a drawing panel.int
getAlpha()
Gets the alpha.getColor()
Gets the color.protected Mark
getMark
(TrackerPanel trackerPanel) boolean
isCustom()
Determines if the color or alpha has been customized.boolean
Gets the visibility of the axes.void
setAlpha
(int alpha) Sets the alpha.void
Sets the color.void
setMajorXGridVisible
(boolean visible) Sets the visibility of the major x grid lines.void
setMajorYGridVisible
(boolean visible) Sets the visibility of the major y grid lines.void
setMinorXGridVisible
(boolean visible) Sets the visibility of the minor x grid lines.void
setMinorYGridVisible
(boolean visible) Sets the visibility of the minor y grid lines.void
setVisible
(boolean isVisible) Sets the visibility of the axes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opensourcephysics.display.Drawable
isInteractive
-
Constructor Details
-
WorldGrid
public WorldGrid()
-
-
Method Details
-
draw
Description copied from interface:Drawable
Draws a representation of an object in a drawing panel. -
getMark
-
getColor
Gets the color.- Returns:
- the line color
-
setColor
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
-