Changeset 32093 in osm for applications/editors/josm/plugins/seachart/src/render
- Timestamp:
- 2016-03-03T17:21:33+01:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/seachart/src/render
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/src/render/Rules.java
r32090 r32093 628 628 } 629 629 630 @SuppressWarnings("unchecked") 630 631 private static void floats() { 631 632 if (Renderer.zoom >= 12) { … … 643 644 break; 644 645 } 645 if (feature.objs.get(Obj.TOPMAR) != null) 646 Renderer.symbol(Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val), getScheme(Obj.TOPMAR), Topmarks.FloatDelta); 646 if (feature.objs.containsKey(Obj.TOPMAR)) { 647 AttMap topmap = feature.objs.get(Obj.TOPMAR).get(0); 648 if (topmap.containsKey(Att.TOPSHP)) { 649 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>)(topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), Topmarks.FloatDelta); 650 } 651 } else if (feature.objs.containsKey(Obj.DAYMAR)) { 652 AttMap topmap = feature.objs.get(Obj.DAYMAR).get(0); 653 if (topmap.containsKey(Att.TOPSHP)) { 654 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>)(topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.DAYMAR), Topmarks.FloatDelta); 655 } 656 } 647 657 addName(15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(20, -50))); 648 658 Signals.addSignals(); -
applications/editors/josm/plugins/seachart/src/render/Signals.java
r32090 r32093 117 117 case BCNSAW: 118 118 case BCNSPP: 119 if ((Rules.feature.objs.containsKey(Obj.TOPMAR)) || (Rules.feature.objs.containsKey(Obj.DAYMAR))) { 120 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -140))); 121 } else { 122 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -80))); 123 } 124 break; 119 125 case LITFLT: 120 126 case LITVES: 121 127 case BOYINB: 122 128 if ((Rules.feature.objs.containsKey(Obj.TOPMAR)) || (Rules.feature.objs.containsKey(Obj.DAYMAR))) { 123 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -1 40)));129 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -110))); 124 130 } else { 125 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, - 80)));131 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -60))); 126 132 } 127 133 break; … … 140 146 case BOYSPP: 141 147 if ((Rules.feature.objs.containsKey(Obj.TOPMAR)) || (Rules.feature.objs.containsKey(Obj.DAYMAR))) { 142 if (Rules.testAttribute(Rules.feature.type, Att.BOYSHP, BoySHP.BOY_PILR) || Rules.testAttribute(Rules.feature.type, Att.BOYSHP, BoySHP.BOY_ PILR)) {143 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance( 45, -140)));148 if (Rules.testAttribute(Rules.feature.type, Att.BOYSHP, BoySHP.BOY_PILR) || Rules.testAttribute(Rules.feature.type, Att.BOYSHP, BoySHP.BOY_SPAR)) { 149 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(50, -160))); 144 150 } else { 145 151 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(25, -80))); 146 152 } 147 153 } else { 148 if (Rules.testAttribute(Rules.feature.type, Att.BOYSHP, BoySHP.BOY_PILR) || Rules.testAttribute(Rules.feature.type, Att.BOYSHP, BoySHP.BOY_ PILR)) {154 if (Rules.testAttribute(Rules.feature.type, Att.BOYSHP, BoySHP.BOY_PILR) || Rules.testAttribute(Rules.feature.type, Att.BOYSHP, BoySHP.BOY_SPAR)) { 149 155 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(30, -100))); 150 156 } else { … … 164 170 if (Renderer.zoom >= 15) { 165 171 AttMap atts = Rules.feature.objs.get(Obj.FOGSIG).get(0); 166 String str = ""; 167 if (atts.containsKey(Att.CATFOG)) { 168 str += fogSignals.get(((ArrayList<?>) (atts.get(Att.CATFOG).val)).get(0)); 169 } 170 if (atts.containsKey(Att.SIGGRP)) { 171 str += "(" + atts.get(Att.SIGGRP).val + ")"; 172 } else { 173 str += " "; 174 } 175 if (atts.containsKey(Att.SIGPER)) { 176 str += df.format(atts.get(Att.SIGPER).val) + "s"; 177 } 178 if (atts.containsKey(Att.VALMXR)) { 179 str += df.format(atts.get(Att.VALMXR).val) + "M"; 180 } 181 if (!str.isEmpty()) { 182 Renderer.labelText(str, new Font("Arial", Font.PLAIN, 40), Color.black, new Delta(Handle.TR, AffineTransform.getTranslateInstance(-60, -30))); 172 if (atts != null) { 173 String str = ""; 174 if (atts.containsKey(Att.CATFOG)) { 175 str += fogSignals.get(((ArrayList<?>) (atts.get(Att.CATFOG).val)).get(0)); 176 } 177 if (atts.containsKey(Att.SIGGRP)) { 178 str += "(" + atts.get(Att.SIGGRP).val + ")"; 179 } else { 180 str += " "; 181 } 182 if (atts.containsKey(Att.SIGPER)) { 183 str += df.format(atts.get(Att.SIGPER).val) + "s"; 184 } 185 if (atts.containsKey(Att.VALMXR)) { 186 str += df.format(atts.get(Att.VALMXR).val) + "M"; 187 } 188 if (!str.isEmpty()) { 189 Renderer.labelText(str, new Font("Arial", Font.PLAIN, 40), Color.black, new Delta(Handle.TR, AffineTransform.getTranslateInstance(-60, -30))); 190 } 183 191 } 184 192 }
Note:
See TracChangeset
for help on using the changeset viewer.