Changeset 32093 in osm for applications/editors/josm/plugins/seachart/src/render/Signals.java
- Timestamp:
- 2016-03-03T17:21:33+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified 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.
