All Packages Class Hierarchy This Package Previous Next Index
Class gui.Grid
java.lang.Object
|
+----gui.Grid
- public class Grid
- extends Object
This class implements the grid on the screen
-
Grid(Dimension)
- Constructs the grid with default cell steps and given dimensions
-
Grid(int, int, Dimension)
- Constructs the grid with given cell steps and dimensions
-
closeTo(Point)
- Returns the grid point nearest to the given point
-
getHStep()
- Returns the drid horizontal step
-
getVStep()
- Returns the drid vertical step
-
redraw(Graphics)
- Redraw the grid on the new screen position.
-
setHStep(int)
-
-
setVStep(int)
-
-
show(Graphics)
- Shows the grid on the screen.
Grid
public Grid(int hStep,
int vStep,
Dimension d)
- Constructs the grid with given cell steps and dimensions
Grid
public Grid(Dimension d)
- Constructs the grid with default cell steps and given dimensions
setHStep
public void setHStep(int newHStep)
getHStep
public int getHStep()
- Returns the drid horizontal step
getVStep
public int getVStep()
- Returns the drid vertical step
setVStep
public void setVStep(int newVStep)
show
public void show(Graphics g)
- Shows the grid on the screen. This method may be called
only the first time the grid is shown. It is more fast
then the redraw method.
redraw
public void redraw(Graphics g)
- Redraw the grid on the new screen position.
This method should be called if the old greed is shown
on the screen.
closeTo
public Point closeTo(Point point)
- Returns the grid point nearest to the given point
All Packages Class Hierarchy This Package Previous Next Index