Changeset 27200 in osm
- Timestamp:
- 2011-12-09T23:45:50+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/dialogs/OSeaMAction.java
r27199 r27200 21 21 public PanelMain panelMain = null; 22 22 23 public SeaMark mark = null;24 23 public Node node = null; 25 24 private Collection<? extends OsmPrimitive> Selection = null; … … 36 35 if (nextNode.compareTo(node) != 0) { 37 36 node = nextNode; 38 mark = new SeaMark(dlg); 39 mark.setBounds(new Rectangle(235, 0, 165, 160)); 40 panelMain.add(mark); 41 mark.parseMark(node); 37 panelMain.mark.parseMark(node); 42 38 } 43 39 } else { 44 40 node = null; 45 mark = null;41 panelMain.mark.clearSign(); 46 42 panelMain.syncPanel(); 47 43 manager.showVisualMessage(Messages.getString("OneNode")); … … 51 47 if (nextNode == null) { 52 48 node = null; 53 mark = null;49 panelMain.mark.clearSign(); 54 50 panelMain.syncPanel(); 55 51 manager.showVisualMessage(Messages.getString("SelectNode")); … … 78 74 panelMain.setSize(new Dimension(400, 360)); 79 75 node = null; 80 mark = null;81 76 panelMain.syncPanel(); 82 77 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelChan.java
r27189 r27200 32 32 topmarkButton.setVisible(false); 33 33 lightButton.setVisible(false); 34 Shp shp = dlg.mark.getShape(); 34 Shp shp = dlg.panelMain.mark.getShape(); 35 35 if (portButton.isSelected()) { 36 dlg.mark.setCategory(Cat.LAM_PORT); 36 dlg.panelMain.mark.setCategory(Cat.LAM_PORT); 37 37 if (panelPort.shapes.containsKey(shp)) { 38 38 panelPort.shapes.get(shp).setSelected(true); 39 39 } else { 40 40 panelPort.shapeButtons.clearSelection(); 41 dlg.mark.setShape(Shp.UNKNOWN); 41 dlg.panelMain.mark.setShape(Shp.UNKNOWN); 42 42 } 43 43 panelPort.alShape.actionPerformed(null); … … 48 48 } 49 49 if (prefPortButton.isSelected()) { 50 dlg.mark.setCategory(Cat.LAM_PPORT); 50 dlg.panelMain.mark.setCategory(Cat.LAM_PPORT); 51 51 if (panelPort.shapes.containsKey(shp)) { 52 52 panelPort.shapes.get(shp).setSelected(true); 53 53 } else { 54 54 panelPort.shapeButtons.clearSelection(); 55 dlg.mark.setShape(Shp.UNKNOWN); 55 dlg.panelMain.mark.setShape(Shp.UNKNOWN); 56 56 } 57 57 panelPort.alShape.actionPerformed(null); … … 62 62 } 63 63 if (stbdButton.isSelected()) { 64 dlg.mark.setCategory(Cat.LAM_STBD); 64 dlg.panelMain.mark.setCategory(Cat.LAM_STBD); 65 65 if (panelStbd.shapes.containsKey(shp)) { 66 66 panelStbd.shapes.get(shp).setSelected(true); 67 67 } else { 68 68 panelStbd.shapeButtons.clearSelection(); 69 dlg.mark.setShape(Shp.UNKNOWN); 69 dlg.panelMain.mark.setShape(Shp.UNKNOWN); 70 70 } 71 71 panelStbd.alShape.actionPerformed(null); … … 76 76 } 77 77 if (prefStbdButton.isSelected()) { 78 dlg.mark.setCategory(Cat.LAM_PSTBD); 78 dlg.panelMain.mark.setCategory(Cat.LAM_PSTBD); 79 79 if (panelStbd.shapes.containsKey(shp)) { 80 80 panelStbd.shapes.get(shp).setSelected(true); 81 81 } else { 82 82 panelStbd.shapeButtons.clearSelection(); 83 dlg.mark.setShape(Shp.UNKNOWN); 83 dlg.panelMain.mark.setShape(Shp.UNKNOWN); 84 84 } 85 85 panelStbd.alShape.actionPerformed(null); … … 90 90 } 91 91 if (safeWaterButton.isSelected()) { 92 dlg.mark.setCategory(Cat.NONE); 92 dlg.panelMain.mark.setCategory(Cat.NONE); 93 93 panelSaw.setVisible(true); 94 94 if (panelSaw.shapes.containsKey(shp)) { … … 96 96 } else { 97 97 panelSaw.shapeButtons.clearSelection(); 98 dlg.mark.setShape(Shp.UNKNOWN); 98 dlg.panelMain.mark.setShape(Shp.UNKNOWN); 99 99 } 100 100 panelSaw.alShape.actionPerformed(null); … … 104 104 safeWaterButton.setBorderPainted(false); 105 105 } 106 topmarkButton.setVisible(dlg.mark.testValid()); 106 topmarkButton.setVisible(dlg.panelMain.mark.testValid()); 107 107 alTop.actionPerformed(null); 108 lightButton.setVisible(dlg.mark.testValid()); 108 lightButton.setVisible(dlg.panelMain.mark.testValid()); 109 109 alLit.actionPerformed(null); 110 110 } … … 114 114 public void actionPerformed(java.awt.event.ActionEvent e) { 115 115 if (topmarkButton.isSelected()) { 116 if (SeaMark.GrpMAP.get(dlg.mark.getObject()) == Grp.SAW) { 117 dlg.mark.setTopmark(Top.SPHERE); 118 dlg.mark.setTopPattern(Pat.NONE); 119 dlg.mark.setTopColour(Col.RED); 120 } else { 121 switch (dlg.mark.getCategory()) { 116 if (SeaMark.GrpMAP.get(dlg.panelMain.mark.getObject()) == Grp.SAW) { 117 dlg.panelMain.mark.setTopmark(Top.SPHERE); 118 dlg.panelMain.mark.setTopPattern(Pat.NONE); 119 dlg.panelMain.mark.setTopColour(Col.RED); 120 } else { 121 switch (dlg.panelMain.mark.getCategory()) { 122 122 case LAM_PORT: 123 123 case LAM_PPORT: 124 dlg.mark.setTopmark(Top.CAN); 125 switch (dlg.mark.getRegion()) { 124 dlg.panelMain.mark.setTopmark(Top.CAN); 125 switch (dlg.panelMain.mark.getRegion()) { 126 126 case A: 127 dlg.mark.setTopPattern(Pat.NONE); 128 dlg.mark.setTopColour(Col.RED); 127 dlg.panelMain.mark.setTopPattern(Pat.NONE); 128 dlg.panelMain.mark.setTopColour(Col.RED); 129 129 break; 130 130 case B: 131 dlg.mark.setTopPattern(Pat.NONE); 132 dlg.mark.setTopColour(Col.GREEN); 131 dlg.panelMain.mark.setTopPattern(Pat.NONE); 132 dlg.panelMain.mark.setTopColour(Col.GREEN); 133 133 break; 134 134 case C: 135 dlg.mark.setTopPattern(Pat.HORIZ); 136 dlg.mark.setTopColour(Col.RED); 137 dlg.mark.addTopColour(Col.WHITE); 135 dlg.panelMain.mark.setTopPattern(Pat.HORIZ); 136 dlg.panelMain.mark.setTopColour(Col.RED); 137 dlg.panelMain.mark.addTopColour(Col.WHITE); 138 138 break; 139 139 } … … 141 141 case LAM_STBD: 142 142 case LAM_PSTBD: 143 dlg.mark.setTopmark(Top.CONE); 144 switch (dlg.mark.getRegion()) { 143 dlg.panelMain.mark.setTopmark(Top.CONE); 144 switch (dlg.panelMain.mark.getRegion()) { 145 145 case A: 146 dlg.mark.setTopPattern(Pat.NONE); 147 dlg.mark.setTopColour(Col.GREEN); 146 dlg.panelMain.mark.setTopPattern(Pat.NONE); 147 dlg.panelMain.mark.setTopColour(Col.GREEN); 148 148 break; 149 149 case B: 150 dlg.mark.setTopPattern(Pat.NONE); 151 dlg.mark.setTopColour(Col.RED); 150 dlg.panelMain.mark.setTopPattern(Pat.NONE); 151 dlg.panelMain.mark.setTopColour(Col.RED); 152 152 break; 153 153 case C: 154 dlg.mark.setTopPattern(Pat.HORIZ); 155 dlg.mark.setTopColour(Col.GREEN); 156 dlg.mark.addTopColour(Col.WHITE); 154 dlg.panelMain.mark.setTopPattern(Pat.HORIZ); 155 dlg.panelMain.mark.setTopColour(Col.GREEN); 156 dlg.panelMain.mark.addTopColour(Col.WHITE); 157 157 break; 158 158 } … … 162 162 topmarkButton.setBorderPainted(true); 163 163 } else { 164 dlg.mark.setTopmark(Top.NONE); 165 dlg.mark.setTopPattern(Pat.NONE); 166 dlg.mark.setTopColour(Col.UNKNOWN); 164 dlg.panelMain.mark.setTopmark(Top.NONE); 165 dlg.panelMain.mark.setTopPattern(Pat.NONE); 166 dlg.panelMain.mark.setTopColour(Col.UNKNOWN); 167 167 topmarkButton.setBorderPainted(false); 168 168 } … … 174 174 public void actionPerformed(java.awt.event.ActionEvent e) { 175 175 if (lightButton.isSelected()) { 176 if (SeaMark.GrpMAP.get(dlg.mark.getObject()) == Grp.SAW) { 177 dlg.mark.setLightAtt(Att.CHR, 0, "LFl"); 178 dlg.mark.setLightAtt(Att.COL, 0, Col.WHITE); 179 } else { 180 dlg.mark.setLightAtt(Att.CHR, 0, "Fl"); 181 switch (dlg.mark.getCategory()) { 176 if (SeaMark.GrpMAP.get(dlg.panelMain.mark.getObject()) == Grp.SAW) { 177 dlg.panelMain.mark.setLightAtt(Att.CHR, 0, "LFl"); 178 dlg.panelMain.mark.setLightAtt(Att.COL, 0, Col.WHITE); 179 } else { 180 dlg.panelMain.mark.setLightAtt(Att.CHR, 0, "Fl"); 181 switch (dlg.panelMain.mark.getCategory()) { 182 182 case LAM_PORT: 183 183 case LAM_PPORT: 184 switch (dlg.mark.getRegion()) { 184 switch (dlg.panelMain.mark.getRegion()) { 185 185 case A: 186 186 case C: 187 dlg.mark.setLightAtt(Att.COL, 0, Col.RED); 187 dlg.panelMain.mark.setLightAtt(Att.COL, 0, Col.RED); 188 188 break; 189 189 case B: 190 dlg.mark.setLightAtt(Att.COL, 0, Col.GREEN); 190 dlg.panelMain.mark.setLightAtt(Att.COL, 0, Col.GREEN); 191 191 break; 192 192 } … … 194 194 case LAM_STBD: 195 195 case LAM_PSTBD: 196 switch (dlg.mark.getRegion()) { 196 switch (dlg.panelMain.mark.getRegion()) { 197 197 case A: 198 198 case C: 199 dlg.mark.setLightAtt(Att.COL, 0, Col.GREEN); 199 dlg.panelMain.mark.setLightAtt(Att.COL, 0, Col.GREEN); 200 200 break; 201 201 case B: 202 dlg.mark.setLightAtt(Att.COL, 0, Col.RED); 202 dlg.panelMain.mark.setLightAtt(Att.COL, 0, Col.RED); 203 203 break; 204 204 } … … 208 208 lightButton.setBorderPainted(true); 209 209 } else { 210 dlg.mark.clrLight(); 210 dlg.panelMain.mark.clrLight(); 211 211 lightButton.setBorderPainted(false); 212 212 } … … 254 254 panelStbd.setVisible(false); 255 255 panelSaw.setVisible(false); 256 if (dlg.mark.getCategory() == Cat.LAM_PORT) { 256 if (dlg.panelMain.mark.getCategory() == Cat.LAM_PORT) { 257 257 panelPort.setVisible(true); 258 258 portButton.setBorderPainted(true); … … 260 260 portButton.setBorderPainted(false); 261 261 } 262 if (dlg.mark.getCategory() == Cat.LAM_PPORT) { 262 if (dlg.panelMain.mark.getCategory() == Cat.LAM_PPORT) { 263 263 panelPort.setVisible(true); 264 264 prefPortButton.setBorderPainted(true); … … 266 266 prefPortButton.setBorderPainted(false); 267 267 } 268 if (dlg.mark.getCategory() == Cat.LAM_STBD) { 268 if (dlg.panelMain.mark.getCategory() == Cat.LAM_STBD) { 269 269 panelStbd.setVisible(true); 270 270 stbdButton.setBorderPainted(true); … … 272 272 stbdButton.setBorderPainted(false); 273 273 } 274 if (dlg.mark.getCategory() == Cat.LAM_PSTBD) { 274 if (dlg.panelMain.mark.getCategory() == Cat.LAM_PSTBD) { 275 275 panelStbd.setVisible(true); 276 276 prefStbdButton.setBorderPainted(true); … … 278 278 prefStbdButton.setBorderPainted(false); 279 279 } 280 if (SeaMark.GrpMAP.get(dlg.mark.getObject()) == Grp.SAW) { 280 if (SeaMark.GrpMAP.get(dlg.panelMain.mark.getObject()) == Grp.SAW) { 281 281 panelSaw.setVisible(true); 282 282 safeWaterButton.setBorderPainted(true); … … 284 284 safeWaterButton.setBorderPainted(false); 285 285 } 286 topmarkButton.setBorderPainted(dlg.mark.getTopmark() != Top.NONE); 287 topmarkButton.setSelected(dlg.mark.getTopmark() != Top.NONE); 288 topmarkButton.setVisible(dlg.mark.testValid()); 289 Boolean lit = (dlg.mark.getLightAtt(Att.COL, 0) != Col.UNKNOWN) && !((String)dlg.mark.getLightAtt(Att.CHR, 0)).isEmpty(); 286 topmarkButton.setBorderPainted(dlg.panelMain.mark.getTopmark() != Top.NONE); 287 topmarkButton.setSelected(dlg.panelMain.mark.getTopmark() != Top.NONE); 288 topmarkButton.setVisible(dlg.panelMain.mark.testValid()); 289 Boolean lit = (dlg.panelMain.mark.getLightAtt(Att.COL, 0) != Col.UNKNOWN) && !((String)dlg.panelMain.mark.getLightAtt(Att.CHR, 0)).isEmpty(); 290 290 lightButton.setBorderPainted(lit); 291 291 lightButton.setSelected(lit); 292 lightButton.setVisible(dlg.mark.testValid()); 292 lightButton.setVisible(dlg.panelMain.mark.testValid()); 293 293 panelPort.syncPanel(); 294 294 panelStbd.syncPanel(); 295 295 panelSaw.syncPanel(); 296 dlg.mark.testValid(); 296 dlg.panelMain.mark.testValid(); 297 297 } 298 298 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelChr.java
r27189 r27200 64 64 } 65 65 } 66 dlg.mark.setLightAtt(Att.CHR, 0, charBox.getText()); 66 dlg.panelMain.mark.setLightAtt(Att.CHR, 0, charBox.getText()); 67 67 } 68 68 }; … … 70 70 public void actionPerformed(java.awt.event.ActionEvent e) { 71 71 String str = charBox.getText(); 72 dlg.mark.setLightAtt(Att.CHR, 0, str); 72 dlg.panelMain.mark.setLightAtt(Att.CHR, 0, str); 73 73 EnumSet<Chr> set = EnumSet.noneOf(Chr.class); 74 74 for (EnumSet<Chr> map : SeaMark.ChrMAP.keySet()) { … … 120 120 121 121 public void syncPanel() { 122 String str = (String)dlg.mark.getLightAtt(Att.CHR, 0); 122 String str = (String)dlg.panelMain.mark.getLightAtt(Att.CHR, 0); 123 123 charBox.setText(str); 124 124 EnumSet<Chr> set = EnumSet.noneOf(Chr.class); 125 125 for (EnumSet<Chr> map : SeaMark.ChrMAP.keySet()) { 126 if (str.equals(SeaMark.ChrMAP.get(map))) { 126 if (dlg.node != null && str.equals(SeaMark.ChrMAP.get(map))) { 127 127 set = map; 128 128 break; -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelCol.java
r27189 r27200 41 41 if (button.isSelected()) { 42 42 if (ent == Ent.LIGHT) { 43 dlg.mark.setLightAtt(Att.COL, 0, col); 43 dlg.panelMain.mark.setLightAtt(Att.COL, 0, col); 44 44 button.setBorderPainted(true); 45 45 } else { 46 46 if (button == delButton) { 47 dlg.mark.subColour(ent, stackIdx); 47 dlg.panelMain.mark.subColour(ent, stackIdx); 48 48 } else if (button == addButton) { 49 49 if (stackCol.size() != 0) 50 50 stackIdx++; 51 51 if (stackCol.size() == 0) 52 dlg.mark.setColour(ent, col); 52 dlg.panelMain.mark.setColour(ent, col); 53 53 else 54 dlg.mark.addColour(ent, stackIdx, col); 54 dlg.panelMain.mark.addColour(ent, stackIdx, col); 55 55 } else { 56 dlg.mark.setColour(ent, stackIdx, col); 56 dlg.panelMain.mark.setColour(ent, stackIdx, col); 57 57 } 58 58 syncPanel(); … … 122 122 for (Col col : colours.keySet()) { 123 123 JRadioButton button = colours.get(col); 124 if (dlg.mark.getLightAtt(Att.COL, 0) == col) { 124 if (dlg.panelMain.mark.getLightAtt(Att.COL, 0) == col) { 125 125 button.setBorderPainted(true); 126 126 } else … … 129 129 } else { 130 130 int idx; 131 for (idx = 0; dlg.mark.getColour(ent, idx) != Col.UNKNOWN; idx++) { 131 for (idx = 0; dlg.panelMain.mark.getColour(ent, idx) != Col.UNKNOWN; idx++) { 132 132 if (stackCol.size() <= idx) { 133 133 stackCol.add(idx, new JRadioButton(new ImageIcon(getClass().getResource("/images/ColourButton.png")))); … … 155 155 JRadioButton btnI = stackCol.get(idx); 156 156 btnI.setBounds(2, (2 + (idx * height)), 30, height); 157 btnI.setBackground(SeaMark.ColMAP.get(dlg.mark.getColour(ent, idx))); 157 btnI.setBackground(SeaMark.ColMAP.get(dlg.panelMain.mark.getColour(ent, idx))); 158 158 if (stackIdx == idx) { 159 159 btnI.setBorderPainted(true); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelFog.java
r27189 r27200 30 30 JRadioButton button = fogs.get(fog); 31 31 if (button.isSelected()) { 32 dlg.mark.setFogSound(fog); 32 dlg.panelMain.mark.setFogSound(fog); 33 33 button.setBorderPainted(true); 34 34 } else … … 41 41 private ActionListener alGroup = new ActionListener() { 42 42 public void actionPerformed(java.awt.event.ActionEvent e) { 43 dlg.mark.setFogGroup(groupBox.getText()); 43 dlg.panelMain.mark.setFogGroup(groupBox.getText()); 44 44 } 45 45 }; … … 48 48 private ActionListener alPeriod = new ActionListener() { 49 49 public void actionPerformed(java.awt.event.ActionEvent e) { 50 dlg.mark.setFogPeriod(periodBox.getText()); 50 dlg.panelMain.mark.setFogPeriod(periodBox.getText()); 51 51 } 52 52 }; … … 55 55 private ActionListener alSeq = new ActionListener() { 56 56 public void actionPerformed(java.awt.event.ActionEvent e) { 57 dlg.mark.setFogSequence(seqBox.getText()); 57 dlg.panelMain.mark.setFogSequence(seqBox.getText()); 58 58 } 59 59 }; … … 62 62 private ActionListener alRange = new ActionListener() { 63 63 public void actionPerformed(java.awt.event.ActionEvent e) { 64 dlg.mark.setFogRange(rangeBox.getText()); 64 dlg.panelMain.mark.setFogRange(rangeBox.getText()); 65 65 } 66 66 }; … … 120 120 for (Fog fog : fogs.keySet()) { 121 121 JRadioButton button = fogs.get(fog); 122 button.setBorderPainted(dlg.mark.getFogSound() == fog); 122 button.setBorderPainted(dlg.panelMain.mark.getFogSound() == fog); 123 123 } 124 groupBox.setText(dlg.mark.getFogGroup()); 125 seqBox.setText(dlg.mark.getFogSequence()); 126 periodBox.setText(dlg.mark.getFogPeriod()); 127 rangeBox.setText(dlg.mark.getFogRange()); 124 groupBox.setText(dlg.panelMain.mark.getFogGroup()); 125 seqBox.setText(dlg.panelMain.mark.getFogSequence()); 126 periodBox.setText(dlg.panelMain.mark.getFogPeriod()); 127 rangeBox.setText(dlg.panelMain.mark.getFogRange()); 128 128 } 129 129 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelHaz.java
r27189 r27200 24 24 private ActionListener alCat = new ActionListener() { 25 25 public void actionPerformed(java.awt.event.ActionEvent e) { 26 dlg.mark.setObjPattern(Pat.HORIZ); 26 dlg.panelMain.mark.setObjPattern(Pat.HORIZ); 27 27 if (northButton.isSelected()) { 28 dlg.mark.setCategory(Cat.CAM_NORTH); 29 dlg.mark.setObjColour(Col.BLACK); 30 dlg.mark.addObjColour(Col.YELLOW); 28 dlg.panelMain.mark.setCategory(Cat.CAM_NORTH); 29 dlg.panelMain.mark.setObjColour(Col.BLACK); 30 dlg.panelMain.mark.addObjColour(Col.YELLOW); 31 31 northButton.setBorderPainted(true); 32 32 } else { … … 34 34 } 35 35 if (southButton.isSelected()) { 36 dlg.mark.setCategory(Cat.CAM_SOUTH); 37 dlg.mark.setObjColour(Col.YELLOW); 38 dlg.mark.addObjColour(Col.BLACK); 36 dlg.panelMain.mark.setCategory(Cat.CAM_SOUTH); 37 dlg.panelMain.mark.setObjColour(Col.YELLOW); 38 dlg.panelMain.mark.addObjColour(Col.BLACK); 39 39 southButton.setBorderPainted(true); 40 40 } else { … … 42 42 } 43 43 if (eastButton.isSelected()) { 44 dlg.mark.setCategory(Cat.CAM_EAST); 45 dlg.mark.setObjColour(Col.BLACK); 46 dlg.mark.addObjColour(Col.YELLOW); 47 dlg.mark.addObjColour(Col.BLACK); 44 dlg.panelMain.mark.setCategory(Cat.CAM_EAST); 45 dlg.panelMain.mark.setObjColour(Col.BLACK); 46 dlg.panelMain.mark.addObjColour(Col.YELLOW); 47 dlg.panelMain.mark.addObjColour(Col.BLACK); 48 48 eastButton.setBorderPainted(true); 49 49 } else { … … 51 51 } 52 52 if (westButton.isSelected()) { 53 dlg.mark.setCategory(Cat.CAM_WEST); 54 dlg.mark.setObjColour(Col.YELLOW); 55 dlg.mark.addObjColour(Col.BLACK); 56 dlg.mark.addObjColour(Col.YELLOW); 53 dlg.panelMain.mark.setCategory(Cat.CAM_WEST); 54 dlg.panelMain.mark.setObjColour(Col.YELLOW); 55 dlg.panelMain.mark.addObjColour(Col.BLACK); 56 dlg.panelMain.mark.addObjColour(Col.YELLOW); 57 57 westButton.setBorderPainted(true); 58 58 } else { … … 60 60 } 61 61 if (isolButton.isSelected()) { 62 dlg.mark.setCategory(Cat.NONE); 63 dlg.mark.setObjColour(Col.BLACK); 64 dlg.mark.addObjColour(Col.RED); 65 dlg.mark.addObjColour(Col.BLACK); 62 dlg.panelMain.mark.setCategory(Cat.NONE); 63 dlg.panelMain.mark.setObjColour(Col.BLACK); 64 dlg.panelMain.mark.addObjColour(Col.RED); 65 dlg.panelMain.mark.addObjColour(Col.BLACK); 66 66 isolButton.setBorderPainted(true); 67 67 } else { … … 90 90 JRadioButton button = shapes.get(shp); 91 91 if (button.isSelected()) { 92 dlg.mark.setShape(shp); 92 dlg.panelMain.mark.setShape(shp); 93 93 if (isolButton.isSelected()) 94 dlg.mark.setObject(isdObjects.get(shp)); 94 dlg.panelMain.mark.setObject(isdObjects.get(shp)); 95 95 else 96 dlg.mark.setObject(carObjects.get(shp)); 96 dlg.panelMain.mark.setObject(carObjects.get(shp)); 97 97 button.setBorderPainted(true); 98 98 } else 99 99 button.setBorderPainted(false); 100 100 } 101 topmarkButton.setVisible(dlg.mark.testValid()); 102 lightButton.setVisible(dlg.mark.testValid()); 101 topmarkButton.setVisible(dlg.panelMain.mark.testValid()); 102 lightButton.setVisible(dlg.panelMain.mark.testValid()); 103 103 } 104 104 }; … … 107 107 public void actionPerformed(java.awt.event.ActionEvent e) { 108 108 if (topmarkButton.isSelected()) { 109 dlg.mark.setTopPattern(Pat.NONE); 110 dlg.mark.setTopColour(Col.BLACK); 111 switch (dlg.mark.getCategory()) { 109 dlg.panelMain.mark.setTopPattern(Pat.NONE); 110 dlg.panelMain.mark.setTopColour(Col.BLACK); 111 switch (dlg.panelMain.mark.getCategory()) { 112 112 case CAM_NORTH: 113 dlg.mark.setTopmark(Top.NORTH); 113 dlg.panelMain.mark.setTopmark(Top.NORTH); 114 114 break; 115 115 case CAM_SOUTH: 116 dlg.mark.setTopmark(Top.SOUTH); 116 dlg.panelMain.mark.setTopmark(Top.SOUTH); 117 117 break; 118 118 case CAM_EAST: 119 dlg.mark.setTopmark(Top.EAST); 119 dlg.panelMain.mark.setTopmark(Top.EAST); 120 120 break; 121 121 case CAM_WEST: 122 dlg.mark.setTopmark(Top.WEST); 122 dlg.panelMain.mark.setTopmark(Top.WEST); 123 123 break; 124 124 default: 125 dlg.mark.setTopmark(Top.SPHERES2); 125 dlg.panelMain.mark.setTopmark(Top.SPHERES2); 126 126 break; 127 127 } 128 128 topmarkButton.setBorderPainted(true); 129 129 } else { 130 dlg.mark.setTopmark(Top.NONE); 131 dlg.mark.setTopPattern(Pat.NONE); 132 dlg.mark.setTopColour(Col.UNKNOWN); 130 dlg.panelMain.mark.setTopmark(Top.NONE); 131 dlg.panelMain.mark.setTopPattern(Pat.NONE); 132 dlg.panelMain.mark.setTopColour(Col.UNKNOWN); 133 133 topmarkButton.setBorderPainted(false); 134 134 } … … 140 140 public void actionPerformed(java.awt.event.ActionEvent e) { 141 141 if (lightButton.isSelected()) { 142 dlg.mark.setLightAtt(Att.COL, 0, Col.WHITE); 143 switch (dlg.mark.getCategory()) { 142 dlg.panelMain.mark.setLightAtt(Att.COL, 0, Col.WHITE); 143 switch (dlg.panelMain.mark.getCategory()) { 144 144 case CAM_NORTH: 145 dlg.mark.setLightAtt(Att.CHR, 0, "Q"); 146 dlg.mark.setLightAtt(Att.GRP, 0, ""); 145 dlg.panelMain.mark.setLightAtt(Att.CHR, 0, "Q"); 146 dlg.panelMain.mark.setLightAtt(Att.GRP, 0, ""); 147 147 break; 148 148 case CAM_SOUTH: 149 dlg.mark.setLightAtt(Att.CHR, 0, "Q+LFl"); 150 dlg.mark.setLightAtt(Att.GRP, 0, "6"); 149 dlg.panelMain.mark.setLightAtt(Att.CHR, 0, "Q+LFl"); 150 dlg.panelMain.mark.setLightAtt(Att.GRP, 0, "6"); 151 151 break; 152 152 case CAM_EAST: 153 dlg.mark.setLightAtt(Att.CHR, 0, "Q"); 154 dlg.mark.setLightAtt(Att.GRP, 0, "3"); 153 dlg.panelMain.mark.setLightAtt(Att.CHR, 0, "Q"); 154 dlg.panelMain.mark.setLightAtt(Att.GRP, 0, "3"); 155 155 break; 156 156 case CAM_WEST: 157 dlg.mark.setLightAtt(Att.CHR, 0, "Q"); 158 dlg.mark.setLightAtt(Att.GRP, 0, "9"); 157 dlg.panelMain.mark.setLightAtt(Att.CHR, 0, "Q"); 158 dlg.panelMain.mark.setLightAtt(Att.GRP, 0, "9"); 159 159 break; 160 160 default: 161 dlg.mark.setLightAtt(Att.CHR, 0, "Fl"); 162 dlg.mark.setLightAtt(Att.GRP, 0, "2"); 161 dlg.panelMain.mark.setLightAtt(Att.CHR, 0, "Fl"); 162 dlg.panelMain.mark.setLightAtt(Att.GRP, 0, "2"); 163 163 break; 164 164 } 165 165 lightButton.setBorderPainted(true); 166 166 } else { 167 dlg.mark.clrLight(); 167 dlg.panelMain.mark.clrLight(); 168 168 lightButton.setBorderPainted(false); 169 169 } … … 205 205 206 206 public void syncPanel() { 207 northButton.setBorderPainted(dlg.mark.getCategory() == Cat.CAM_NORTH); 208 southButton.setBorderPainted(dlg.mark.getCategory() == Cat.CAM_SOUTH); 209 eastButton.setBorderPainted(dlg.mark.getCategory() == Cat.CAM_EAST); 210 westButton.setBorderPainted(dlg.mark.getCategory() == Cat.CAM_WEST); 211 isolButton.setBorderPainted(SeaMark.GrpMAP.get(dlg.mark.getObject()) == Grp.ISD); 207 northButton.setBorderPainted(dlg.panelMain.mark.getCategory() == Cat.CAM_NORTH); 208 southButton.setBorderPainted(dlg.panelMain.mark.getCategory() == Cat.CAM_SOUTH); 209 eastButton.setBorderPainted(dlg.panelMain.mark.getCategory() == Cat.CAM_EAST); 210 westButton.setBorderPainted(dlg.panelMain.mark.getCategory() == Cat.CAM_WEST); 211 isolButton.setBorderPainted(SeaMark.GrpMAP.get(dlg.panelMain.mark.getObject()) == Grp.ISD); 212 212 for (Shp shp : shapes.keySet()) { 213 213 JRadioButton button = shapes.get(shp); 214 button.setBorderPainted(dlg.mark.getShape() == shp); 215 } 216 topmarkButton.setBorderPainted(dlg.mark.getTopmark() != Top.NONE); 217 topmarkButton.setSelected(dlg.mark.getTopmark() != Top.NONE); 218 topmarkButton.setVisible(dlg.mark.testValid()); 219 Boolean lit = (dlg.mark.getLightAtt(Att.COL, 0) != Col.UNKNOWN) && !((String)dlg.mark.getLightAtt(Att.CHR, 0)).isEmpty(); 214 button.setBorderPainted(dlg.panelMain.mark.getShape() == shp); 215 } 216 topmarkButton.setBorderPainted(dlg.panelMain.mark.getTopmark() != Top.NONE); 217 topmarkButton.setSelected(dlg.panelMain.mark.getTopmark() != Top.NONE); 218 topmarkButton.setVisible(dlg.panelMain.mark.testValid()); 219 Boolean lit = (dlg.panelMain.mark.getLightAtt(Att.COL, 0) != Col.UNKNOWN) && !((String)dlg.panelMain.mark.getLightAtt(Att.CHR, 0)).isEmpty(); 220 220 lightButton.setBorderPainted(lit); 221 221 lightButton.setSelected(lit); 222 lightButton.setVisible(dlg.mark.testValid()); 222 lightButton.setVisible(dlg.panelMain.mark.testValid()); 223 223 } 224 224 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLights.java
r27199 r27200 24 24 for (Cat cat : landCats.keySet()) { 25 25 int idx = landCats.get(cat); 26 if (dlg. mark!= null && (idx == landCatBox.getSelectedIndex())) {27 dlg.mark.setCategory(cat); 28 dlg.mark.testValid(); 26 if (dlg.node != null && (idx == landCatBox.getSelectedIndex())) { 27 dlg.panelMain.mark.setCategory(cat); 28 dlg.panelMain.mark.testValid(); 29 29 } 30 30 } … … 37 37 for (Cat cat : trafficCats.keySet()) { 38 38 int idx = trafficCats.get(cat); 39 if (dlg. mark!= null && (idx == trafficCatBox.getSelectedIndex())) {40 dlg.mark.setCategory(cat); 41 dlg.mark.testValid(); 39 if (dlg.node != null && (idx == trafficCatBox.getSelectedIndex())) { 40 dlg.panelMain.mark.setCategory(cat); 41 dlg.panelMain.mark.testValid(); 42 42 } 43 43 } … … 50 50 for (Cat cat : warningCats.keySet()) { 51 51 int idx = warningCats.get(cat); 52 if (dlg. mark!= null && (idx == warningCatBox.getSelectedIndex())) {53 dlg.mark.setCategory(cat); 54 dlg.mark.testValid(); 52 if (dlg.node != null && (idx == warningCatBox.getSelectedIndex())) { 53 dlg.panelMain.mark.setCategory(cat); 54 dlg.panelMain.mark.testValid(); 55 55 } 56 56 } … … 72 72 JRadioButton button = objects.get(obj); 73 73 if (button.isSelected()) { 74 dlg.mark.setObject(obj); 74 dlg.panelMain.mark.setObject(obj); 75 75 button.setBorderPainted(true); 76 76 } else 77 77 button.setBorderPainted(false); 78 78 } 79 if (dlg.mark.getObject() == Obj.LITVES) 80 dlg.mark.setShape(Shp.SUPER); 81 else if (dlg.mark.getObject() == Obj.LITFLT) 82 dlg.mark.setShape(Shp.FLOAT); 83 else dlg.mark.setShape(Shp.UNKNOWN); 79 if (dlg.panelMain.mark.getObject() == Obj.LITVES) 80 dlg.panelMain.mark.setShape(Shp.SUPER); 81 else if (dlg.panelMain.mark.getObject() == Obj.LITFLT) 82 dlg.panelMain.mark.setShape(Shp.FLOAT); 83 else dlg.panelMain.mark.setShape(Shp.UNKNOWN); 84 84 if (landButton.isSelected()) { 85 85 categoryLabel.setVisible(true); … … 101 101 alWarningCatBox.actionPerformed(null); 102 102 } else { 103 dlg.mark.setCategory(Cat.NONE); 103 dlg.panelMain.mark.setCategory(Cat.NONE); 104 104 categoryLabel.setVisible(false); 105 105 landCatBox.setVisible(false); … … 107 107 warningCatBox.setVisible(false); 108 108 } 109 dlg.mark.testValid(); 109 dlg.panelMain.mark.testValid(); 110 110 } 111 111 }; … … 197 197 198 198 public void syncPanel() { 199 if ((dlg.mark.getObject() == Obj.LNDMRK) && (dlg.mark.getCategory() != Cat.NONE)) { 199 if ((dlg.panelMain.mark.getObject() == Obj.LNDMRK) && (dlg.panelMain.mark.getCategory() != Cat.NONE)) { 200 200 categoryLabel.setVisible(true); 201 201 landCatBox.setVisible(true); … … 204 204 for (Cat cat : landCats.keySet()) { 205 205 int item = landCats.get(cat); 206 if (dlg.mark.getCategory() == cat) 206 if (dlg.panelMain.mark.getCategory() == cat) 207 207 landCatBox.setSelectedIndex(item); 208 208 } 209 } else if (dlg.mark.getObject() == Obj.SISTAT) { 209 } else if (dlg.panelMain.mark.getObject() == Obj.SISTAT) { 210 210 categoryLabel.setVisible(true); 211 211 trafficCatBox.setVisible(true); … … 214 214 for (Cat cat : trafficCats.keySet()) { 215 215 int item = trafficCats.get(cat); 216 if (dlg.mark.getCategory() == cat) 216 if (dlg.panelMain.mark.getCategory() == cat) 217 217 trafficCatBox.setSelectedIndex(item); 218 218 } 219 } else if (dlg.mark.getObject() == Obj.SISTAW) { 219 } else if (dlg.panelMain.mark.getObject() == Obj.SISTAW) { 220 220 categoryLabel.setVisible(true); 221 221 warningCatBox.setVisible(true); … … 224 224 for (Cat cat : warningCats.keySet()) { 225 225 int item = warningCats.get(cat); 226 if (dlg.mark.getCategory() == cat) 226 if (dlg.panelMain.mark.getCategory() == cat) 227 227 warningCatBox.setSelectedIndex(item); 228 228 } … … 235 235 for (Obj obj : objects.keySet()) { 236 236 JRadioButton button = objects.get(obj); 237 button.setBorderPainted(dlg.mark.getObject() == obj); 238 } 239 dlg.mark.testValid(); 237 button.setBorderPainted(dlg.panelMain.mark.getObject() == obj); 238 } 239 dlg.panelMain.mark.testValid(); 240 240 } 241 241 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLit.java
r27189 r27200 21 21 private ActionListener alGroup = new ActionListener() { 22 22 public void actionPerformed(java.awt.event.ActionEvent e) { 23 dlg.mark.setLightAtt(Att.GRP, 0, groupBox.getText()); 23 dlg.panelMain.mark.setLightAtt(Att.GRP, 0, groupBox.getText()); 24 24 } 25 25 }; … … 28 28 private ActionListener alPeriod = new ActionListener() { 29 29 public void actionPerformed(java.awt.event.ActionEvent e) { 30 dlg.mark.setLightAtt(Att.PER, 0, periodBox.getText()); 30 dlg.panelMain.mark.setLightAtt(Att.PER, 0, periodBox.getText()); 31 31 } 32 32 }; … … 35 35 private ActionListener alSequence = new ActionListener() { 36 36 public void actionPerformed(java.awt.event.ActionEvent e) { 37 dlg.mark.setLightAtt(Att.SEQ, 0, sequenceBox.getText()); 37 dlg.panelMain.mark.setLightAtt(Att.SEQ, 0, sequenceBox.getText()); 38 38 } 39 39 }; … … 46 46 int idx = visibilities.get(vis); 47 47 if (idx == visibilityBox.getSelectedIndex()) 48 dlg.mark.setLightAtt(Att.VIS, 0, vis); 48 dlg.panelMain.mark.setLightAtt(Att.VIS, 0, vis); 49 49 } 50 50 } … … 54 54 private ActionListener alHeight = new ActionListener() { 55 55 public void actionPerformed(java.awt.event.ActionEvent e) { 56 dlg.mark.setLightAtt(Att.HGT, 0, heightBox.getText()); 56 dlg.panelMain.mark.setLightAtt(Att.HGT, 0, heightBox.getText()); 57 57 } 58 58 }; … … 61 61 private ActionListener alRange = new ActionListener() { 62 62 public void actionPerformed(java.awt.event.ActionEvent e) { 63 dlg.mark.setLightAtt(Att.RNG, 0, rangeBox.getText()); 63 dlg.panelMain.mark.setLightAtt(Att.RNG, 0, rangeBox.getText()); 64 64 } 65 65 }; … … 68 68 private ActionListener alOrientation = new ActionListener() { 69 69 public void actionPerformed(java.awt.event.ActionEvent e) { 70 dlg.mark.setLightAtt(Att.ORT, 0, orientationBox.getText()); 70 dlg.panelMain.mark.setLightAtt(Att.ORT, 0, orientationBox.getText()); 71 71 } 72 72 }; … … 75 75 private ActionListener alMultiple = new ActionListener() { 76 76 public void actionPerformed(java.awt.event.ActionEvent e) { 77 dlg.mark.setLightAtt(Att.MLT, 0, multipleBox.getText()); 77 dlg.panelMain.mark.setLightAtt(Att.MLT, 0, multipleBox.getText()); 78 78 } 79 79 }; … … 86 86 int idx = categories.get(lit); 87 87 if (idx == categoryBox.getSelectedIndex()) 88 dlg.mark.setLightAtt(Att.LIT, 0, lit); 89 } 90 if (dlg.mark.getLightAtt(Att.LIT, 0) == Lit.DIR) { 91 dlg.mark.setLightAtt(Att.MLT, 0, ""); 88 dlg.panelMain.mark.setLightAtt(Att.LIT, 0, lit); 89 } 90 if (dlg.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.DIR) { 91 dlg.panelMain.mark.setLightAtt(Att.MLT, 0, ""); 92 92 multipleBox.setText(""); 93 93 orientationLabel.setVisible(true); … … 95 95 multipleLabel.setVisible(false); 96 96 multipleBox.setVisible(false); 97 } else if ((dlg.mark.getLightAtt(Att.LIT, 0) == Lit.VERT) || (dlg.mark.getLightAtt(Att.LIT, 0) == Lit.HORIZ)) { 98 dlg.mark.setLightAtt(Att.ORT, 0, ""); 97 } else if ((dlg.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.VERT) || (dlg.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.HORIZ)) { 98 dlg.panelMain.mark.setLightAtt(Att.ORT, 0, ""); 99 99 orientationBox.setText(""); 100 100 orientationLabel.setVisible(false); … … 103 103 multipleBox.setVisible(true); 104 104 } else { 105 dlg.mark.setLightAtt(Att.MLT, 0, ""); 105 dlg.panelMain.mark.setLightAtt(Att.MLT, 0, ""); 106 106 multipleBox.setText(""); 107 dlg.mark.setLightAtt(Att.ORT, 0, ""); 107 dlg.panelMain.mark.setLightAtt(Att.ORT, 0, ""); 108 108 orientationBox.setText(""); 109 109 orientationLabel.setVisible(false); … … 122 122 int idx = exhibitions.get(exh); 123 123 if (idx == exhibitionBox.getSelectedIndex()) 124 dlg.mark.setLightAtt(Att.EXH, 0, exh); 124 dlg.panelMain.mark.setLightAtt(Att.EXH, 0, exh); 125 125 } 126 126 } … … 143 143 panelSector = null; 144 144 } 145 while (dlg.mark.getSectorCount() > 1) 146 dlg.mark.delLight(1); 145 while (dlg.panelMain.mark.getSectorCount() > 1) 146 dlg.panelMain.mark.delLight(1); 147 147 } 148 148 } … … 295 295 multipleLabel.setVisible(false); 296 296 multipleBox.setVisible(false); 297 groupBox.setText((String)dlg.mark.getLightAtt(Att.GRP, 0)); 298 periodBox.setText((String)dlg.mark.getLightAtt(Att.PER, 0)); 299 sequenceBox.setText((String)dlg.mark.getLightAtt(Att.SEQ, 0)); 300 heightBox.setText((String)dlg.mark.getLightAtt(Att.HGT, 0)); 301 rangeBox.setText((String)dlg.mark.getLightAtt(Att.RNG, 0)); 302 orientationBox.setText((String)dlg.mark.getLightAtt(Att.ORT, 0)); 303 orientationBox.setVisible(dlg.mark.getLightAtt(Att.LIT, 0) == Lit.DIR); 304 multipleBox.setText((String)dlg.mark.getLightAtt(Att.MLT, 0)); 305 multipleBox.setVisible((dlg.mark.getLightAtt(Att.LIT, 0) == Lit.VERT) || (dlg.mark.getLightAtt(Att.LIT, 0) == Lit.HORIZ)); 297 groupBox.setText((String)dlg.panelMain.mark.getLightAtt(Att.GRP, 0)); 298 periodBox.setText((String)dlg.panelMain.mark.getLightAtt(Att.PER, 0)); 299 sequenceBox.setText((String)dlg.panelMain.mark.getLightAtt(Att.SEQ, 0)); 300 heightBox.setText((String)dlg.panelMain.mark.getLightAtt(Att.HGT, 0)); 301 rangeBox.setText((String)dlg.panelMain.mark.getLightAtt(Att.RNG, 0)); 302 orientationBox.setText((String)dlg.panelMain.mark.getLightAtt(Att.ORT, 0)); 303 orientationBox.setVisible(dlg.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.DIR); 304 multipleBox.setText((String)dlg.panelMain.mark.getLightAtt(Att.MLT, 0)); 305 multipleBox.setVisible((dlg.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.VERT) || (dlg.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.HORIZ)); 306 306 for (Vis vis : visibilities.keySet()) { 307 307 int item = visibilities.get(vis); 308 if (dlg.mark.getLightAtt(Att.VIS, 0) == vis) 308 if (dlg.panelMain.mark.getLightAtt(Att.VIS, 0) == vis) 309 309 visibilityBox.setSelectedIndex(item); 310 310 } 311 311 for (Lit lit : categories.keySet()) { 312 312 int item = categories.get(lit); 313 if (dlg.mark.getLightAtt(Att.LIT, 0) == lit) 313 if (dlg.panelMain.mark.getLightAtt(Att.LIT, 0) == lit) 314 314 categoryBox.setSelectedIndex(item); 315 315 } 316 316 for (Exh exh : exhibitions.keySet()) { 317 317 int item = exhibitions.get(exh); 318 if (dlg.mark.getLightAtt(Att.EXH, 0) == exh) 318 if (dlg.panelMain.mark.getLightAtt(Att.EXH, 0) == exh) 319 319 exhibitionBox.setSelectedIndex(item); 320 320 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMain.java
r27199 r27200 14 14 15 15 private OSeaMAction dlg; 16 public SeaMark mark = null; 16 17 public PanelChan panelChan = null; 17 18 public PanelHaz panelHaz = null; … … 27 28 private ActionListener alName = new ActionListener() { 28 29 public void actionPerformed(java.awt.event.ActionEvent e) { 29 if (dlg.mark != null) 30 dlg.mark.setName(nameBox.getText()); 30 mark.setName(nameBox.getText()); 31 31 } 32 32 }; … … 34 34 private ActionListener alSave = new ActionListener() { 35 35 public void actionPerformed(java.awt.event.ActionEvent e) { 36 if (dlg.mark != null) { 37 dlg.mark.saveSign(dlg.node); 38 } 36 mark.saveSign(dlg.node); 39 37 } 40 38 }; … … 77 75 if (chanButton.isSelected()) { 78 76 chanButton.setBorderPainted(true); 79 dlg.mark.clearSign();77 mark.clearSign(); 80 78 panelChan.syncPanel(); 81 79 panelChan.setVisible(true); … … 86 84 if (hazButton.isSelected()) { 87 85 hazButton.setBorderPainted(true); 88 dlg.mark.clearSign();86 mark.clearSign(); 89 87 panelHaz.syncPanel(); 90 88 panelHaz.setVisible(true); … … 95 93 if (specButton.isSelected()) { 96 94 specButton.setBorderPainted(true); 97 dlg.mark.clearSign();95 mark.clearSign(); 98 96 panelSpec.syncPanel(); 99 97 panelSpec.setVisible(true); … … 104 102 if (lightsButton.isSelected()) { 105 103 lightsButton.setBorderPainted(true); 106 dlg.mark.clearSign();104 mark.clearSign(); 107 105 panelLights.syncPanel(); 108 106 panelLights.setVisible(true); … … 162 160 163 161 dlg = dia; 162 mark = new SeaMark(dlg); 163 mark.setBounds(new Rectangle(235, 0, 165, 160)); 164 this.add(mark); 164 165 panelChan = new PanelChan(dlg); 165 166 panelChan.setBounds(new Rectangle(65, 0, 170, 160)); … … 194 195 this.add(getButton(specButton, 0, 80, 62, 40, "Spec"), null); 195 196 this.add(getButton(lightsButton, 0, 120, 62, 40, "Lights"), null); 196 this.add(panelChan , null);197 this.add(panelChan); 197 198 this.add(panelHaz, null); 198 199 this.add(panelSpec, null); … … 285 286 panelLit.setVisible(false); 286 287 nameBox.setEnabled(false); 287 if ( dlg.mark != null) {288 if (mark != null) { 288 289 nameBox.setEnabled(true); 289 290 chanButton.setEnabled(true); … … 291 292 specButton.setEnabled(true); 292 293 lightsButton.setEnabled(true); 293 nameBox.setText( dlg.mark.getName());294 switch (SeaMark.GrpMAP.get( dlg.mark.getObject())) {294 nameBox.setText(mark.getName()); 295 switch (SeaMark.GrpMAP.get(mark.getObject())) { 295 296 case LAT: 296 297 case SAW: -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMore.java
r27189 r27200 19 19 private ActionListener alInfo = new ActionListener() { 20 20 public void actionPerformed(java.awt.event.ActionEvent e) { 21 dlg.mark.setInfo(infoBox.getText()); 21 dlg.panelMain.mark.setInfo(infoBox.getText()); 22 22 } 23 23 }; … … 26 26 private ActionListener alSource = new ActionListener() { 27 27 public void actionPerformed(java.awt.event.ActionEvent e) { 28 dlg.mark.setSource(sourceBox.getText()); 28 dlg.panelMain.mark.setSource(sourceBox.getText()); 29 29 } 30 30 }; … … 33 33 private ActionListener alElev = new ActionListener() { 34 34 public void actionPerformed(java.awt.event.ActionEvent e) { 35 dlg.mark.setElevation(elevBox.getText()); 35 dlg.panelMain.mark.setElevation(elevBox.getText()); 36 36 } 37 37 }; … … 40 40 private ActionListener alHeight = new ActionListener() { 41 41 public void actionPerformed(java.awt.event.ActionEvent e) { 42 dlg.mark.setObjectHeight(heightBox.getText()); 42 dlg.panelMain.mark.setObjectHeight(heightBox.getText()); 43 43 } 44 44 }; … … 50 50 for (Sts sts : statuses.keySet()) { 51 51 int idx = statuses.get(sts); 52 if (dlg.mark != null && (idx == statusBox.getSelectedIndex())) 53 dlg.mark.setStatus(sts); 52 if (dlg.panelMain.mark != null && (idx == statusBox.getSelectedIndex())) 53 dlg.panelMain.mark.setStatus(sts); 54 54 } 55 55 } … … 62 62 for (Cns cns : constructions.keySet()) { 63 63 int idx = constructions.get(cns); 64 if (dlg.mark != null && (idx == constrBox.getSelectedIndex())) 65 dlg.mark.setConstr(cns); 64 if (dlg.panelMain.mark != null && (idx == constrBox.getSelectedIndex())) 65 dlg.panelMain.mark.setConstr(cns); 66 66 } 67 67 } … … 74 74 for (Con con : conspicuities.keySet()) { 75 75 int idx = conspicuities.get(con); 76 if (dlg.mark != null && (idx == conBox.getSelectedIndex())) 77 dlg.mark.setConsp(con); 76 if (dlg.panelMain.mark != null && (idx == conBox.getSelectedIndex())) 77 dlg.panelMain.mark.setConsp(con); 78 78 } 79 79 } … … 86 86 for (Con con : reflectivities.keySet()) { 87 87 int idx = reflectivities.get(con); 88 if (dlg.mark != null && (idx == reflBox.getSelectedIndex())) 89 dlg.mark.setRefl(con); 88 if (dlg.panelMain.mark != null && (idx == reflBox.getSelectedIndex())) 89 dlg.panelMain.mark.setRefl(con); 90 90 } 91 91 } … … 99 99 public void actionPerformed(java.awt.event.ActionEvent e) { 100 100 if (regionAButton.isSelected()) { 101 dlg.mark.setRegion(Reg.A); 102 switch (dlg.mark.getCategory()) { 101 dlg.panelMain.mark.setRegion(Reg.A); 102 switch (dlg.panelMain.mark.getCategory()) { 103 103 case LAM_PORT: 104 dlg.mark.setObjColour(Col.RED); 105 dlg.mark.setObjPattern(Pat.NONE); 104 dlg.panelMain.mark.setObjColour(Col.RED); 105 dlg.panelMain.mark.setObjPattern(Pat.NONE); 106 106 break; 107 107 case LAM_PPORT: 108 dlg.mark.setObjColour(Col.RED); 109 dlg.mark.addObjColour(Col.GREEN); 110 dlg.mark.addObjColour(Col.RED); 111 dlg.mark.setObjPattern(Pat.HORIZ); 108 dlg.panelMain.mark.setObjColour(Col.RED); 109 dlg.panelMain.mark.addObjColour(Col.GREEN); 110 dlg.panelMain.mark.addObjColour(Col.RED); 111 dlg.panelMain.mark.setObjPattern(Pat.HORIZ); 112 112 break; 113 113 case LAM_STBD: 114 dlg.mark.setObjColour(Col.GREEN); 115 dlg.mark.setObjPattern(Pat.NONE); 114 dlg.panelMain.mark.setObjColour(Col.GREEN); 115 dlg.panelMain.mark.setObjPattern(Pat.NONE); 116 116 break; 117 117 case LAM_PSTBD: 118 dlg.mark.setObjColour(Col.GREEN); 119 dlg.mark.addObjColour(Col.RED); 120 dlg.mark.addObjColour(Col.GREEN); 121 dlg.mark.setObjPattern(Pat.HORIZ); 118 dlg.panelMain.mark.setObjColour(Col.GREEN); 119 dlg.panelMain.mark.addObjColour(Col.RED); 120 dlg.panelMain.mark.addObjColour(Col.GREEN); 121 dlg.panelMain.mark.setObjPattern(Pat.HORIZ); 122 122 break; 123 123 } … … 127 127 } 128 128 if (regionBButton.isSelected()) { 129 dlg.mark.setRegion(Reg.B); 130 switch (dlg.mark.getCategory()) { 129 dlg.panelMain.mark.setRegion(Reg.B); 130 switch (dlg.panelMain.mark.getCategory()) { 131 131 case LAM_PORT: 132 dlg.mark.setObjColour(Col.GREEN); 133 dlg.mark.setObjPattern(Pat.NONE); 132 dlg.panelMain.mark.setObjColour(Col.GREEN); 133 dlg.panelMain.mark.setObjPattern(Pat.NONE); 134 134 break; 135 135 case LAM_PPORT: 136 dlg.mark.setObjColour(Col.GREEN); 137 dlg.mark.addObjColour(Col.RED); 138 dlg.mark.addObjColour(Col.GREEN); 139 dlg.mark.setObjPattern(Pat.HORIZ); 136 dlg.panelMain.mark.setObjColour(Col.GREEN); 137 dlg.panelMain.mark.addObjColour(Col.RED); 138 dlg.panelMain.mark.addObjColour(Col.GREEN); 139 dlg.panelMain.mark.setObjPattern(Pat.HORIZ); 140 140 break; 141 141 case LAM_STBD: 142 dlg.mark.setObjColour(Col.RED); 143 dlg.mark.setObjPattern(Pat.NONE); 142 dlg.panelMain.mark.setObjColour(Col.RED); 143 dlg.panelMain.mark.setObjPattern(Pat.NONE); 144 144 break; 145 145 case LAM_PSTBD: 146 dlg.mark.setObjColour(Col.RED); 147 dlg.mark.addObjColour(Col.GREEN); 148 dlg.mark.addObjColour(Col.RED); 149 dlg.mark.setObjPattern(Pat.HORIZ); 146 dlg.panelMain.mark.setObjColour(Col.RED); 147 dlg.panelMain.mark.addObjColour(Col.GREEN); 148 dlg.panelMain.mark.addObjColour(Col.RED); 149 dlg.panelMain.mark.setObjPattern(Pat.HORIZ); 150 150 break; 151 151 } … … 155 155 } 156 156 if (regionCButton.isSelected()) { 157 dlg.mark.setRegion(Reg.C); 158 dlg.mark.setObjPattern(Pat.HORIZ); 159 switch (dlg.mark.getCategory()) { 157 dlg.panelMain.mark.setRegion(Reg.C); 158 dlg.panelMain.mark.setObjPattern(Pat.HORIZ); 159 switch (dlg.panelMain.mark.getCategory()) { 160 160 case LAM_PORT: 161 dlg.mark.setObjColour(Col.RED); 162 dlg.mark.addObjColour(Col.WHITE); 163 dlg.mark.addObjColour(Col.RED); 164 dlg.mark.addObjColour(Col.WHITE); 161 dlg.panelMain.mark.setObjColour(Col.RED); 162 dlg.panelMain.mark.addObjColour(Col.WHITE); 163 dlg.panelMain.mark.addObjColour(Col.RED); 164 dlg.panelMain.mark.addObjColour(Col.WHITE); 165 165 break; 166 166 case LAM_PPORT: 167 167 case LAM_PSTBD: 168 dlg.mark.setObjColour(Col.RED); 169 dlg.mark.addObjColour(Col.GREEN); 170 dlg.mark.addObjColour(Col.RED); 171 dlg.mark.addObjColour(Col.GREEN); 168 dlg.panelMain.mark.setObjColour(Col.RED); 169 dlg.panelMain.mark.addObjColour(Col.GREEN); 170 dlg.panelMain.mark.addObjColour(Col.RED); 171 dlg.panelMain.mark.addObjColour(Col.GREEN); 172 172 break; 173 173 case LAM_STBD: 174 dlg.mark.setObjColour(Col.GREEN); 175 dlg.mark.addObjColour(Col.WHITE); 176 dlg.mark.addObjColour(Col.GREEN); 177 dlg.mark.addObjColour(Col.WHITE); 174 dlg.panelMain.mark.setObjColour(Col.GREEN); 175 dlg.panelMain.mark.addObjColour(Col.WHITE); 176 dlg.panelMain.mark.addObjColour(Col.GREEN); 177 dlg.panelMain.mark.addObjColour(Col.WHITE); 178 178 break; 179 179 } … … 303 303 public void syncPanel() { 304 304 panelPat.syncPanel(); 305 regionAButton.setBorderPainted(dlg.mark.getRegion() == Reg.A); 306 regionBButton.setBorderPainted(dlg.mark.getRegion() == Reg.B); 307 regionCButton.setBorderPainted(dlg.mark.getRegion() == Reg.C); 308 elevBox.setText(dlg.mark.getElevation()); 309 heightBox.setText(dlg.mark.getObjectHeight()); 310 sourceBox.setText(dlg.mark.getSource()); 311 infoBox.setText(dlg.mark.getInfo()); 305 regionAButton.setBorderPainted(dlg.panelMain.mark.getRegion() == Reg.A); 306 regionBButton.setBorderPainted(dlg.panelMain.mark.getRegion() == Reg.B); 307 regionCButton.setBorderPainted(dlg.panelMain.mark.getRegion() == Reg.C); 308 elevBox.setText(dlg.panelMain.mark.getElevation()); 309 heightBox.setText(dlg.panelMain.mark.getObjectHeight()); 310 sourceBox.setText(dlg.panelMain.mark.getSource()); 311 infoBox.setText(dlg.panelMain.mark.getInfo()); 312 312 for (Sts sts : statuses.keySet()) { 313 313 int item = statuses.get(sts); 314 if (dlg.mark.getStatus() == sts) 314 if (dlg.panelMain.mark.getStatus() == sts) 315 315 statusBox.setSelectedIndex(item); 316 316 } 317 317 for (Cns cns : constructions.keySet()) { 318 318 int item = constructions.get(cns); 319 if (dlg.mark.getConstr() == cns) 319 if (dlg.panelMain.mark.getConstr() == cns) 320 320 constrBox.setSelectedIndex(item); 321 321 } 322 322 for (Con con : conspicuities.keySet()) { 323 323 int item = conspicuities.get(con); 324 if (dlg.mark.getConsp() == con) 324 if (dlg.panelMain.mark.getConsp() == con) 325 325 conBox.setSelectedIndex(item); 326 326 } 327 327 for (Con con : reflectivities.keySet()) { 328 328 int item = reflectivities.get(con); 329 if (dlg.mark.getRefl() == con) 329 if (dlg.panelMain.mark.getRefl() == con) 330 330 reflBox.setSelectedIndex(item); 331 331 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelPat.java
r27054 r27200 31 31 JRadioButton button = patterns.get(pat); 32 32 if (button.isSelected()) { 33 dlg.mark.setPattern(ent, pat); 33 dlg.panelMain.mark.setPattern(ent, pat); 34 34 button.setBorderPainted(true); 35 35 } else 36 36 button.setBorderPainted(false); 37 37 } 38 switch (dlg.mark.getPattern(ent)) { 38 switch (dlg.panelMain.mark.getPattern(ent)) { 39 39 case NONE: 40 40 panelCol.trimStack(1); … … 73 73 for (Pat pat : patterns.keySet()) { 74 74 JRadioButton button = patterns.get(pat); 75 if (dlg.mark.getPattern(ent) == pat) { 75 if (dlg.panelMain.mark.getPattern(ent) == pat) { 76 76 button.setBorderPainted(true); 77 77 } else -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelPort.java
r27189 r27200 31 31 JRadioButton button = shapes.get(shp); 32 32 if (button.isSelected()) { 33 dlg.mark.setShape(shp); 34 dlg.mark.setObject(objects.get(shp)); 33 dlg.panelMain.mark.setShape(shp); 34 dlg.panelMain.mark.setObject(objects.get(shp)); 35 35 button.setBorderPainted(true); 36 36 } else 37 37 button.setBorderPainted(false); 38 38 } 39 if (dlg.mark.testValid()) { 39 if (dlg.panelMain.mark.testValid()) { 40 40 dlg.panelMain.panelChan.topmarkButton.setVisible(true); 41 41 dlg.panelMain.panelChan.lightButton.setVisible(true); 42 if (dlg.mark.getCategory() == Cat.LAM_PORT) { 43 switch (dlg.mark.getRegion()) { 42 if (dlg.panelMain.mark.getCategory() == Cat.LAM_PORT) { 43 switch (dlg.panelMain.mark.getRegion()) { 44 44 case A: 45 dlg.mark.setObjPattern(Pat.NONE); 46 dlg.mark.setObjColour(Col.RED); 45 dlg.panelMain.mark.setObjPattern(Pat.NONE); 46 dlg.panelMain.mark.setObjColour(Col.RED); 47 47 break; 48 48 case B: 49 dlg.mark.setObjPattern(Pat.NONE); 50 dlg.mark.setObjColour(Col.GREEN); 49 dlg.panelMain.mark.setObjPattern(Pat.NONE); 50 dlg.panelMain.mark.setObjColour(Col.GREEN); 51 51 break; 52 52 case C: 53 dlg.mark.setObjPattern(Pat.HORIZ); 54 dlg.mark.setObjColour(Col.RED); 55 dlg.mark.addObjColour(Col.WHITE); 56 dlg.mark.addObjColour(Col.RED); 57 dlg.mark.addObjColour(Col.WHITE); 53 dlg.panelMain.mark.setObjPattern(Pat.HORIZ); 54 dlg.panelMain.mark.setObjColour(Col.RED); 55 dlg.panelMain.mark.addObjColour(Col.WHITE); 56 dlg.panelMain.mark.addObjColour(Col.RED); 57 dlg.panelMain.mark.addObjColour(Col.WHITE); 58 58 break; 59 59 } 60 60 } else { 61 dlg.mark.setObjPattern(Pat.HORIZ); 62 switch (dlg.mark.getRegion()) { 61 dlg.panelMain.mark.setObjPattern(Pat.HORIZ); 62 switch (dlg.panelMain.mark.getRegion()) { 63 63 case A: 64 dlg.mark.setObjColour(Col.RED); 65 dlg.mark.addObjColour(Col.GREEN); 66 dlg.mark.addObjColour(Col.RED); 64 dlg.panelMain.mark.setObjColour(Col.RED); 65 dlg.panelMain.mark.addObjColour(Col.GREEN); 66 dlg.panelMain.mark.addObjColour(Col.RED); 67 67 break; 68 68 case B: 69 dlg.mark.setObjColour(Col.GREEN); 70 dlg.mark.addObjColour(Col.RED); 71 dlg.mark.addObjColour(Col.GREEN); 69 dlg.panelMain.mark.setObjColour(Col.GREEN); 70 dlg.panelMain.mark.addObjColour(Col.RED); 71 dlg.panelMain.mark.addObjColour(Col.GREEN); 72 72 break; 73 73 case C: 74 dlg.mark.setObjColour(Col.RED); 75 dlg.mark.addObjColour(Col.GREEN); 76 dlg.mark.addObjColour(Col.RED); 77 dlg.mark.addObjColour(Col.GREEN); 74 dlg.panelMain.mark.setObjColour(Col.RED); 75 dlg.panelMain.mark.addObjColour(Col.GREEN); 76 dlg.panelMain.mark.addObjColour(Col.RED); 77 dlg.panelMain.mark.addObjColour(Col.GREEN); 78 78 break; 79 79 } … … 104 104 for (Shp shp : shapes.keySet()) { 105 105 JRadioButton button = shapes.get(shp); 106 if (dlg.mark.getShape() == shp) { 106 if (dlg.panelMain.mark.getShape() == shp) { 107 107 button.setBorderPainted(true); 108 108 } else -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelRadar.java
r27189 r27200 27 27 JRadioButton button = rads.get(rtb); 28 28 if (button.isSelected()) { 29 dlg.mark.setRadar(rtb); 29 dlg.panelMain.mark.setRadar(rtb); 30 30 } 31 31 } … … 37 37 private ActionListener alGroup = new ActionListener() { 38 38 public void actionPerformed(java.awt.event.ActionEvent e) { 39 dlg.mark.setRaconGroup(groupBox.getText()); 39 dlg.panelMain.mark.setRaconGroup(groupBox.getText()); 40 40 } 41 41 }; … … 44 44 private ActionListener alPeriod = new ActionListener() { 45 45 public void actionPerformed(java.awt.event.ActionEvent e) { 46 dlg.mark.setRaconPeriod(periodBox.getText()); 46 dlg.panelMain.mark.setRaconPeriod(periodBox.getText()); 47 47 } 48 48 }; … … 51 51 private ActionListener alSeq = new ActionListener() { 52 52 public void actionPerformed(java.awt.event.ActionEvent e) { 53 dlg.mark.setRaconSequence(seqBox.getText()); 53 dlg.panelMain.mark.setRaconSequence(seqBox.getText()); 54 54 } 55 55 }; … … 58 58 private ActionListener alRange = new ActionListener() { 59 59 public void actionPerformed(java.awt.event.ActionEvent e) { 60 dlg.mark.setRaconRange(rangeBox.getText()); 60 dlg.panelMain.mark.setRaconRange(rangeBox.getText()); 61 61 } 62 62 }; … … 65 65 private ActionListener alSector1 = new ActionListener() { 66 66 public void actionPerformed(java.awt.event.ActionEvent e) { 67 dlg.mark.setRaconSector1(sector1Box.getText()); 67 dlg.panelMain.mark.setRaconSector1(sector1Box.getText()); 68 68 } 69 69 }; … … 72 72 private ActionListener alSector2 = new ActionListener() { 73 73 public void actionPerformed(java.awt.event.ActionEvent e) { 74 dlg.mark.setRaconSector2(sector2Box.getText()); 74 dlg.panelMain.mark.setRaconSector2(sector2Box.getText()); 75 75 } 76 76 }; … … 145 145 146 146 public void syncPanel() { 147 boolean rad = ((dlg.mark.getRadar() != Rtb.NONE) && (dlg.mark.getRadar() != Rtb.REFLECTOR)); 147 boolean rad = ((dlg.panelMain.mark.getRadar() != Rtb.NONE) && (dlg.panelMain.mark.getRadar() != Rtb.REFLECTOR)); 148 148 groupLabel.setVisible(rad); 149 149 groupBox.setVisible(rad); … … 160 160 sectorsLabel.setVisible(rad); 161 161 for (Rtb rtb : rads.keySet()) { 162 rads.get(rtb).setBorderPainted(dlg.mark.getRadar() == rtb); 162 rads.get(rtb).setBorderPainted(dlg.panelMain.mark.getRadar() == rtb); 163 163 } 164 groupBox.setText(dlg.mark.getRaconGroup()); 165 seqBox.setText(dlg.mark.getRaconSequence()); 166 periodBox.setText(dlg.mark.getRaconPeriod()); 167 rangeBox.setText(dlg.mark.getRaconRange()); 168 sector1Box.setText(dlg.mark.getRaconSector1()); 169 sector2Box.setText(dlg.mark.getRaconSector2()); 164 groupBox.setText(dlg.panelMain.mark.getRaconGroup()); 165 seqBox.setText(dlg.panelMain.mark.getRaconSequence()); 166 periodBox.setText(dlg.panelMain.mark.getRaconPeriod()); 167 rangeBox.setText(dlg.panelMain.mark.getRaconRange()); 168 sector1Box.setText(dlg.panelMain.mark.getRaconSector1()); 169 sector2Box.setText(dlg.panelMain.mark.getRaconSector2()); 170 170 } 171 171 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSaw.java
r27189 r27200 27 27 JRadioButton button = shapes.get(shp); 28 28 if (button.isSelected()) { 29 dlg.mark.setShape(shp); 30 dlg.mark.setObject(objects.get(shp)); 29 dlg.panelMain.mark.setShape(shp); 30 dlg.panelMain.mark.setObject(objects.get(shp)); 31 31 button.setBorderPainted(true); 32 32 } else 33 33 button.setBorderPainted(false); 34 34 } 35 if (dlg.mark.testValid()) { 35 if (dlg.panelMain.mark.testValid()) { 36 36 dlg.panelMain.panelChan.topmarkButton.setVisible(true); 37 dlg.mark.setObjPattern(Pat.VERT); 38 dlg.mark.setObjColour(Col.RED); 39 dlg.mark.addObjColour(Col.WHITE); 37 dlg.panelMain.mark.setObjPattern(Pat.VERT); 38 dlg.panelMain.mark.setObjColour(Col.RED); 39 dlg.panelMain.mark.addObjColour(Col.WHITE); 40 40 } else { 41 41 dlg.panelMain.panelChan.topmarkButton.setVisible(false); … … 58 58 for (Shp shp : shapes.keySet()) { 59 59 JRadioButton button = shapes.get(shp); 60 if (dlg.mark.getShape() == shp) { 60 if (dlg.panelMain.mark.getShape() == shp) { 61 61 button.setBorderPainted(true); 62 62 } else 63 63 button.setBorderPainted(false); 64 64 } 65 dlg.mark.testValid(); 65 dlg.panelMain.mark.testValid(); 66 66 } 67 67 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSectors.java
r27151 r27200 126 126 127 127 public int getRowCount() { 128 return dlg.mark.getSectorCount(); 128 return dlg.panelMain.mark.getSectorCount(); 129 129 } 130 130 … … 152 152 return row; 153 153 case 1: 154 return dlg.mark.getLightAtt(Att.COL, row); 154 return dlg.panelMain.mark.getLightAtt(Att.COL, row); 155 155 case 6: 156 return (dlg.mark.getLightAtt(Att.LIT, row) == Lit.DIR); 156 return (dlg.panelMain.mark.getLightAtt(Att.LIT, row) == Lit.DIR); 157 157 case 7: 158 158 case 8: 159 if (dlg.mark.getLightAtt(Att.LIT, row) == Lit.DIR) 160 return dlg.mark.getLightAtt(Att.ORT, row); 159 if (dlg.panelMain.mark.getLightAtt(Att.LIT, row) == Lit.DIR) 160 return dlg.panelMain.mark.getLightAtt(Att.ORT, row); 161 161 else 162 return dlg.mark.getLightAtt(col - 1, row); 162 return dlg.panelMain.mark.getLightAtt(col - 1, row); 163 163 case 12: 164 return visibilities.get(dlg.mark.getLightAtt(Att.VIS, row)); 164 return visibilities.get(dlg.panelMain.mark.getLightAtt(Att.VIS, row)); 165 165 case 13: 166 return exhibitions.get(dlg.mark.getLightAtt(Att.EXH, row)); 166 return exhibitions.get(dlg.panelMain.mark.getLightAtt(Att.EXH, row)); 167 167 default: 168 return dlg.mark.getLightAtt(col - 1, row); 168 return dlg.panelMain.mark.getLightAtt(col - 1, row); 169 169 } 170 170 } … … 176 176 ImageIcon img = colours.get(colour); 177 177 if (img == value) 178 dlg.mark.setLightAtt(Att.COL, row, colour); 178 dlg.panelMain.mark.setLightAtt(Att.COL, row, colour); 179 179 } 180 180 break; … … 183 183 case 10: 184 184 case 11: 185 dlg.mark.setLightAtt(col - 1, row, value); 185 dlg.panelMain.mark.setLightAtt(col - 1, row, value); 186 186 break; 187 187 case 6: 188 188 if ((Boolean) value == true) { 189 dlg.mark.setLightAtt(Att.LIT, row, Lit.DIR); 190 dlg.mark.setLightAtt(Att.BEG, row, ""); 191 dlg.mark.setLightAtt(Att.END, row, ""); 189 dlg.panelMain.mark.setLightAtt(Att.LIT, row, Lit.DIR); 190 dlg.panelMain.mark.setLightAtt(Att.BEG, row, ""); 191 dlg.panelMain.mark.setLightAtt(Att.END, row, ""); 192 192 } else { 193 dlg.mark.setLightAtt(Att.LIT, row, Lit.UNKNOWN); 194 dlg.mark.setLightAtt(Att.ORT, row, ""); 193 dlg.panelMain.mark.setLightAtt(Att.LIT, row, Lit.UNKNOWN); 194 dlg.panelMain.mark.setLightAtt(Att.ORT, row, ""); 195 195 } 196 196 break; 197 197 case 7: 198 198 case 8: 199 if (dlg.mark.getLightAtt(Att.LIT, row) == Lit.DIR) { 200 dlg.mark.setLightAtt(Att.ORT, row, value); 199 if (dlg.panelMain.mark.getLightAtt(Att.LIT, row) == Lit.DIR) { 200 dlg.panelMain.mark.setLightAtt(Att.ORT, row, value); 201 201 } else { 202 dlg.mark.setLightAtt(col - 1, row, value); 202 dlg.panelMain.mark.setLightAtt(col - 1, row, value); 203 203 } 204 204 break; … … 207 207 String str = visibilities.get(vis); 208 208 if (str.equals(value)) 209 dlg.mark.setLightAtt(Att.VIS, row, vis); 209 dlg.panelMain.mark.setLightAtt(Att.VIS, row, vis); 210 210 } 211 211 break; … … 214 214 String str = exhibitions.get(exh); 215 215 if (str.equals(value)) 216 dlg.mark.setLightAtt(Att.EXH, row, exh); 216 dlg.panelMain.mark.setLightAtt(Att.EXH, row, exh); 217 217 } 218 218 break; 219 219 default: 220 dlg.mark.setLightAtt(col - 1, row, value); 220 dlg.panelMain.mark.setLightAtt(col - 1, row, value); 221 221 } 222 222 } … … 247 247 248 248 public void addSector(int idx) { 249 dlg.mark.addLight(idx); 249 dlg.panelMain.mark.addLight(idx); 250 250 table.setSize(860, ((table.getRowCount() * 16) + 18)); 251 251 if (table.getRowCount() > 3) { … … 257 257 258 258 public void deleteSector(int idx) { 259 dlg.mark.delLight(idx); 259 dlg.panelMain.mark.delLight(idx); 260 260 table.setSize(860, ((table.getRowCount() * 16) + 18)); 261 261 if (table.getRowCount() > 3) { -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSpec.java
r27189 r27200 22 22 for (Cat cat : categories.keySet()) { 23 23 int idx = categories.get(cat); 24 if (dlg. mark!= null && (idx == categoryBox.getSelectedIndex()))25 dlg.mark.setCategory(cat); 24 if (dlg.node != null && (idx == categoryBox.getSelectedIndex())) 25 dlg.panelMain.mark.setCategory(cat); 26 26 } 27 27 } … … 47 47 JRadioButton button = shapes.get(shp); 48 48 if (button.isSelected()) { 49 dlg.mark.setShape(shp); 50 dlg.mark.setObject(objects.get(shp)); 49 dlg.panelMain.mark.setShape(shp); 50 dlg.panelMain.mark.setObject(objects.get(shp)); 51 51 if (button == cairnButton) { 52 dlg.mark.setObjPattern(Pat.NONE); 53 dlg.mark.setObjColour(Col.UNKNOWN); 52 dlg.panelMain.mark.setObjPattern(Pat.NONE); 53 dlg.panelMain.mark.setObjColour(Col.UNKNOWN); 54 54 } 55 if (dlg.mark.getObjColour(0) == Col.UNKNOWN) { 56 dlg.mark.setObjPattern(Pat.NONE); 57 dlg.mark.setObjColour(Col.YELLOW); 55 if (dlg.panelMain.mark.getObjColour(0) == Col.UNKNOWN) { 56 dlg.panelMain.mark.setObjPattern(Pat.NONE); 57 dlg.panelMain.mark.setObjColour(Col.YELLOW); 58 58 } 59 59 button.setBorderPainted(true); … … 61 61 button.setBorderPainted(false); 62 62 } 63 topmarkButton.setVisible(dlg.mark.testValid()); 63 topmarkButton.setVisible(dlg.panelMain.mark.testValid()); 64 64 dlg.panelMain.panelMore.syncPanel(); 65 65 } … … 69 69 public void actionPerformed(java.awt.event.ActionEvent e) { 70 70 if (topmarkButton.isSelected()) { 71 dlg.mark.setTopmark(Top.X_SHAPE); 72 dlg.mark.setTopPattern(Pat.NONE); 73 dlg.mark.setTopColour(Col.YELLOW); 71 dlg.panelMain.mark.setTopmark(Top.X_SHAPE); 72 dlg.panelMain.mark.setTopPattern(Pat.NONE); 73 dlg.panelMain.mark.setTopColour(Col.YELLOW); 74 74 topmarkButton.setBorderPainted(true); 75 75 } else { 76 dlg.mark.setTopmark(Top.NONE); 77 dlg.mark.setTopPattern(Pat.NONE); 78 dlg.mark.setTopColour(Col.UNKNOWN); 76 dlg.panelMain.mark.setTopmark(Top.NONE); 77 dlg.panelMain.mark.setTopPattern(Pat.NONE); 78 dlg.panelMain.mark.setTopColour(Col.UNKNOWN); 79 79 topmarkButton.setBorderPainted(false); 80 80 } … … 135 135 for (Shp shp : shapes.keySet()) { 136 136 JRadioButton button = shapes.get(shp); 137 if (dlg.mark.getShape() == shp) { 137 if (dlg.panelMain.mark.getShape() == shp) { 138 138 button.setBorderPainted(true); 139 139 } else … … 142 142 for (Cat cat : categories.keySet()) { 143 143 int item = categories.get(cat); 144 if (dlg.mark.getCategory() == cat) 144 if (dlg.panelMain.mark.getCategory() == cat) 145 145 categoryBox.setSelectedIndex(item); 146 146 } 147 topmarkButton.setBorderPainted(dlg.mark.getTopmark() != Top.NONE); 148 topmarkButton.setSelected(dlg.mark.getTopmark() != Top.NONE); 149 topmarkButton.setVisible(dlg.mark.testValid()); 147 topmarkButton.setBorderPainted(dlg.panelMain.mark.getTopmark() != Top.NONE); 148 topmarkButton.setSelected(dlg.panelMain.mark.getTopmark() != Top.NONE); 149 topmarkButton.setVisible(dlg.panelMain.mark.testValid()); 150 150 } 151 151 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelStbd.java
r27189 r27200 31 31 JRadioButton button = shapes.get(shp); 32 32 if (button.isSelected()) { 33 dlg.mark.setShape(shp); 34 dlg.mark.setObject(objects.get(shp)); 33 dlg.panelMain.mark.setShape(shp); 34 dlg.panelMain.mark.setObject(objects.get(shp)); 35 35 button.setBorderPainted(true); 36 36 } else 37 37 button.setBorderPainted(false); 38 38 } 39 if (dlg.mark.testValid()) { 39 if (dlg.panelMain.mark.testValid()) { 40 40 dlg.panelMain.panelChan.topmarkButton.setVisible(true); 41 41 dlg.panelMain.panelChan.lightButton.setVisible(true); 42 if (dlg.mark.getCategory() == Cat.LAM_STBD) { 43 switch (dlg.mark.getRegion()) { 42 if (dlg.panelMain.mark.getCategory() == Cat.LAM_STBD) { 43 switch (dlg.panelMain.mark.getRegion()) { 44 44 case A: 45 dlg.mark.setObjPattern(Pat.NONE); 46 dlg.mark.setObjColour(Col.GREEN); 45 dlg.panelMain.mark.setObjPattern(Pat.NONE); 46 dlg.panelMain.mark.setObjColour(Col.GREEN); 47 47 break; 48 48 case B: 49 dlg.mark.setObjPattern(Pat.NONE); 50 dlg.mark.setObjColour(Col.RED); 49 dlg.panelMain.mark.setObjPattern(Pat.NONE); 50 dlg.panelMain.mark.setObjColour(Col.RED); 51 51 break; 52 52 case C: 53 dlg.mark.setObjPattern(Pat.HORIZ); 54 dlg.mark.setObjColour(Col.GREEN); 55 dlg.mark.addObjColour(Col.WHITE); 56 dlg.mark.addObjColour(Col.GREEN); 57 dlg.mark.addObjColour(Col.WHITE); 53 dlg.panelMain.mark.setObjPattern(Pat.HORIZ); 54 dlg.panelMain.mark.setObjColour(Col.GREEN); 55 dlg.panelMain.mark.addObjColour(Col.WHITE); 56 dlg.panelMain.mark.addObjColour(Col.GREEN); 57 dlg.panelMain.mark.addObjColour(Col.WHITE); 58 58 break; 59 59 } 60 60 } else { 61 dlg.mark.setObjPattern(Pat.HORIZ); 62 switch (dlg.mark.getRegion()) { 61 dlg.panelMain.mark.setObjPattern(Pat.HORIZ); 62 switch (dlg.panelMain.mark.getRegion()) { 63 63 case A: 64 dlg.mark.setObjColour(Col.GREEN); 65 dlg.mark.addObjColour(Col.RED); 66 dlg.mark.addObjColour(Col.GREEN); 64 dlg.panelMain.mark.setObjColour(Col.GREEN); 65 dlg.panelMain.mark.addObjColour(Col.RED); 66 dlg.panelMain.mark.addObjColour(Col.GREEN); 67 67 break; 68 68 case B: 69 dlg.mark.setObjColour(Col.RED); 70 dlg.mark.addObjColour(Col.GREEN); 71 dlg.mark.addObjColour(Col.RED); 69 dlg.panelMain.mark.setObjColour(Col.RED); 70 dlg.panelMain.mark.addObjColour(Col.GREEN); 71 dlg.panelMain.mark.addObjColour(Col.RED); 72 72 break; 73 73 case C: 74 dlg.mark.setObjColour(Col.RED); 75 dlg.mark.addObjColour(Col.GREEN); 76 dlg.mark.addObjColour(Col.RED); 77 dlg.mark.addObjColour(Col.GREEN); 74 dlg.panelMain.mark.setObjColour(Col.RED); 75 dlg.panelMain.mark.addObjColour(Col.GREEN); 76 dlg.panelMain.mark.addObjColour(Col.RED); 77 dlg.panelMain.mark.addObjColour(Col.GREEN); 78 78 break; 79 79 } … … 104 104 for (Shp shp : shapes.keySet()) { 105 105 JRadioButton button = shapes.get(shp); 106 if (dlg.mark.getShape() == shp) { 106 if (dlg.panelMain.mark.getShape() == shp) { 107 107 button.setBorderPainted(true); 108 108 } else -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelTop.java
r27189 r27200 39 39 JRadioButton button = tops.get(top); 40 40 if (button.isSelected()) { 41 dlg.mark.setTopmark(top); 41 dlg.panelMain.mark.setTopmark(top); 42 42 button.setBorderPainted(true); 43 43 } else … … 83 83 for (Top top : tops.keySet()) { 84 84 JRadioButton button = tops.get(top); 85 if (dlg.mark.getTopmark() == top) { 85 if (dlg.panelMain.mark.getTopmark() == top) { 86 86 button.setBorderPainted(true); 87 87 } else -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r27199 r27200 1112 1112 dlg.panelMain.panelMore.syncPanel(); 1113 1113 dlg.panelMain.panelMore.setVisible(false); 1114 repaint(); 1114 1115 } 1115 1116 … … 1618 1619 super.paintComponent(g); 1619 1620 1621 if (dlg.node == null) return; 1622 1620 1623 Graphics2D g2 = (Graphics2D) g; 1621 1622 if (dlg.mark == null) {1623 return;1624 }1625 1624 1626 1625 String colStr; … … 1958 1957 } 1959 1958 } 1960 String c = (String) dlg.mark.getLightAtt(Att.CHR, 0);1959 String c = (String) getLightAtt(Att.CHR, 0); 1961 1960 String tmp = ""; 1962 1961 if (c.contains("+")) { … … 1994 1993 if (!tmp.isEmpty()) 1995 1994 c = tmp + c; 1996 if ( dlg.mark.getLightAtt(Att.LIT, 0) != Lit.UNKNOWN) {1997 switch ((Lit) dlg.mark.getLightAtt(Att.LIT, 0)) {1995 if (getLightAtt(Att.LIT, 0) != Lit.UNKNOWN) { 1996 switch ((Lit)getLightAtt(Att.LIT, 0)) { 1998 1997 case VERT: 1999 1998 c += "(Vert)";
Note:
See TracChangeset
for help on using the changeset viewer.