public class Grid extends Drawable
This class was written by Gabriel Weinstock (with some modifications by David Eck).
Constructor and Description |
---|
Grid()
Create a Grid object with x and y spacing 1.0.
|
Grid(double xspace,
double yspace)
Create a Grid object with spacing specified.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(Graphics g,
boolean coordsch)
Draws the grid if an update is required.
|
Color |
getColor()
Access method which returns the Color of the grid lines.
|
double |
getXSP()
Access method to return the x spacing used between grid lines.
|
double |
getYSP()
Access method to return the y spacing used between grid lines
|
void |
setColor(Color c)
Method to set the Color used to draw grid lines.
|
void |
setXSP(double x)
Method to set the x spacing between grid lines.
|
void |
setYSP(double y)
Method to set the y spacing between grid lines.
|
getVisible, needsRedraw, setOwnerData, setVisible
public Grid()
public Grid(double xspace, double yspace)
public Color getColor()
public void setColor(Color c)
public double getXSP()
public double getYSP()
public void setXSP(double x)
public void setYSP(double y)