|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectebgeo.maprequest.MapService
The super class for map services.
Field Summary | |
protected String |
addText
Text to add to the bottom of a map. |
protected MRCoordinateSystem |
cs
The coordinate system for this map. |
protected Locale |
locale
The locale of the map (used for getAddText() ). |
protected boolean |
supportsPanning
True if this map supports panning. |
protected boolean |
supportsZooming
True if this map supports zooming. |
Constructor Summary | |
MapService()
Creates a new instance of MapService |
|
MapService(Properties props)
Construct a map service from some properties. |
Method Summary | |
abstract void |
buildUpMap(BufferedImage image,
String tempDirectory,
Component parentComponent,
BoundedRangeModel progress,
MainWindow main)
Create a map image for the requested map. |
int |
compareTo(Object o)
|
abstract boolean |
configure()
Instruct the service that it should configure itself for its map. |
int |
extractDegrees(double degrees)
Extract the whole number of degrees from a floating point amount. |
double |
extractMinutes(double degrees)
Extract the number of minutes from a floating point amount of degrees. |
String |
getAddText()
Get the text to add to the bottom of a map, with special characters replaced by appropriatly formatted date/time symbols. |
abstract String |
getCountry()
Get the country that this map is from. |
MRCoordinateSystem |
getCs()
Get the coordinate system for this map. |
abstract String |
getDriverDescription()
Get the description of this driver. |
abstract int |
getImageHeight()
Get the height of the map image. |
abstract int |
getImageWidth()
Get the width of the map image. |
abstract double |
getInitialMaxX()
Get the suggested initial maximum X value for this map. |
abstract double |
getInitialMaxY()
Get the suggested initial maximum Y value for this map. |
abstract double |
getInitialMinX()
Get the suggested initial minimum X value for this map. |
abstract double |
getInitialMinY()
Get the suggested initial minimum Y value for this map. |
abstract Vector |
getLayers()
Get the list of layers to display. |
Locale |
getLocale()
Get the locale for this map. |
abstract String |
getMapDescription()
Get the description of the map. |
abstract MapImageParameters |
getMapImageParameters()
Get the area of map and size to draw. |
abstract String |
getMapInfoURL()
Get a URL giving information about the map and/or web site. |
abstract double |
getMaxXExtent()
Get the maximum valid X value for this map. |
abstract double |
getMaxYExtent()
Get the maximum valid Y value for this map. |
abstract double |
getMinXExtent()
Get the minimum valid X value for this map. |
abstract double |
getMinYExtent()
Get the minimum valid Y value for this map. |
abstract String |
getState()
Get the state or province that this map is from. |
abstract boolean |
isConfigured()
Check if this service has been configured for the map. |
boolean |
isSupportsPanning()
Check if this map supports panning. |
boolean |
isSupportsZooming()
Check if this map supports zooming. |
protected void |
setAddText(String addText)
Set the text to add to the bottom of a map. |
void |
setCs(MRCoordinateSystem cs)
Set the coordinate system for this map. |
void |
setCs(String datum,
String projection)
Set the coordinate system for this map. |
abstract void |
setLayers(Vector layers)
Set the list of layers to display. |
protected void |
setLocale(Locale locale)
Setter for property locale. |
abstract void |
setMapImageParameters(MapImageParameters imageParams)
Set the area of map and size to draw. |
protected void |
setSupportsPanning(boolean supportsPanning)
Setter for property supportsPanning. |
protected void |
setSupportsZooming(boolean supportsZooming)
Setter for property supportsZooming. |
abstract void |
stopBuildUpMap()
If this object is currently building up a map (because buildUpMap(BufferedImage,String,Component,BoundedRangeModel,MainWindow)
was called) then calling this method instructs the map service to stop
building up a map. |
abstract MapImageParameters |
validateMapImageParameters(MapImageParameters params)
Check that the map image parameters are valid for this map. |
boolean |
writeImage(BufferedImage imageOut,
String outputDirectory,
String outputFilename)
Write the map image to a file. |
boolean |
writeMapFile(String directory,
String imageFilename,
String mapFilename)
Deprecated. Use writeMapFile("oziexplorer",directory,imageFilename,mapFilename)
instead. |
boolean |
writeMapFile(String system,
String directory,
String imageFilename,
String mapFilename)
Write a calibration file for an external GIS system. |
protected boolean |
writeOziMapFile(String directory,
String imageFilename,
String mapFilename)
Write a calibration file for the current image suitable for Ozi Explorer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected MRCoordinateSystem cs
protected boolean supportsPanning
protected boolean supportsZooming
protected Locale locale
getAddText()
).
protected String addText
Constructor Detail |
public MapService()
public MapService(Properties props)
props
- The properties for this service.Method Detail |
public abstract String getDriverDescription()
public abstract String getMapDescription()
public abstract String getMapInfoURL()
public abstract boolean isConfigured()
public abstract boolean configure()
public abstract Vector getLayers()
public abstract void setLayers(Vector layers)
public abstract double getMinXExtent()
public abstract double getMinYExtent()
public abstract double getMaxXExtent()
public abstract double getMaxYExtent()
public abstract double getInitialMinX()
public abstract double getInitialMaxX()
public abstract double getInitialMinY()
public abstract double getInitialMaxY()
public abstract MapImageParameters validateMapImageParameters(MapImageParameters params)
params
- The requested map image parameters.
public abstract void buildUpMap(BufferedImage image, String tempDirectory, Component parentComponent, BoundedRangeModel progress, MainWindow main)
MainWindow.mapDone()
, or
MainWindow.mapFailed(String)
if there was an error.
image
- The image to draw the map on.tempDirectory
- A temporary directory that can be used
to write temporary files to.parentComponent
- A component to send repaint() requests to as
each map segment is made available.progress
- A progress bar to update.main
- The main window. When the map has been requested, MainWindow.mapDone()
is called.public abstract void stopBuildUpMap()
buildUpMap(BufferedImage,String,Component,BoundedRangeModel,MainWindow)
was called) then calling this method instructs the map service to stop
building up a map.
public abstract String getCountry()
public abstract String getState()
public abstract int getImageWidth()
public abstract int getImageHeight()
public abstract void setMapImageParameters(MapImageParameters imageParams)
public abstract MapImageParameters getMapImageParameters()
public boolean writeImage(BufferedImage imageOut, String outputDirectory, String outputFilename)
public int extractDegrees(double degrees)
public double extractMinutes(double degrees)
public boolean writeMapFile(String system, String directory, String imageFilename, String mapFilename)
system
- The system to write the calibration file to. At present
only "oziexplorer" is supported.directory
- The directory to write the file to.imageFilename
- The file name of the associated map image.mapFilename
- The name of the file to write the calibration
information to.public boolean writeMapFile(String directory, String imageFilename, String mapFilename)
writeMapFile("oziexplorer",directory,imageFilename,mapFilename)
instead.
protected boolean writeOziMapFile(String directory, String imageFilename, String mapFilename)
public int compareTo(Object o)
compareTo
in interface Comparable
public MRCoordinateSystem getCs()
public void setCs(MRCoordinateSystem cs)
cs
- The new value for the coordinate system.public void setCs(String datum, String projection)
datum
- The name of a datum on which the coordinate system is based.projection
- The name of a projection which the coordinate system
uses.public boolean isSupportsPanning()
protected void setSupportsPanning(boolean supportsPanning)
supportsPanning
- New value of property supportsPanning.public boolean isSupportsZooming()
protected void setSupportsZooming(boolean supportsZooming)
supportsZooming
- New value of property supportsZooming.public Locale getLocale()
protected void setLocale(Locale locale)
locale
- New value of property locale.public String getAddText()
StringUtils.formatStringForDateTime(String,Locale)
protected void setAddText(String addText)
addText
- The text to add, or null if no text is to be added.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |