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


Constructor Index

 o Grid(Dimension)
Constructs the grid with default cell steps and given dimensions
 o Grid(int, int, Dimension)
Constructs the grid with given cell steps and dimensions

Method Index

 o closeTo(Point)
Returns the grid point nearest to the given point
 o getHStep()
Returns the drid horizontal step
 o getVStep()
Returns the drid vertical step
 o redraw(Graphics)
Redraw the grid on the new screen position.
 o setHStep(int)
 o setVStep(int)
 o show(Graphics)
Shows the grid on the screen.

Constructors

 o Grid
 public Grid(int hStep,
             int vStep,
             Dimension d)
Constructs the grid with given cell steps and dimensions

 o Grid
 public Grid(Dimension d)
Constructs the grid with default cell steps and given dimensions

Methods

 o setHStep
 public void setHStep(int newHStep)
 o getHStep
 public int getHStep()
Returns the drid horizontal step

 o getVStep
 public int getVStep()
Returns the drid vertical step

 o setVStep
 public void setVStep(int newVStep)
 o 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.

 o 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.

 o closeTo
 public Point closeTo(Point point)
Returns the grid point nearest to the given point


All Packages  Class Hierarchy  This Package  Previous  Next  Index