Changeset 34894 in osm for applications/editors/josm/plugins/smed/src
- Timestamp:
- 2019-02-15T13:45:05+01:00 (6 years ago)
- Location:
- applications/editors/josm/plugins/smed/src/org/openstreetmap/josm/plugins/seamapeditor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/src/org/openstreetmap/josm/plugins/seamapeditor/panels/PanelSectors.java
r34892 r34894 36 36 public class PanelSectors extends JFrame { 37 37 38 private SmedAction dlg;39 38 private JPanel panel; 40 39 private TableModel model; … … 70 69 public PanelSectors(SmedAction dia) { 71 70 super(Messages.getString("SectorTable")); 72 dlg = dia;73 71 setLayout(null); 74 72 setSize(900, 100); -
applications/editors/josm/plugins/smed/src/org/openstreetmap/josm/plugins/seamapeditor/seamarks/SeaMark.java
r34589 r34894 730 730 731 731 public enum Att { 732 COL, CHR, GRP, SEQ, PER, LIT, BEG, END, RAD,HGT, RNG, VIS, EXH, ORT, MLT, ALT733 } 734 735 public Object[] sector = {Col.UNKCOL, "", "", "", "", Lit.UNKLIT, "", "",732 COL, CHR, GRP, SEQ, PER, LIT, BEG, END, HGT, RNG, VIS, EXH, ORT, MLT, ALT 733 } 734 735 public Object[] sector = {Col.UNKCOL, "", "", "", "", Lit.UNKLIT, "", 736 736 "", "", "", Vis.UNKVIS, Exh.UNKEXH, "", "", Col.UNKCOL }; 737 737 … … 770 770 case 8: 771 771 case 9: 772 case 10:773 772 sectors.get(i)[att] = validDecimal((String) obj); 774 773 break; 775 774 case 6: 776 775 case 7: 777 case 1 3:776 case 12: 778 777 sectors.get(i)[att] = validDecimal((String) obj, 360); 779 778 break; … … 1840 1839 setLightAtt(Att.END, i, keys.get("seamark:light" + secStr + ":sector_end")); 1841 1840 } 1842 if (keys.containsKey("seamark:light" + secStr + ":radius")) {1843 setLightAtt(Att.RAD, i, keys.get("seamark:light" + secStr + ":radius"));1844 }1845 1841 if (keys.containsKey("seamark:light" + secStr + ":height")) { 1846 1842 setLightAtt(Att.HGT, i, keys.get("seamark:light" + secStr + ":height")); … … 2790 2786 String secStr = (i == 0) ? "" : (":" + Integer.toString(i)); 2791 2787 if (sectors.get(i)[0] != Col.UNKCOL) 2792 if ((sectors.get(i)[1 5] != Col.UNKCOL) && ((String) sectors.get(i)[1]).contains("Al")) {2788 if ((sectors.get(i)[14] != Col.UNKCOL) && ((String) sectors.get(i)[1]).contains("Al")) { 2793 2789 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":colour", 2794 (ColSTR.get(sectors.get(i)[0])) + ";" + ColSTR.get(sectors.get(i)[1 5])));2790 (ColSTR.get(sectors.get(i)[0])) + ";" + ColSTR.get(sectors.get(i)[14]))); 2795 2791 } else { 2796 2792 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":colour", … … 2833 2829 } 2834 2830 if (!((String) sectors.get(i)[8]).isEmpty()) { 2835 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ": radius", (String) sectors.get(i)[8]));2831 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":height", (String) sectors.get(i)[8])); 2836 2832 } else if (!((String) sectors.get(0)[8]).isEmpty()) { 2837 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ": radius", (String) sectors.get(0)[8]));2833 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":height", (String) sectors.get(0)[8])); 2838 2834 } 2839 2835 if (!((String) sectors.get(i)[9]).isEmpty()) { 2840 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ": height", (String) sectors.get(i)[9]));2836 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":range", (String) sectors.get(i)[9])); 2841 2837 } else if (!((String) sectors.get(0)[9]).isEmpty()) { 2842 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":height", (String) sectors.get(0)[9])); 2843 } 2844 if (!((String) sectors.get(i)[10]).isEmpty()) { 2845 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":range", (String) sectors.get(i)[10])); 2846 } else if (!((String) sectors.get(0)[10]).isEmpty()) { 2847 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":range", (String) sectors.get(0)[10])); 2848 } 2849 if (sectors.get(i)[11] != Vis.UNKVIS) { 2838 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":range", (String) sectors.get(0)[9])); 2839 } 2840 if (sectors.get(i)[10] != Vis.UNKVIS) { 2850 2841 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":visibility", 2851 VisSTR.get(sectors.get(i)[1 1])));2852 } else if (sectors.get(0)[1 1] != Vis.UNKVIS) {2842 VisSTR.get(sectors.get(i)[10]))); 2843 } else if (sectors.get(0)[10] != Vis.UNKVIS) { 2853 2844 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":visibility", 2854 VisSTR.get(sectors.get(0)[1 1])));2855 } 2856 if (sectors.get(i)[1 2] != Exh.UNKEXH) {2845 VisSTR.get(sectors.get(0)[10]))); 2846 } 2847 if (sectors.get(i)[11] != Exh.UNKEXH) { 2857 2848 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":exhibition", 2858 ExhSTR.get(sectors.get(i)[1 2])));2859 } else if (sectors.get(0)[1 2] != Exh.UNKEXH) {2849 ExhSTR.get(sectors.get(i)[11]))); 2850 } else if (sectors.get(0)[11] != Exh.UNKEXH) { 2860 2851 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":exhibition", 2861 ExhSTR.get(sectors.get(0)[12]))); 2852 ExhSTR.get(sectors.get(0)[11]))); 2853 } 2854 if (!((String) sectors.get(i)[12]).isEmpty()) { 2855 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":orientation", 2856 (String) sectors.get(i)[12])); 2862 2857 } 2863 2858 if (!((String) sectors.get(i)[13]).isEmpty()) { 2864 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":orientation", 2865 (String) sectors.get(i)[13])); 2866 } 2867 if (!((String) sectors.get(i)[14]).isEmpty()) { 2868 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":multiple", (String) sectors.get(i)[14])); 2869 } else if (!((String) sectors.get(0)[14]).isEmpty()) { 2870 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":multiple", (String) sectors.get(0)[14])); 2859 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":multiple", (String) sectors.get(i)[13])); 2860 } else if (!((String) sectors.get(0)[13]).isEmpty()) { 2861 undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":multiple", (String) sectors.get(0)[13])); 2871 2862 } 2872 2863 }
Note:
See TracChangeset
for help on using the changeset viewer.