flatscape
Interface FMapLayer

All Known Implementing Classes:
MapLayer

public interface FMapLayer

Interface to seperate maplayer implementations from the core Flatscape code.

Copyright (c) 2003 Rutgers, The State University of New Jersey

Since:
Flatascpe v3.0
Version:
$Revision: 1.1 $

Method Summary
 void drawMap(java.awt.Graphics2D g)
          This is called from the Flatscape paint method.
 java.awt.geom.Point2D inverse(double screenY, double screenX)
          Use the current flatscape information and the current projection to find the Lat/Lon of a point that was picked on the screen.
 void resetCenter(flatscape.FCanvas.Info info)
          Calculates the lat lon of the center of the screen after the user moves the map using the difference between the previous info and the current one.
 void setProj(flatscape.FCanvas.Info info)
          Calculates the offset for rotation creates as stores new CADRG projection to draw the map and compute the inverse function.
 

Method Detail

drawMap

public void drawMap(java.awt.Graphics2D g)
This is called from the Flatscape paint method.

Parameters:
g - Graphics to draw on the Flatscape window.

resetCenter

public void resetCenter(flatscape.FCanvas.Info info)
Calculates the lat lon of the center of the screen after the user moves the map using the difference between the previous info and the current one. Assumes that only one of rotation, scale or translation has changed since the last call.

Parameters:
info - the new Info structure from FCanvas.

setProj

public void setProj(flatscape.FCanvas.Info info)
Calculates the offset for rotation creates as stores new CADRG projection to draw the map and compute the inverse function. NOTE: this really should be the same calculation as in resetCenter!

Parameters:
info - the new Info structure from FCanvas.

inverse

public java.awt.geom.Point2D inverse(double screenY,
                                     double screenX)
Use the current flatscape information and the current projection to find the Lat/Lon of a point that was picked on the screen.

Parameters:
screenY - the vertical distance from the 0,0 point
screenX - the horizontal distance from the 0,0 point


Copyright (c) 2003 Rutgers, The State University of New Jersey