Changeset 30037 in osm for applications
- Timestamp:
- 2013-11-03T11:49:12+01:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/smed2/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/panels/PanelMain.java
r30033 r30037 137 137 138 138 public void parseMark(Feature feature) { 139 decode.setText("Selected feature:\n");139 decode.setText("Selected object:\n"); 140 140 decode.append("\t" + tr("Type") + ": " + Messages.getString(feature.type.name()) + "\n"); 141 141 if (feature.atts.get(Att.OBJNAM) != null) { … … 175 175 176 176 public void clearMark() { 177 decode.setText(tr("No featureselected"));177 decode.setText(tr("No object selected")); 178 178 } 179 179 -
applications/editors/josm/plugins/smed2/src/seamap/Renderer.java
r30036 r30037 56 56 Symbols.drawSymbol(g2, symbol, sScale, point.getX(), point.getY(), null, null); 57 57 } 58 59 58 public static void symbol(Feature feature, Symbol symbol, Scheme scheme) { 60 59 Point2D point = context.getPoint(feature.centre); 61 60 Symbols.drawSymbol(g2, symbol, sScale, point.getX(), point.getY(), scheme, null); 62 61 } 63 64 62 public static void symbol(Feature feature, Symbol symbol, Delta delta) { 65 63 Point2D point = context.getPoint(feature.centre); 66 64 Symbols.drawSymbol(g2, symbol, sScale, point.getX(), point.getY(), null, delta); 67 65 } 68 69 66 public static void symbol(Feature feature, Symbol symbol, Scheme scheme, Delta delta) { 70 67 Point2D point = context.getPoint(feature.centre); … … 362 359 } 363 360 361 public static void labelText(Feature feature, String str, Font font, LabelStyle style, Color fg) { 362 labelText(feature, str, font, style, fg, null, null); 363 } 364 public static void labelText(Feature feature, String str, Font font, LabelStyle style, Color fg, Color bg) { 365 labelText(feature, str, font, style, fg, bg, null); 366 } 367 public static void labelText(Feature feature, String str, Font font, LabelStyle style, Color fg, Delta delta) { 368 labelText(feature, str, font, style, fg, null, delta); 369 } 364 370 public static void labelText(Feature feature, String str, Font font, LabelStyle style, Color fg, Color bg, Delta delta) { 365 371 if (delta == null) delta = new Delta(Handle.CC); -
applications/editors/josm/plugins/smed2/src/seamap/Rules.java
r30036 r30037 80 80 if ((objects = map.features.get(Obj.LITMIN)) != null) for (Feature feature : objects) lights(feature); 81 81 if ((objects = map.features.get(Obj.LIGHTS)) != null) for (Feature feature : objects) lights(feature); 82 if ((objects = map.features.get(Obj.SISTAT)) != null) for (Feature feature : objects) s ignals(feature);83 if ((objects = map.features.get(Obj.SISTAW)) != null) for (Feature feature : objects) s ignals(feature);84 if ((objects = map.features.get(Obj.CGUSTA)) != null) for (Feature feature : objects) s ignals(feature);85 if ((objects = map.features.get(Obj.RDOSTA)) != null) for (Feature feature : objects) s ignals(feature);86 if ((objects = map.features.get(Obj.RADSTA)) != null) for (Feature feature : objects) s ignals(feature);87 if ((objects = map.features.get(Obj.RSCSTA)) != null) for (Feature feature : objects) s ignals(feature);88 if ((objects = map.features.get(Obj.PILBOP)) != null) for (Feature feature : objects) s ignals(feature);82 if ((objects = map.features.get(Obj.SISTAT)) != null) for (Feature feature : objects) stations(feature); 83 if ((objects = map.features.get(Obj.SISTAW)) != null) for (Feature feature : objects) stations(feature); 84 if ((objects = map.features.get(Obj.CGUSTA)) != null) for (Feature feature : objects) stations(feature); 85 if ((objects = map.features.get(Obj.RDOSTA)) != null) for (Feature feature : objects) stations(feature); 86 if ((objects = map.features.get(Obj.RADSTA)) != null) for (Feature feature : objects) stations(feature); 87 if ((objects = map.features.get(Obj.RSCSTA)) != null) for (Feature feature : objects) stations(feature); 88 if ((objects = map.features.get(Obj.PILBOP)) != null) for (Feature feature : objects) stations(feature); 89 89 if ((objects = map.features.get(Obj.WTWGAG)) != null) for (Feature feature : objects) gauges(feature); 90 90 if ((objects = map.features.get(Obj.OFSPLF)) != null) for (Feature feature : objects) platforms(feature); … … 114 114 Renderer.lineVector(feature, new LineStyle(Color.black, 8, new float[] { 25, 25 }, new Color(0x40ffffff, true))); 115 115 else 116 Renderer.lineVector(feature, new LineStyle(Color.black, 8, new float[] { 25, 25 } , null));116 Renderer.lineVector(feature, new LineStyle(Color.black, 8, new float[] { 25, 25 })); 117 117 if ((zoom >= 12) && (name != null)) 118 Renderer.labelText(feature, name, new Font("Arial", Font.PLAIN, 100), LabelStyle.NONE, Color.black , null, null);118 Renderer.labelText(feature, name, new Font("Arial", Font.PLAIN, 100), LabelStyle.NONE, Color.black); 119 119 break; 120 120 case FAIRWY: … … 123 123 Renderer.lineVector(feature, new LineStyle(Mline, 8, new float[] { 50, 50 }, new Color(0x40ffffff, true))); 124 124 else 125 Renderer.lineVector(feature, new LineStyle(Mline, 8, new float[] { 50, 50 } , null));125 Renderer.lineVector(feature, new LineStyle(Mline, 8, new float[] { 50, 50 })); 126 126 } else { 127 127 if (zoom >= 14) 128 Renderer.lineVector(feature, new LineStyle(n ew Color(0x40ffffff, true), 0, null, null));128 Renderer.lineVector(feature, new LineStyle(null, 0, new Color(0x40ffffff, true))); 129 129 } 130 130 break; … … 133 133 Renderer.symbol(feature, Areas.MarineFarm); 134 134 if (zoom >= 16) 135 Renderer.lineVector(feature, new LineStyle( Color.black, 4, new float[] { 10, 10 }, null));135 Renderer.lineVector(feature, new LineStyle(Color.black, 4, new float[] { 10, 10 })); 136 136 break; 137 137 case OSPARE: 138 138 if (Util.testAttribute(feature, feature.type, Att.CATPRA, CatPRA.PRA_WFRM)) { 139 139 Renderer.symbol(feature, Areas.WindFarm); 140 Renderer.lineVector(feature, new LineStyle(Color.black, 20, new float[] { 40, 40 } , null));140 Renderer.lineVector(feature, new LineStyle(Color.black, 20, new float[] { 40, 40 })); 141 141 if ((zoom >= 15) && (name != null)) 142 Renderer.labelText(feature, name, new Font("Arial", Font.BOLD, 80), LabelStyle.NONE, Color.black, n ull, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 10)));142 Renderer.labelText(feature, name, new Font("Arial", Font.BOLD, 80), LabelStyle.NONE, Color.black, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 10))); 143 143 } 144 144 break; … … 210 210 } 211 211 if ((zoom >= 15) && (name != null)) 212 Renderer.labelText(feature, name, new Font("Arial", Font.BOLD, 80), LabelStyle.NONE, Color.black, n ull, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -90)));212 Renderer.labelText(feature, name, new Font("Arial", Font.BOLD, 80), LabelStyle.NONE, Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -90))); 213 213 break; 214 214 default: … … 856 856 } 857 857 858 private static void s ignals(Feature feature) {858 private static void stations(Feature feature) { 859 859 if (zoom >= 14) { 860 860 switch (feature.type) { -
applications/editors/josm/plugins/smed2/src/smed2/Smed2Action.java
r30033 r30037 193 193 } else { 194 194 showFrame.setVisible(false); 195 PanelMain.messageBar.setText(tr("Select only one feature"));195 PanelMain.messageBar.setText(tr("Select only one object")); 196 196 } 197 197 } … … 200 200 panelMain.clearMark(); 201 201 showFrame.setVisible(false); 202 PanelMain.messageBar.setText(tr("Select a map feature"));202 PanelMain.messageBar.setText(tr("Select a map object")); 203 203 } 204 204 } -
applications/editors/josm/plugins/smed2/src/symbols/Symbols.java
r30033 r30037 91 91 public Color fill; 92 92 93 public LineStyle(Color iline, float iwidth) { 94 line = iline; 95 width = iwidth; 96 dash = null; 97 fill = null; 98 } 99 public LineStyle(Color iline, float iwidth, float[] idash) { 100 line = iline; 101 width = iwidth; 102 dash = idash; 103 fill = null; 104 } 105 public LineStyle(Color iline, float iwidth, Color ifill) { 106 line = iline; 107 width = iwidth; 108 dash = null; 109 fill = ifill; 110 } 93 111 public LineStyle(Color iline, float iwidth, float[] idash, Color ifill) { 94 112 line = iline;
Note:
See TracChangeset
for help on using the changeset viewer.