1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.osm.visitor.paint;
|
---|
3 |
|
---|
4 | import static org.openstreetmap.josm.tools.I18n.marktr;
|
---|
5 |
|
---|
6 | import java.awt.Color;
|
---|
7 |
|
---|
8 | import org.openstreetmap.josm.Main;
|
---|
9 | import org.openstreetmap.josm.data.Preferences.ColorKey;
|
---|
10 |
|
---|
11 | public enum PaintColors implements ColorKey {
|
---|
12 |
|
---|
13 | INACTIVE(marktr("inactive"), Color.darkGray),
|
---|
14 | SELECTED(marktr("selected"), Color.red),
|
---|
15 | NODE(marktr("node"), Color.yellow),
|
---|
16 | DEFAULT_WAY(marktr("way"), new Color(0,0,128)), // dark blue
|
---|
17 | RELATION(marktr("relation"), new Color(0,128,128)), // teal
|
---|
18 | UNTAGGED_WAY(marktr("untagged way"), new Color(0,128,0)), // dark green
|
---|
19 | INCOMPLETE_WAY(marktr("incomplete way"), new Color(0,0,96)), // darker blue
|
---|
20 | BACKGROUND(marktr("background"), Color.BLACK),
|
---|
21 | HIGHLIGHT(marktr("highlight"), new Color(0, 255, 186)), // lighteal
|
---|
22 |
|
---|
23 | UNTAGGED(marktr("untagged"),Color.GRAY),
|
---|
24 | TEXT(marktr("text"), Color.WHITE),
|
---|
25 | AREA_TEXT(marktr("areatext"), Color.LIGHT_GRAY);
|
---|
26 |
|
---|
27 | private final String name;
|
---|
28 | private final Color defaultColor;
|
---|
29 |
|
---|
30 | private PaintColors(String name, Color defaultColor) {
|
---|
31 | this.name = name;
|
---|
32 | this.defaultColor = defaultColor;
|
---|
33 | }
|
---|
34 |
|
---|
35 | public String getColorName() {
|
---|
36 | return name;
|
---|
37 | }
|
---|
38 |
|
---|
39 | public Color getDefault() {
|
---|
40 | return defaultColor;
|
---|
41 | }
|
---|
42 |
|
---|
43 | public String getSpecialName() {
|
---|
44 | return null;
|
---|
45 | }
|
---|
46 |
|
---|
47 | public Color get() {
|
---|
48 | return Main.pref.getColor(this);
|
---|
49 | }
|
---|
50 | }
|
---|