main
Class ImageParameters

java.lang.Object
  extended by main.ImageParameters

public class ImageParameters
extends java.lang.Object

The ImageParameters class contains information about the map image on which to draw components. This includes its size, file location, and the latitude and longitude ranges that the map spans.


Field Summary
private  int imageHeight
           
private  java.lang.String imageName
           
private  int imageWidth
           
private  Position lowerRightCorner
           
private  Position upperLeftCorner
           
 
Constructor Summary
ImageParameters(java.lang.String rawParams)
          Constructs and new ImageParameters instance that is initialized by parsing string argument.
 
Method Summary
 int getImageHeight()
          Returns the height of the map image in pixels.
 java.lang.String getImageName()
          Returns the file name of the map image to use.
 int getImageWidth()
          Returns the width of the map image in pixels.
 Position getLowerRightCorner()
          Returns the GPS position of the lower-right corner of the map.
 Position getUpperLeftCorner()
          Returns the GPS position of the upper-left corner of the map.
private  void parseLine(java.lang.String line)
           
 java.lang.String toString()
          Returns a string representation of this ImageParameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

imageName

private java.lang.String imageName

imageHeight

private int imageHeight

imageWidth

private int imageWidth

upperLeftCorner

private Position upperLeftCorner

lowerRightCorner

private Position lowerRightCorner
Constructor Detail

ImageParameters

public ImageParameters(java.lang.String rawParams)
                throws java.text.ParseException
Constructs and new ImageParameters instance that is initialized by parsing string argument.

Parameters:
rawParams - a String with unparsed image parameters
Throws:
java.text.ParseException
Method Detail

parseLine

private void parseLine(java.lang.String line)
                throws java.text.ParseException
Throws:
java.text.ParseException

getImageName

public java.lang.String getImageName()
Returns the file name of the map image to use.

Returns:
the image's file name

getImageWidth

public int getImageWidth()
Returns the width of the map image in pixels.

Returns:
the image's width

getImageHeight

public int getImageHeight()
Returns the height of the map image in pixels.

Returns:
the image's height

getUpperLeftCorner

public Position getUpperLeftCorner()
Returns the GPS position of the upper-left corner of the map.

Returns:
the position of the upper-left corner

getLowerRightCorner

public Position getLowerRightCorner()
Returns the GPS position of the lower-right corner of the map.

Returns:
the position of the lower-right corner

toString

public java.lang.String toString()
Returns a string representation of this ImageParameters. This is for debugging purposes only.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this ImageParameters