Changeset 34652 in osm for applications/editors/josm/plugins/seachart/src/render/Signals.java
- Timestamp:
- 2018-09-15T13:50:24+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/src/render/Signals.java
r34237 r34652 125 125 case BCNSAW: 126 126 case BCNSPP: 127 if ( (feature.objs.containsKey(Obj.TOPMAR)) || (feature.objs.containsKey(Obj.DAYMAR))) {127 if (feature.objs.containsKey(Obj.TOPMAR) || feature.objs.containsKey(Obj.DAYMAR)) { 128 128 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -140))); 129 129 } else { … … 134 134 case LITVES: 135 135 case BOYINB: 136 if ( (feature.objs.containsKey(Obj.TOPMAR)) || (feature.objs.containsKey(Obj.DAYMAR))) {136 if (feature.objs.containsKey(Obj.TOPMAR) || feature.objs.containsKey(Obj.DAYMAR)) { 137 137 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -110))); 138 138 } else { … … 142 142 case LITMAJ: 143 143 case LITMIN: 144 if ( (feature.objs.containsKey(Obj.TOPMAR)) || (feature.objs.containsKey(Obj.DAYMAR))) {144 if (feature.objs.containsKey(Obj.TOPMAR) || feature.objs.containsKey(Obj.DAYMAR)) { 145 145 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -90))); 146 146 } else { … … 153 153 case BOYSAW: 154 154 case BOYSPP: 155 if ( (feature.objs.containsKey(Obj.TOPMAR)) || (feature.objs.containsKey(Obj.DAYMAR))) {155 if (feature.objs.containsKey(Obj.TOPMAR) || feature.objs.containsKey(Obj.DAYMAR)) { 156 156 if (testAttribute(feature.type, Att.BOYSHP, BoySHP.BOY_PILR) || testAttribute(feature.type, Att.BOYSHP, BoySHP.BOY_SPAR)) { 157 157 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(50, -160))); … … 181 181 String str = ""; 182 182 if (atts.containsKey(Att.CATFOG)) { 183 str += fogSignals.get(((ArrayList<?>) (atts.get(Att.CATFOG).val)).get(0));183 str += fogSignals.get(((ArrayList<?>) atts.get(Att.CATFOG).val).get(0)); 184 184 } 185 185 if (atts.containsKey(Att.SIGGRP)) { … … 440 440 continue; 441 441 if (srad == radius) { 442 ArrayList<CatLIT> scats = (ArrayList<CatLIT>) ( (satts.containsKey(Att.CATLIT)) ? (ArrayList<CatLIT>) satts.get(Att.CATLIT).val : new ArrayList<>());442 ArrayList<CatLIT> scats = (ArrayList<CatLIT>) (satts.containsKey(Att.CATLIT) ? (ArrayList<CatLIT>) satts.get(Att.CATLIT).val : new ArrayList<>()); 443 443 if (scats.contains(CatLIT.LIT_DIR)) { 444 444 if (satts.containsKey(Att.ORIENT)) { … … 557 557 for (ArrayList<LitSect> group : groupings) { 558 558 LitSect mem = group.get(0); 559 if ( (lit.dir == mem.dir) && (lit.chr == mem.chr) && (lit.grp.equals(mem.grp)) && (lit.per == mem.per) && (lit.hgt == mem.hgt)) {559 if (lit.dir == mem.dir && lit.chr == mem.chr && lit.grp.equals(mem.grp) && lit.per == mem.per && lit.hgt == mem.hgt) { 560 560 group.add(lit); 561 561 found = true; … … 616 616 } 617 617 LitSect tmp = group.get(0); 618 str = (tmp.dir)? "Dir" : "";618 str = tmp.dir ? "Dir" : ""; 619 619 str += LightCharacters.get(tmp.chr); 620 620 if (!tmp.grp.isEmpty()) … … 645 645 cats = (ArrayList<CatLIT>) atts.get(Att.CATLIT).val; 646 646 } 647 str = (cats.contains(CatLIT.LIT_DIR)) ? "Dir" : "";648 str += (atts.containsKey(Att.MLTYLT)) ? atts.get(Att.MLTYLT).val : "";647 str = cats.contains(CatLIT.LIT_DIR) ? "Dir" : ""; 648 str += atts.containsKey(Att.MLTYLT) ? atts.get(Att.MLTYLT).val : ""; 649 649 if (atts.containsKey(Att.LITCHR)) { 650 650 LitCHR chr = ((ArrayList<LitCHR>) atts.get(Att.LITCHR).val).get(0); … … 680 680 } 681 681 } 682 str += (cats.contains(CatLIT.LIT_VERT)) ? "(vert)" : "";683 str += (cats.contains(CatLIT.LIT_HORI)) ? "(hor)" : "";682 str += cats.contains(CatLIT.LIT_VERT) ? "(vert)" : ""; 683 str += cats.contains(CatLIT.LIT_HORI) ? "(hor)" : ""; 684 684 str += (!str.isEmpty() && (atts.containsKey(Att.SIGPER) || atts.containsKey(Att.HEIGHT) || atts.containsKey(Att.VALMXR)) && !str.endsWith(")")) ? "." : ""; 685 str += (atts.containsKey(Att.SIGPER)) ? df.format(atts.get(Att.SIGPER).val) + "s" : "";686 str += (atts.containsKey(Att.HEIGHT)) ? df.format(atts.get(Att.HEIGHT).val) + "m" : "";687 str += (atts.containsKey(Att.VALNMR)) ? df.format(atts.get(Att.VALNMR).val) + "M" : "";688 str += (cats.contains(CatLIT.LIT_FRNT)) ? "(Front)" : "";689 str += (cats.contains(CatLIT.LIT_REAR)) ? "(Rear)" : "";690 str += (cats.contains(CatLIT.LIT_UPPR)) ? "(Upper)" : "";691 str += (cats.contains(CatLIT.LIT_LOWR)) ? "(Lower)" : "";685 str += atts.containsKey(Att.SIGPER) ? df.format(atts.get(Att.SIGPER).val) + "s" : ""; 686 str += atts.containsKey(Att.HEIGHT) ? df.format(atts.get(Att.HEIGHT).val) + "m" : ""; 687 str += atts.containsKey(Att.VALNMR) ? df.format(atts.get(Att.VALNMR).val) + "M" : ""; 688 str += cats.contains(CatLIT.LIT_FRNT) ? "(Front)" : ""; 689 str += cats.contains(CatLIT.LIT_REAR) ? "(Rear)" : ""; 690 str += cats.contains(CatLIT.LIT_UPPR) ? "(Upper)" : ""; 691 str += cats.contains(CatLIT.LIT_LOWR) ? "(Lower)" : ""; 692 692 Renderer.labelText(str, new Font("Arial", Font.PLAIN, 40), Color.black, new Delta(Handle.TL, AffineTransform.getTranslateInstance(60, -30))); 693 693 }
Note:
See TracChangeset
for help on using the changeset viewer.