Changeset 26988 in osm for applications/editors/josm/plugins
- Timestamp:
- 2011-10-29T15:36:25+02:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelChan.java
r26978 r26988 68 68 } 69 69 } 70 sync Buttons();70 syncPanel(); 71 71 } 72 72 }; … … 77 77 if (topmarkButton.isSelected()) { 78 78 if (SeaMark.GrpMAP.get(dlg.mark.getObject()) == Grp.SAW) { 79 dlg. panelMain.panelTop.sphereTopButton.doClick();80 dlg. panelMain.panelTop.panelPat.noneButton.doClick();81 dlg. panelMain.panelTop.panelPat.panelCol.redButton.doClick();79 dlg.mark.setTopmark(Top.SPHERE); 80 dlg.mark.setPattern(Ent.TOPMARK, Pat.NONE); 81 dlg.mark.setColour(Ent.TOPMARK, Col.RED); 82 82 } else { 83 83 switch (dlg.mark.getCategory()) { 84 84 case LAM_PORT: 85 85 case LAM_PPORT: 86 dlg. panelMain.panelTop.canTopButton.doClick();86 dlg.mark.setTopmark(Top.CAN); 87 87 switch (dlg.mark.getRegion()) { 88 88 case A: 89 dlg. panelMain.panelTop.panelPat.noneButton.doClick();90 dlg. panelMain.panelTop.panelPat.panelCol.redButton.doClick();89 dlg.mark.setPattern(Ent.TOPMARK, Pat.NONE); 90 dlg.mark.setColour(Ent.TOPMARK, Col.RED); 91 91 break; 92 92 case B: 93 dlg. panelMain.panelTop.panelPat.noneButton.doClick();94 dlg. panelMain.panelTop.panelPat.panelCol.greenButton.doClick();93 dlg.mark.setPattern(Ent.TOPMARK, Pat.NONE); 94 dlg.mark.setColour(Ent.TOPMARK, Col.GREEN); 95 95 break; 96 96 case C: 97 dlg.panelMain.panelTop.panelPat.horizButton.doClick(); 98 dlg.panelMain.panelTop.panelPat.panelCol.redButton.doClick(); 99 dlg.panelMain.panelTop.panelPat.panelCol.addButton.doClick(); 100 dlg.panelMain.panelTop.panelPat.panelCol.whiteButton.doClick(); 97 dlg.mark.setPattern(Ent.TOPMARK, Pat.HORIZ); 98 dlg.mark.setColour(Ent.TOPMARK, Col.RED); 99 dlg.mark.addColour(Ent.TOPMARK, Col.WHITE); 101 100 break; 102 101 } … … 107 106 switch (dlg.mark.getRegion()) { 108 107 case A: 109 dlg. panelMain.panelTop.panelPat.noneButton.doClick();110 dlg. panelMain.panelTop.panelPat.panelCol.greenButton.doClick();108 dlg.mark.setPattern(Ent.TOPMARK, Pat.NONE); 109 dlg.mark.setColour(Ent.TOPMARK, Col.GREEN); 111 110 break; 112 111 case B: 113 dlg. panelMain.panelTop.panelPat.noneButton.doClick();114 dlg. panelMain.panelTop.panelPat.panelCol.redButton.doClick();112 dlg.mark.setPattern(Ent.TOPMARK, Pat.NONE); 113 dlg.mark.setColour(Ent.TOPMARK, Col.RED); 115 114 break; 116 115 case C: 117 dlg.panelMain.panelTop.panelPat.horizButton.doClick(); 118 dlg.panelMain.panelTop.panelPat.panelCol.greenButton.doClick(); 119 dlg.panelMain.panelTop.panelPat.panelCol.addButton.doClick(); 120 dlg.panelMain.panelTop.panelPat.panelCol.whiteButton.doClick(); 116 dlg.mark.setPattern(Ent.TOPMARK, Pat.HORIZ); 117 dlg.mark.setColour(Ent.TOPMARK, Col.GREEN); 118 dlg.mark.addColour(Ent.TOPMARK, Col.WHITE); 121 119 break; 122 120 } … … 126 124 topmarkButton.setBorderPainted(true); 127 125 } else { 126 dlg.mark.setTopmark(Top.NONE); 127 dlg.mark.setPattern(Ent.TOPMARK, Pat.NONE); 128 dlg.mark.setColour(Ent.TOPMARK, Col.UNKNOWN); 128 129 topmarkButton.setBorderPainted(false); 129 130 } 131 dlg.panelMain.panelTop.syncPanel(); 130 132 dlg.mark.paintSign(); 131 133 } … … 161 163 } 162 164 163 public void sync Buttons() {165 public void syncPanel() { 164 166 if (portButton.isSelected()) { 165 167 portButton.setBorderPainted(true); … … 210 212 dlg.panelMain.moreButton.setVisible(false); 211 213 } 212 panelPort.syncButtons(); 213 panelStbd.syncButtons(); 214 panelSaw.syncButtons(); 214 topmarkButton.setBorderPainted(topmarkButton.isSelected()); 215 topmarkButton.setVisible(dlg.mark.isValid()); 216 panelPort.syncPanel(); 217 panelStbd.syncPanel(); 218 panelSaw.syncPanel(); 215 219 216 220 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelHaz.java
r26978 r26988 137 137 if (dlg.mark != null) { 138 138 if (topmarkButton.isSelected()) { 139 dlg. panelMain.panelTop.panelPat.noneButton.doClick();140 dlg. panelMain.panelTop.panelPat.panelCol.blackButton.doClick();139 dlg.mark.setPattern(Ent.TOPMARK, Pat.NONE); 140 dlg.mark.setColour(Ent.TOPMARK, Col.BLACK); 141 141 switch (dlg.mark.getCategory()) { 142 142 case CAM_NORTH: 143 dlg. panelMain.panelTop.northTopButton.doClick();143 dlg.mark.setTopmark(Top.NORTH); 144 144 break; 145 145 case CAM_SOUTH: 146 dlg. panelMain.panelTop.southTopButton.doClick();146 dlg.mark.setTopmark(Top.SOUTH); 147 147 break; 148 148 case CAM_EAST: 149 dlg. panelMain.panelTop.eastTopButton.doClick();149 dlg.mark.setTopmark(Top.EAST); 150 150 break; 151 151 case CAM_WEST: 152 dlg. panelMain.panelTop.westTopButton.doClick();152 dlg.mark.setTopmark(Top.WEST); 153 153 break; 154 154 default: 155 dlg. panelMain.panelTop.spheres2TopButton.doClick();155 dlg.mark.setTopmark(Top.SPHERES2); 156 156 break; 157 157 } 158 158 topmarkButton.setBorderPainted(true); 159 159 } else { 160 dlg.mark.setTopmark(Top.NONE); 161 dlg.mark.setPattern(Ent.TOPMARK, Pat.NONE); 162 dlg.mark.setColour(Ent.TOPMARK, Col.UNKNOWN); 160 163 topmarkButton.setBorderPainted(false); 161 164 } 165 dlg.panelMain.panelTop.syncPanel(); 166 dlg.mark.paintSign(); 162 167 } 163 168 } … … 188 193 } 189 194 190 public void sync Buttons() {195 public void syncPanel() { 191 196 northButton.setBorderPainted(dlg.mark.getCategory() == Cat.CAM_NORTH); 192 197 southButton.setBorderPainted(dlg.mark.getCategory() == Cat.CAM_SOUTH); … … 201 206 button.setBorderPainted(false); 202 207 } 203 if (dlg.mark.isValid()) { 204 topmarkButton.setVisible(true); 205 dlg.panelMain.moreButton.setVisible(true); 206 } else { 207 topmarkButton.setVisible(false); 208 dlg.panelMain.moreButton.setVisible(false); 209 } 208 topmarkButton.setBorderPainted(topmarkButton.isSelected()); 209 topmarkButton.setVisible(dlg.mark.isValid()); 210 210 } 211 211 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMain.java
r26977 r26988 19 19 public JLabel radarIcon = null; 20 20 public JLabel fogIcon = null; 21 public JLabel colLabel = null; 21 22 public JLabel nameLabel = null; 22 23 public JTextField nameBox = null; … … 94 95 fogIcon.setBounds(new Rectangle(235, 0, 150, 185)); 95 96 this.add(fogIcon, null); 97 colLabel = new JLabel("", SwingConstants.CENTER); 98 colLabel.setBounds(new Rectangle(235, 100, 150, 20)); 99 this.add(colLabel, null); 96 100 97 101 this.add(getButton(chanButton, 0, 0, 62, 40, "Chan"), null); … … 274 278 } 275 279 276 public void sync Buttons() {280 public void syncPanel() { 277 281 if (dlg.mark == null) { 278 282 topButton.setEnabled(false); … … 299 303 alType.actionPerformed(null); 300 304 alMisc.actionPerformed(null); 301 dlg.panelMain.panelChan.syncButtons(); 302 dlg.panelMain.panelHaz.syncButtons(); 303 dlg.panelMain.panelMore.syncButtons(); 305 dlg.panelMain.panelChan.syncPanel(); 306 dlg.panelMain.panelHaz.syncPanel(); 307 dlg.panelMain.panelSpec.syncPanel(); 308 dlg.panelMain.panelMore.setVisible(false); 309 dlg.panelMain.panelMore.syncPanel(); 310 dlg.panelMain.panelTop.syncPanel(); 311 moreButton.setVisible(dlg.mark.isValid()); 304 312 } 305 313 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMore.java
r26977 r26988 301 301 } 302 302 303 public void syncButtons() { 304 panelPat.syncButtons(); 303 public void syncPanel() { 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.getHeight()); 310 sourceBox.setText(dlg.mark.getSource()); 311 infoBox.setText(dlg.mark.getInfo()); 312 statusBox.setSelectedIndex(0); 313 for (Sts sts : statuses.keySet()) { 314 int item = statuses.get(sts); 315 if (dlg.mark.getStatus() == sts) 316 statusBox.setSelectedIndex(item); 317 } 318 constrBox.setSelectedIndex(0); 319 for (Cns cns : constructions.keySet()) { 320 int item = constructions.get(cns); 321 if (dlg.mark.getConstr() == cns) 322 constrBox.setSelectedIndex(item); 323 } 324 visBox.setSelectedIndex(0); 325 for (Vis vis : visibilities.keySet()) { 326 int item = visibilities.get(vis); 327 if (dlg.mark.getVis() == vis) 328 visBox.setSelectedIndex(item); 329 } 330 reflBox.setSelectedIndex(0); 331 for (Vis vis : reflectivities.keySet()) { 332 int item = reflectivities.get(vis); 333 if (dlg.mark.getRvis() == vis) 334 reflBox.setSelectedIndex(item); 335 } 305 336 } 306 337 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelPat.java
r26977 r26988 72 72 } 73 73 74 public void sync Buttons() {74 public void syncPanel() { 75 75 for (Pat pat : patterns.keySet()) { 76 76 JRadioButton button = patterns.get(pat); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelPort.java
r26978 r26988 114 114 } 115 115 116 public void sync Buttons() {116 public void syncPanel() { 117 117 for (Shp shp : shapes.keySet()) { 118 118 JRadioButton button = shapes.get(shp); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSaw.java
r26978 r26988 67 67 } 68 68 69 public void sync Buttons() {69 public void syncPanel() { 70 70 for (Shp shp : shapes.keySet()) { 71 71 JRadioButton button = shapes.get(shp); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSpec.java
r26970 r26988 25 25 dlg.mark.setCategory(cat); 26 26 } 27 checkValidity();28 27 } 29 28 }; … … 51 50 dlg.mark.setShape(shp); 52 51 dlg.mark.setObject(objects.get(shp)); 53 if ((button == cairnButton) && !(dlg.panelMain.panelMore.panelPat.panelCol.delButton.isSelected())) 54 dlg.panelMain.panelMore.panelPat.panelCol.delButton.doClick(); 52 if ((button == cairnButton) && !(dlg.panelMain.panelMore.panelPat.panelCol.delButton.isSelected())) { 53 dlg.mark.setPattern(Ent.BODY, Pat.NONE); 54 dlg.mark.setColour(Ent.BODY, Col.UNKNOWN); 55 } 55 56 button.setBorderPainted(true); 56 57 } else 57 58 button.setBorderPainted(false); 58 59 } 59 checkValidity(); 60 } 60 if ((dlg.mark.getObject() != Obj.UNKNOWN) && (dlg.mark.getShape() != Shp.UNKNOWN)) { 61 dlg.panelMain.topButton.setEnabled(true); 62 dlg.panelMain.fogButton.setEnabled(true); 63 dlg.panelMain.radButton.setEnabled(true); 64 dlg.panelMain.litButton.setEnabled(true); 65 dlg.panelMain.moreButton.setVisible(true); 66 } else { 67 dlg.panelMain.topButton.setEnabled(false); 68 dlg.panelMain.fogButton.setEnabled(false); 69 dlg.panelMain.radButton.setEnabled(false); 70 dlg.panelMain.litButton.setEnabled(false); 71 dlg.panelMain.moreButton.setVisible(false); 72 } 73 dlg.panelMain.panelMore.syncPanel(); 74 dlg.mark.paintSign() 75 ; } 61 76 }; 62 77 … … 104 119 } 105 120 106 private void checkValidity() { 107 if (dlg.mark != null) { 108 if ((dlg.mark.getObject() != Obj.UNKNOWN) && (dlg.mark.getShape() != Shp.UNKNOWN)) { 109 dlg.panelMain.topButton.setEnabled(true); 110 dlg.panelMain.fogButton.setEnabled(true); 111 dlg.panelMain.radButton.setEnabled(true); 112 dlg.panelMain.litButton.setEnabled(true); 113 dlg.panelMain.moreButton.setVisible(true); 114 } else { 115 dlg.panelMain.topButton.setEnabled(false); 116 dlg.panelMain.fogButton.setEnabled(false); 117 dlg.panelMain.radButton.setEnabled(false); 118 dlg.panelMain.litButton.setEnabled(false); 119 dlg.panelMain.moreButton.setVisible(false); 120 } 121 public void syncPanel() { 122 for (Shp shp : shapes.keySet()) { 123 JRadioButton button = shapes.get(shp); 124 if (dlg.mark.getShape() == shp) { 125 button.setBorderPainted(true); 126 } else 127 button.setBorderPainted(false); 128 } 129 categoryBox.setSelectedIndex(0); 130 for (Cat cat : categories.keySet()) { 131 int item = categories.get(cat); 132 if (dlg.mark.getCategory() == cat) 133 categoryBox.setSelectedIndex(item); 121 134 } 122 135 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelStbd.java
r26978 r26988 114 114 } 115 115 116 public void sync Buttons() {116 public void syncPanel() { 117 117 for (Shp shp : shapes.keySet()) { 118 118 JRadioButton button = shapes.get(shp); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelTop.java
r26978 r26988 4 4 import java.awt.event.*; 5 5 import javax.swing.*; 6 6 7 import java.util.*; 7 8 … … 54 55 this.setLayout(null); 55 56 panelPat = new PanelPat(dlg, Ent.TOPMARK); 56 panelPat.setBounds(new Rectangle( 0, 0, 110, 160));57 panelPat.setBounds(new Rectangle(160, 0, 110, 160)); 57 58 this.add(panelPat, null); 58 this.add(getTopButton(noTopButton, 110, 5, 27, 27, "NoTop", Top.NONE), null);59 this.add(getTopButton(canTopButton, 140, 5, 27, 27, "CanTop", Top.CAN), null);60 this.add(getTopButton(coneTopButton, 170, 5, 27, 27, "ConeTop", Top.CONE), null);61 this.add(getTopButton(sphereTopButton, 200, 5, 27, 27, "SphereTop", Top.SPHERE), null);62 this.add(getTopButton(XTopButton, 230, 5, 27, 27, "XTop", Top.X_SHAPE), null);63 this.add(getTopButton(northTopButton, 110, 35, 27, 27, "NorthTop", Top.NORTH), null);64 this.add(getTopButton(southTopButton, 140, 35, 27, 27, "SouthTop", Top.SOUTH), null);65 this.add(getTopButton(eastTopButton, 170, 35, 27, 27, "EastTop", Top.EAST), null);66 this.add(getTopButton(westTopButton, 200, 35, 27, 27, "WestTop", Top.WEST), null);67 this.add(getTopButton(spheres2TopButton, 230, 35, 27, 27, "Spheres2Top", Top.SPHERES2), null);68 this.add(getTopButton(boardDayButton, 110, 65, 27, 27, "BoardDay", Top.BOARD), null);69 this.add(getTopButton(diamondDayButton, 140, 65, 27, 27, "DiamondDay", Top.DIAMOND), null);70 this.add(getTopButton(triangleDayButton, 170, 65, 27, 27, "TriangleDay", Top.TRIANGLE), null);71 this.add(getTopButton(triangleInvDayButton, 200, 65, 27, 27, "TriangleInvDay", Top.TRIANGLE_INV), null);72 this.add(getTopButton(squareDayButton, 230, 65, 27, 27, "SquareDay", Top.SQUARE), null);73 this.add(getTopButton(circleDayButton, 230, 95, 27, 27, "CircleDay", Top.CIRCLE), null);74 this.add(getMoorButton(mooringTopButton, 110, 95, 27, 27, "MooringTop"), null);59 this.add(getTopButton(noTopButton, 0, 5, 27, 27, "NoTop", Top.NONE), null); 60 this.add(getTopButton(canTopButton, 30, 5, 27, 27, "CanTop", Top.CAN), null); 61 this.add(getTopButton(coneTopButton, 60, 5, 27, 27, "ConeTop", Top.CONE), null); 62 this.add(getTopButton(sphereTopButton, 90, 5, 27, 27, "SphereTop", Top.SPHERE), null); 63 this.add(getTopButton(XTopButton, 120, 5, 27, 27, "XTop", Top.X_SHAPE), null); 64 this.add(getTopButton(northTopButton, 0, 35, 27, 27, "NorthTop", Top.NORTH), null); 65 this.add(getTopButton(southTopButton, 30, 35, 27, 27, "SouthTop", Top.SOUTH), null); 66 this.add(getTopButton(eastTopButton, 60, 35, 27, 27, "EastTop", Top.EAST), null); 67 this.add(getTopButton(westTopButton, 90, 35, 27, 27, "WestTop", Top.WEST), null); 68 this.add(getTopButton(spheres2TopButton, 120, 35, 27, 27, "Spheres2Top", Top.SPHERES2), null); 69 this.add(getTopButton(boardDayButton, 0, 65, 27, 27, "BoardDay", Top.BOARD), null); 70 this.add(getTopButton(diamondDayButton, 30, 65, 27, 27, "DiamondDay", Top.DIAMOND), null); 71 this.add(getTopButton(triangleDayButton, 60, 65, 27, 27, "TriangleDay", Top.TRIANGLE), null); 72 this.add(getTopButton(triangleInvDayButton, 90, 65, 27, 27, "TriangleInvDay", Top.TRIANGLE_INV), null); 73 this.add(getTopButton(squareDayButton, 120, 65, 27, 27, "SquareDay", Top.SQUARE), null); 74 this.add(getTopButton(circleDayButton, 120, 95, 27, 27, "CircleDay", Top.CIRCLE), null); 75 this.add(getMoorButton(mooringTopButton, 0, 95, 27, 27, "MooringTop"), null); 75 76 } 76 77 … … 80 81 } 81 82 mooringTopButton.setEnabled(state); 83 } 84 85 public void syncPanel() { 86 for (Top top : tops.keySet()) { 87 JRadioButton button = tops.get(top); 88 if (dlg.mark.getTopmark() == top) { 89 button.setBorderPainted(true); 90 } else 91 button.setBorderPainted(false); 92 } 93 panelPat.syncPanel(); 82 94 } 83 95 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r26978 r26988 562 562 563 563 public enum Fog { 564 UNKNOWN, HORN, SIREN, DIA, BELL, WHIS, GONG, EXPLOS 565 } 566 567 private Fog FogSound = Fog.UNKNOWN; 564 NONE, UNKNOWN, HORN, SIREN, DIA, BELL, WHIS, GONG, EXPLOS 565 } 566 567 public static final EnumMap<Fog, String> FogSTR = new EnumMap<Fog, String>(Fog.class); 568 static { 569 FogSTR.put(Fog.UNKNOWN, "yes"); 570 FogSTR.put(Fog.HORN, "horn"); 571 FogSTR.put(Fog.SIREN, "siren"); 572 FogSTR.put(Fog.DIA, "diaphone"); 573 FogSTR.put(Fog.BELL, "bell"); 574 FogSTR.put(Fog.WHIS, "whistle"); 575 FogSTR.put(Fog.GONG, "gong"); 576 FogSTR.put(Fog.EXPLOS, "explosion"); 577 } 578 579 private Fog FogSound = Fog.NONE; 568 580 569 581 public Fog getFogSound() { … … 581 593 } 582 594 583 public void setFogGroup(String group) { 584 FogGroup = group; 595 public void setFogGroup(String grp) { 596 FogGroup = grp; 597 } 598 599 private String FogSequence = ""; 600 601 public String getFogSequence() { 602 return FogSequence; 603 } 604 605 public void setFogSequence(String seq) { 606 FogSequence = seq; 607 } 608 609 private String FogRange = ""; 610 611 public String getFogRange() { 612 return FogRange; 613 } 614 615 public void setFogRange(String rng) { 616 FogRange = validDecimal(rng); 585 617 } 586 618 … … 591 623 } 592 624 593 public void setFogPeriod(String per iod) {594 FogPeriod = period;625 public void setFogPeriod(String per) { 626 FogPeriod = validDecimal(per); 595 627 } 596 628 … … 1152 1184 } 1153 1185 1154 dlg.panelMain.sync Buttons();1186 dlg.panelMain.syncPanel(); 1155 1187 1156 1188 paintlock = false; … … 1168 1200 dlg.panelMain.radarIcon.setIcon(null); 1169 1201 dlg.panelMain.fogIcon.setIcon(null); 1202 dlg.panelMain.colLabel.setText(""); 1170 1203 1171 1204 String colStr; 1205 String lblStr; 1172 1206 String imgStr = "/images/"; 1173 1207 if (getShape() != Shp.UNKNOWN) { … … 1217 1251 } 1218 1252 colStr = imgStr; 1253 lblStr = ""; 1219 1254 for (Col col : bodyColour) { 1220 1255 switch (col) { 1221 1256 case WHITE: 1222 1257 colStr += "_White"; 1258 lblStr += "W"; 1223 1259 break; 1224 1260 case RED: 1225 1261 colStr += "_Red"; 1262 lblStr += "R"; 1226 1263 break; 1227 1264 case ORANGE: 1228 1265 colStr += "_Orange"; 1266 lblStr += "Or"; 1229 1267 break; 1230 1268 case AMBER: 1231 1269 colStr += "_Amber"; 1270 lblStr += "Am"; 1232 1271 break; 1233 1272 case YELLOW: 1234 1273 colStr += "_Yellow"; 1274 lblStr += "Y"; 1235 1275 break; 1236 1276 case GREEN: 1237 1277 colStr += "_Green"; 1278 lblStr += "G"; 1238 1279 break; 1239 1280 case BLUE: 1240 1281 colStr += "_Blue"; 1282 lblStr += "Bu"; 1241 1283 break; 1242 1284 case VIOLET: 1243 1285 colStr += "_Violet"; 1286 lblStr += "Vi"; 1244 1287 break; 1245 1288 case BLACK: 1246 1289 colStr += "_Black"; 1290 lblStr += "B"; 1291 break; 1292 case GREY: 1293 colStr += "_Grey"; 1294 lblStr += "Gr"; 1295 break; 1296 case BROWN: 1297 colStr += "_Brown"; 1298 lblStr += "Br"; 1299 break; 1300 case MAGENTA: 1301 colStr += "_Magenta"; 1302 lblStr += "Mg"; 1303 break; 1304 case PINK: 1305 colStr += "_Pink"; 1306 lblStr += "Pk"; 1247 1307 break; 1248 1308 } … … 1262 1322 if (getClass().getResource(imgStr) == null) { 1263 1323 System.out.println("Missing image: " + imgStr); 1264 return;1265 1324 } else { 1266 1325 dlg.panelMain.shapeIcon.setIcon(new ImageIcon(getClass().getResource(imgStr))); 1326 dlg.panelMain.colLabel.setText(lblStr); 1267 1327 } 1268 1328 } else { … … 1300 1360 if (getClass().getResource(imgStr) == null) { 1301 1361 System.out.println("Missing image: " + imgStr); 1302 return;1303 1362 } else { 1304 1363 dlg.panelMain.shapeIcon.setIcon(new ImageIcon(getClass().getResource(imgStr)));
Note:
See TracChangeset
for help on using the changeset viewer.