Map
Class GebcoMapFile

java.lang.Object
  extended by Map.GebcoMapFile
All Implemented Interfaces:
MapFileManager

public class GebcoMapFile
extends java.lang.Object
implements MapFileManager


Field Summary
(package private)  java.util.Vector<java.lang.Integer> availableContours
           
(package private)  java.util.Vector<MapContour> mapContours
           
 
Constructor Summary
GebcoMapFile()
           
 
Method Summary
 void clearFileData()
           
 java.util.Vector<java.lang.Integer> getAvailableContours()
           
 int getContourCount()
           
 int getContourIndex(double depth)
           
 MapContour getMapContour(int contourIndex)
           
 boolean hasMapContour(double depth)
           
 boolean readFileData(java.io.File file)
          Read all file data including contours.
 boolean readFileData(java.io.File file, boolean contours)
          Read file data and optionally read contours.
private  boolean readMapFile(java.io.File gebcoFile, boolean readContours)
           
 java.io.File selectMapFile(java.io.File currentFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapContours

java.util.Vector<MapContour> mapContours

availableContours

java.util.Vector<java.lang.Integer> availableContours
Constructor Detail

GebcoMapFile

public GebcoMapFile()
Method Detail

selectMapFile

public java.io.File selectMapFile(java.io.File currentFile)
Specified by:
selectMapFile in interface MapFileManager

readFileData

public boolean readFileData(java.io.File file,
                            boolean contours)
Description copied from interface: MapFileManager
Read file data and optionally read contours.

Specified by:
readFileData in interface MapFileManager
Parameters:
file - file object
contours - true if you want the contours as well
Returns:
true if read successful.

readFileData

public boolean readFileData(java.io.File file)
Description copied from interface: MapFileManager
Read all file data including contours.

Specified by:
readFileData in interface MapFileManager
Parameters:
file - File object
Returns:
true if read successful.

readMapFile

private boolean readMapFile(java.io.File gebcoFile,
                            boolean readContours)

getContourIndex

public int getContourIndex(double depth)
Specified by:
getContourIndex in interface MapFileManager

hasMapContour

public boolean hasMapContour(double depth)

getAvailableContours

public java.util.Vector<java.lang.Integer> getAvailableContours()
Specified by:
getAvailableContours in interface MapFileManager

getContourCount

public int getContourCount()
Specified by:
getContourCount in interface MapFileManager

getMapContour

public MapContour getMapContour(int contourIndex)
Specified by:
getMapContour in interface MapFileManager

clearFileData

public void clearFileData()
Specified by:
clearFileData in interface MapFileManager