org.free.garminimg.utils
Class DiscoverTypesMapListener

java.lang.Object
  extended by org.free.garminimg.utils.DiscoverTypesMapListener
All Implemented Interfaces:
MapListener

public class DiscoverTypesMapListener
extends java.lang.Object
implements MapListener

A map listener to discover all the object types available. Takes into account only the objects having a label.


Constructor Summary
DiscoverTypesMapListener()
           
 
Method Summary
 void addPoint(int type, int subType, int longitude, int latitude, Label label, boolean indexed)
          Will be called for every points.
 void addPoly(int type, int[] longitudes, int[] latitudes, int nbPoints, Label label, boolean line)
          Will be called for every polygons/lines.
 void finishPainting()
          Called when everything is done.
 java.util.BitSet getPointTypes()
           
 java.util.BitSet getPolygonTypes()
           
 java.util.BitSet getPolylineTypes()
           
 void startMap(ImgFileBag file)
          Called each time we start looking into another IMG file
 void startSubDivision(SubDivision subDivision)
          Called each time we start parsing a displayed sub-division.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscoverTypesMapListener

public DiscoverTypesMapListener()
Method Detail

addPoint

public void addPoint(int type,
                     int subType,
                     int longitude,
                     int latitude,
                     Label label,
                     boolean indexed)
Description copied from interface: MapListener
Will be called for every points.

Specified by:
addPoint in interface MapListener
Parameters:
type - Type of points (see ImgConstants.getPointDesc(int,int)).
subType - Sub type.
longitude - The longitude in garmin coordinates.
latitude - The latitude in garmin coordinates.
label - The label attached to this point or null if there is none.
indexed - True if the point is indexed.

addPoly

public void addPoly(int type,
                    int[] longitudes,
                    int[] latitudes,
                    int nbPoints,
                    Label label,
                    boolean line)
Description copied from interface: MapListener
Will be called for every polygons/lines.

Specified by:
addPoly in interface MapListener
Parameters:
type - Type of polyline/gone (see ImgConstants.getPolyDesc(int,boolean)).
longitudes - The longitudes in garmin coordinates. Don't keep a pointer on it for more than the duration of this call.
latitudes - Same as latitudes, but for longitudes.
nbPoints - The number of points available.
label - The label attached to this poly or null if there is none.
line - True if it's a polyline, false if it's a polygon.

startMap

public void startMap(ImgFileBag file)
Description copied from interface: MapListener
Called each time we start looking into another IMG file

Specified by:
startMap in interface MapListener
Parameters:
file - The file.

startSubDivision

public void startSubDivision(SubDivision subDivision)
Description copied from interface: MapListener
Called each time we start parsing a displayed sub-division.

Specified by:
startSubDivision in interface MapListener

finishPainting

public void finishPainting()
Description copied from interface: MapListener
Called when everything is done.

Specified by:
finishPainting in interface MapListener

getPointTypes

public java.util.BitSet getPointTypes()

getPolylineTypes

public java.util.BitSet getPolylineTypes()

getPolygonTypes

public java.util.BitSet getPolygonTypes()


Copyright © 2008. All Rights Reserved.