Last change
on this file since 17 was 17, checked in by imi, 19 years ago |
- added Layer support
- added support for raw GPS data
- fixed tooltips
- added options for loading gpx files
|
File size:
1.1 KB
|
Line | |
---|
1 | package org.openstreetmap.josm.gui.engine;
|
---|
2 |
|
---|
3 | import java.awt.Graphics;
|
---|
4 |
|
---|
5 | import org.openstreetmap.josm.data.osm.LineSegment;
|
---|
6 | import org.openstreetmap.josm.data.osm.Node;
|
---|
7 | import org.openstreetmap.josm.data.osm.Track;
|
---|
8 | import org.openstreetmap.josm.gui.MapView;
|
---|
9 |
|
---|
10 | /**
|
---|
11 | * Subclasses of Engine are able to draw map data on the screen. The layout and
|
---|
12 | * colors depend only on the engine used, but it may have an configuration panel.
|
---|
13 | *
|
---|
14 | * @author imi
|
---|
15 | */
|
---|
16 | abstract public class Engine {
|
---|
17 |
|
---|
18 | /**
|
---|
19 | * The Graphics surface to draw on. This should be set before each painting
|
---|
20 | * sequence.
|
---|
21 | */
|
---|
22 | protected Graphics g;
|
---|
23 | /**
|
---|
24 | * The mapView, this engine was created for.
|
---|
25 | */
|
---|
26 | protected MapView mv;
|
---|
27 |
|
---|
28 |
|
---|
29 | /**
|
---|
30 | * Called to initialize the Engine for a new drawing sequence.
|
---|
31 | * @param g
|
---|
32 | */
|
---|
33 | public void init(Graphics g, MapView mv) {
|
---|
34 | this.g = g;
|
---|
35 | this.mv = mv;
|
---|
36 | }
|
---|
37 |
|
---|
38 | /**
|
---|
39 | * Draw the node.
|
---|
40 | */
|
---|
41 | abstract public void drawNode(Node n);
|
---|
42 |
|
---|
43 | /**
|
---|
44 | * Draw the track.
|
---|
45 | */
|
---|
46 | abstract public void drawTrack(Track t);
|
---|
47 |
|
---|
48 | /**
|
---|
49 | * Draw the pending line segment. Non-pending line segments must be drawn
|
---|
50 | * within drawTrack.
|
---|
51 | */
|
---|
52 | abstract public void drawPendingLineSegment(LineSegment ls);
|
---|
53 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.