nl.javel.gisbeans.map
Class Map

java.lang.Object
  extended by nl.javel.gisbeans.map.Map
All Implemented Interfaces:
Serializable, MapInterface

public class Map
extends Object
implements MapInterface

Provides the implementation of a Map.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface nl.javel.gisbeans.map.MapInterface
AIRPHOTO, ANGLEDEG, ANGLERAD, CC, CENTIMETER_PER_INCH, CL, CR, DD, DD_TO_METER, FEET, FEET_TO_METER, IMAGE, INCH_TO_METER, INCHES, KILOMETER_TO_METER, KILOMETERS, LC, LINE, LL, LR, MAXX, MAXY, METERS, MILES, MILES_TO_METER, MINX, MINY, POINT, POLYGON, TEXT, UC, UL, UR
 
Constructor Summary
Map()
          constructs a new Map
 
Method Summary
 void addLayer(LayerInterface layer)
          Setter for property layers.
 Graphics2D drawLegend(Graphics2D graphics)
          draws the legend on a graphics object
 Graphics2D drawMap(Graphics2D graphics)
          draws the map on a graphics object
 Graphics2D drawReferenceMap(Graphics2D graphics)
          draws the reference map on a graphics object
 Graphics2D drawScalebar(Graphics2D graphics)
          draws the scalebar on a graphics object
 Rectangle2D getExtent()
          Getter for property extent
 ImageInterface getImage()
          Getter for property image
 List getLayers()
          Getter for property layers
 String getName()
          Getter for property name
 ReferenceMapInterface getReferenceMap()
          Getter for property referenceMap
 double getScale()
          returns the sclale of the map
 double getUnitImageRatio()
          returns the scale of the Image
 int getUnits()
          Getter for property units
 void setExtent(Rectangle2D extent)
          Setter for property extent.
 void setImage(ImageInterface image)
          Setter for property image.
 void setLayer(int index, LayerInterface layer)
          Setter for property layers.
 void setLayers(List layers)
          Setter for property layers.
 void setName(String name)
          Setter for property name.
 void setReferenceMap(ReferenceMapInterface referenceMap)
          Setter for property referenceMap.
 void setUnits(int units)
          Setter for property units.
 void zoom(double zoomFactor)
          zooms the map with a prticular factor
 void zoomPoint(Point2D pixelPosition, double zoomFactor)
          zooms the map based on a given position in the image
 void zoomRectangle(SerializableRectangle2D rectangle)
          zooms the map based on a given rectangle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Map

public Map()
constructs a new Map

Method Detail

addLayer

public void addLayer(LayerInterface layer)
Description copied from interface: MapInterface
Setter for property layers.

Specified by:
addLayer in interface MapInterface
Parameters:
layer - New value of property layers.
See Also:
MapInterface.addLayer(LayerInterface)

drawLegend

public Graphics2D drawLegend(Graphics2D graphics)
Description copied from interface: MapInterface
draws the legend on a graphics object

Specified by:
drawLegend in interface MapInterface
Parameters:
graphics - the graphics object
Returns:
Graphics2D
See Also:
MapInterface.drawLegend(java.awt.Graphics2D)

drawMap

public Graphics2D drawMap(Graphics2D graphics)
                   throws GraphicsException
Description copied from interface: MapInterface
draws the map on a graphics object

Specified by:
drawMap in interface MapInterface
Parameters:
graphics - the graphics object
Returns:
Graphics2D
Throws:
GraphicsException - on drawing failure
See Also:
MapInterface.drawMap(Graphics2D)

drawReferenceMap

public Graphics2D drawReferenceMap(Graphics2D graphics)
Description copied from interface: MapInterface
draws the reference map on a graphics object

Specified by:
drawReferenceMap in interface MapInterface
Parameters:
graphics - the graphics object
Returns:
Graphics2D
See Also:
MapInterface.drawReferenceMap(Graphics2D)

drawScalebar

public Graphics2D drawScalebar(Graphics2D graphics)
Description copied from interface: MapInterface
draws the scalebar on a graphics object

Specified by:
drawScalebar in interface MapInterface
Parameters:
graphics - the graphics object
Returns:
Graphics2D
See Also:
MapInterface.drawScalebar(Graphics2D)

getExtent

public Rectangle2D getExtent()
Description copied from interface: MapInterface
Getter for property extent

Specified by:
getExtent in interface MapInterface
Returns:
the extent of the map
See Also:
MapInterface.getExtent()

getImage

public ImageInterface getImage()
Description copied from interface: MapInterface
Getter for property image

Specified by:
getImage in interface MapInterface
Returns:
ImageInterface the value of property image.
See Also:
MapInterface.getImage()

getLayers

public List getLayers()
Description copied from interface: MapInterface
Getter for property layers

Specified by:
getLayers in interface MapInterface
Returns:
List the value of property layers.
See Also:
MapInterface.getLayers()

getName

public String getName()
Description copied from interface: MapInterface
Getter for property name

Specified by:
getName in interface MapInterface
Returns:
String the value of property extent.
See Also:
MapInterface.getName()

getScale

public double getScale()
Description copied from interface: MapInterface
returns the sclale of the map

Specified by:
getScale in interface MapInterface
Returns:
double the scale of the map in its units
See Also:
MapInterface.getScale()

getReferenceMap

public ReferenceMapInterface getReferenceMap()
Description copied from interface: MapInterface
Getter for property referenceMap

Specified by:
getReferenceMap in interface MapInterface
Returns:
ReferenceMap the value of property referenceMap.
See Also:
MapInterface.getReferenceMap()

getUnitImageRatio

public double getUnitImageRatio()
returns the scale of the Image

Specified by:
getUnitImageRatio in interface MapInterface
Returns:
double the unitPerPixel

getUnits

public int getUnits()
Description copied from interface: MapInterface
Getter for property units

Specified by:
getUnits in interface MapInterface
Returns:
int the value of property units.
See Also:
MapInterface.getUnits()

setExtent

public void setExtent(Rectangle2D extent)
Description copied from interface: MapInterface
Setter for property extent.

Specified by:
setExtent in interface MapInterface
Parameters:
extent - New value of property extent..
See Also:
MapInterface.setExtent(java.awt.geom.Rectangle2D)

setImage

public void setImage(ImageInterface image)
Description copied from interface: MapInterface
Setter for property image.

Specified by:
setImage in interface MapInterface
Parameters:
image - New value of property image.
See Also:
MapInterface.setImage(ImageInterface)

setLayers

public void setLayers(List layers)
Description copied from interface: MapInterface
Setter for property layers.

Specified by:
setLayers in interface MapInterface
Parameters:
layers - New value of property layers.
See Also:
MapInterface.setLayers(List)

setLayer

public void setLayer(int index,
                     LayerInterface layer)
Description copied from interface: MapInterface
Setter for property layers.

Specified by:
setLayer in interface MapInterface
Parameters:
index - Index value of layer
layer - New value of property layers.
See Also:
MapInterface.setLayer(int, LayerInterface)

setName

public void setName(String name)
Description copied from interface: MapInterface
Setter for property name.

Specified by:
setName in interface MapInterface
Parameters:
name - New value of property name.
See Also:
MapInterface.setName(String)

setReferenceMap

public void setReferenceMap(ReferenceMapInterface referenceMap)
Description copied from interface: MapInterface
Setter for property referenceMap.

Specified by:
setReferenceMap in interface MapInterface
Parameters:
referenceMap - New value of property referenceMap.
See Also:
MapInterface.setReferenceMap(ReferenceMapInterface)

setUnits

public void setUnits(int units)
Description copied from interface: MapInterface
Setter for property units.

Specified by:
setUnits in interface MapInterface
Parameters:
units - New value of property units.
See Also:
MapInterface.setUnits(int)

zoom

public void zoom(double zoomFactor)
Description copied from interface: MapInterface
zooms the map with a prticular factor

Specified by:
zoom in interface MapInterface
Parameters:
zoomFactor - (0=1)
See Also:
MapInterface.zoom(double)

zoomPoint

public void zoomPoint(Point2D pixelPosition,
                      double zoomFactor)
Description copied from interface: MapInterface
zooms the map based on a given position in the image

Specified by:
zoomPoint in interface MapInterface
Parameters:
pixelPosition - the position in the image
zoomFactor - the zoomFactor (0=1)
See Also:
#zoomPoint(java.awt.geom.Point2D, double)

zoomRectangle

public void zoomRectangle(SerializableRectangle2D rectangle)
Description copied from interface: MapInterface
zooms the map based on a given rectangle

Specified by:
zoomRectangle in interface MapInterface
Parameters:
rectangle - a rectangle in the map (image units)
See Also:
#zoomRectangle(nl.javel.gisbeans.geom.SerializableRectangle2D)