net.refractions.udig.mapgraphic.grid
Class GridMapGraphic

java.lang.Object
  extended by net.refractions.udig.mapgraphic.grid.GridMapGraphic
All Implemented Interfaces:
MapGraphic

public class GridMapGraphic
extends java.lang.Object
implements MapGraphic

Draws the grid on the map.

Since:
1.1.0
Author:
Jesse

Field Summary
 
Fields inherited from interface net.refractions.udig.mapgraphic.MapGraphic
XPID
 
Constructor Summary
GridMapGraphic()
           
 
Method Summary
 double[] closest(int x, int y, ILayer layer)
          calculates the closest point to x,y.
 void draw(MapGraphicContext context)
          Draws the graphic.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridMapGraphic

public GridMapGraphic()
Method Detail

draw

public void draw(MapGraphicContext context)
Description copied from interface: MapGraphic
Draws the graphic. Check the clip area of the ViewportGraphics object to determine what area needs to be refreshed.

Specified by:
draw in interface MapGraphic
Parameters:
context - The drawing context.

closest

public double[] closest(int x,
                        int y,
                        ILayer layer)
                 throws FactoryException
calculates the closest point to x,y.

Parameters:
x - x coord in screen coords
y - y coord in screen coords
layer - layer containing this map graphic
Returns:
the closest point on the grid in map coords
Throws:
FactoryException