|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.free.garminimg.utils.MapDrawer
public class MapDrawer
Field Summary | |
---|---|
protected java.awt.Graphics2D |
g2
|
Constructor Summary | |
---|---|
MapDrawer(MapConfig config,
java.awt.Graphics2D g2,
java.awt.image.ImageObserver mapPanel,
float fontSize,
java.awt.Paint labelColor,
java.awt.Paint labelBackgroundColor)
|
Method Summary | |
---|---|
void |
addPoint(int type,
int subType,
int x,
int y,
Label label,
boolean indexed)
Will be called for every points. |
void |
addPoly(int type,
int[] xPoints,
int[] yPoints,
int nbPoints,
Label label,
boolean line)
Will be called for every polygons/lines. |
void |
finishPainting()
Called when everything is done. |
protected ImgConstants.PolylineDescription |
setLineStyle(int type)
|
protected ImgConstants.PolygonDescription |
setPolygonStyle(int type)
|
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 |
Field Detail |
---|
protected java.awt.Graphics2D g2
Constructor Detail |
---|
public MapDrawer(MapConfig config, java.awt.Graphics2D g2, java.awt.image.ImageObserver mapPanel, float fontSize, java.awt.Paint labelColor, java.awt.Paint labelBackgroundColor)
Method Detail |
---|
public void addPoint(int type, int subType, int x, int y, Label label, boolean indexed)
TransformedMapListener
addPoint
in interface TransformedMapListener
type
- Type of points (see ImgConstants.getPointDesc(int,int)
).subType
- Sub type.x
- The X coordinate in pixels.y
- The Y coordinate in pixels.label
- The label attached to this point or null if there is none.indexed
- True if the point is indexed.public void addPoly(int type, int[] xPoints, int[] yPoints, int nbPoints, Label label, boolean line)
TransformedMapListener
addPoly
in interface TransformedMapListener
type
- Type of polyline/gone (see ImgConstants.getPolyDesc(int,boolean)
).xPoints
- The X coordinates in pixels. Don't keep a pointer on it for more than the duration of this call.yPoints
- Same as xPoints, but for y coordinates.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.public void startMap(ImgFileBag file)
TransformedMapListener
startMap
in interface TransformedMapListener
file
- The file.public void startSubDivision(SubDivision subDivision)
TransformedMapListener
startSubDivision
in interface TransformedMapListener
protected ImgConstants.PolygonDescription setPolygonStyle(int type)
protected ImgConstants.PolylineDescription setLineStyle(int type)
public void finishPainting()
TransformedMapListener
finishPainting
in interface TransformedMapListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |