1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.mappaint;
|
---|
3 | import java.awt.Color;
|
---|
4 |
|
---|
5 | import org.openstreetmap.josm.data.osm.OsmPrimitive;
|
---|
6 | import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings;
|
---|
7 | import org.openstreetmap.josm.data.osm.visitor.paint.MapPainter;
|
---|
8 |
|
---|
9 | public class AreaElemStyle extends ElemStyle
|
---|
10 | {
|
---|
11 | public Color color;
|
---|
12 | public boolean closed;
|
---|
13 | private LineElemStyle line;
|
---|
14 |
|
---|
15 | public AreaElemStyle (AreaElemStyle a, long maxScale, long minScale) {
|
---|
16 | this.color = a.color;
|
---|
17 | this.closed = a.closed;
|
---|
18 | this.priority = a.priority;
|
---|
19 | this.maxScale = maxScale;
|
---|
20 | this.minScale = minScale;
|
---|
21 | this.rules = a.rules;
|
---|
22 | this.line = new LineElemStyle();
|
---|
23 | this.line.color = a.color;
|
---|
24 | }
|
---|
25 |
|
---|
26 | public AreaElemStyle(AreaElemStyle a, LineElemStyle l)
|
---|
27 | {
|
---|
28 | this.color = a.color;
|
---|
29 | this.closed = a.closed;
|
---|
30 | this.priority = a.priority;
|
---|
31 | this.maxScale = a.maxScale;
|
---|
32 | this.minScale = a.minScale;
|
---|
33 | this.rules = a.rules;
|
---|
34 | this.line = l;
|
---|
35 | this.code = a.code;
|
---|
36 | }
|
---|
37 |
|
---|
38 | public AreaElemStyle() { init(); }
|
---|
39 |
|
---|
40 | public void init()
|
---|
41 | {
|
---|
42 | closed = false;
|
---|
43 | color = null;
|
---|
44 | priority = 0;
|
---|
45 | }
|
---|
46 |
|
---|
47 | public LineElemStyle getLineStyle() {
|
---|
48 | return line;
|
---|
49 | }
|
---|
50 |
|
---|
51 | @Override
|
---|
52 | public void paintPrimitive(OsmPrimitive primitive, MapPaintSettings paintSettings, MapPainter painter, boolean selected, boolean member) {
|
---|
53 | // TODO
|
---|
54 | /*Way way = (Way)primitive;
|
---|
55 | String name = painter.isShowNames() ? painter.getWayName(way) : null;
|
---|
56 | painter.drawArea(getPolygon(way), selected ? paintSettings.getSelectedColor() : color, name);
|
---|
57 | line.paintPrimitive(way, paintSettings, painter, selected);*/
|
---|
58 | }
|
---|
59 | }
|
---|