Changeset 30738 in osm for applications/editors/josm/plugins/smed/src/panels/PanelLights.java
- Timestamp:
- 2014-10-19T01:27:04+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/src/panels/PanelLights.java
r30737 r30738 25 25 int idx = landCats.get(cat); 26 26 if (dlg.node != null && (idx == landCatBox.getSelectedIndex())) { 27 dlg.panelMain.mark.setCategory(cat);28 dlg.panelMain.mark.testValid();27 SmedAction.panelMain.mark.setCategory(cat); 28 SmedAction.panelMain.mark.testValid(); 29 29 } 30 30 } … … 38 38 int idx = trafficCats.get(cat); 39 39 if (dlg.node != null && (idx == trafficCatBox.getSelectedIndex())) { 40 dlg.panelMain.mark.setCategory(cat);41 dlg.panelMain.mark.testValid();40 SmedAction.panelMain.mark.setCategory(cat); 41 SmedAction.panelMain.mark.testValid(); 42 42 } 43 43 } … … 51 51 int idx = warningCats.get(cat); 52 52 if (dlg.node != null && (idx == warningCatBox.getSelectedIndex())) { 53 dlg.panelMain.mark.setCategory(cat);54 dlg.panelMain.mark.testValid();53 SmedAction.panelMain.mark.setCategory(cat); 54 SmedAction.panelMain.mark.testValid(); 55 55 } 56 56 } … … 64 64 int idx = platformCats.get(cat); 65 65 if (dlg.node != null && (idx == platformCatBox.getSelectedIndex())) { 66 dlg.panelMain.mark.setCategory(cat);67 dlg.panelMain.mark.testValid();66 SmedAction.panelMain.mark.setCategory(cat); 67 SmedAction.panelMain.mark.testValid(); 68 68 } 69 69 } … … 77 77 int idx = pilotCats.get(cat); 78 78 if (dlg.node != null && (idx == pilotCatBox.getSelectedIndex())) { 79 dlg.panelMain.mark.setCategory(cat);80 dlg.panelMain.mark.testValid();79 SmedAction.panelMain.mark.setCategory(cat); 80 SmedAction.panelMain.mark.testValid(); 81 81 } 82 82 } … … 90 90 int idx = rescueCats.get(cat); 91 91 if (dlg.node != null && (idx == rescueCatBox.getSelectedIndex())) { 92 dlg.panelMain.mark.setCategory(cat);93 dlg.panelMain.mark.testValid();92 SmedAction.panelMain.mark.setCategory(cat); 93 SmedAction.panelMain.mark.testValid(); 94 94 } 95 95 } … … 103 103 int idx = radioCats.get(cat); 104 104 if (dlg.node != null && (idx == radioCatBox.getSelectedIndex())) { 105 dlg.panelMain.mark.setCategory(cat);106 dlg.panelMain.mark.testValid();105 SmedAction.panelMain.mark.setCategory(cat); 106 SmedAction.panelMain.mark.testValid(); 107 107 } 108 108 } … … 116 116 int idx = radarCats.get(cat); 117 117 if (dlg.node != null && (idx == radarCatBox.getSelectedIndex())) { 118 dlg.panelMain.mark.setCategory(cat);119 dlg.panelMain.mark.testValid();118 SmedAction.panelMain.mark.setCategory(cat); 119 SmedAction.panelMain.mark.testValid(); 120 120 } 121 121 } … … 130 130 int idx = functions.get(fnc); 131 131 if (dlg.node != null && (idx == functionBox.getSelectedIndex())) { 132 dlg.panelMain.mark.setFunc(fnc);133 dlg.panelMain.mark.testValid();132 SmedAction.panelMain.mark.setFunc(fnc); 133 SmedAction.panelMain.mark.testValid(); 134 134 } 135 135 } … … 157 157 JRadioButton button = objects.get(obj); 158 158 if (button.isSelected()) { 159 dlg.panelMain.mark.setObject(obj);159 SmedAction.panelMain.mark.setObject(obj); 160 160 button.setBorderPainted(true); 161 161 } else 162 162 button.setBorderPainted(false); 163 163 } 164 if ( dlg.panelMain.mark.getObject() == Obj.LITVES)165 dlg.panelMain.mark.setShape(Shp.SUPER);166 else if ( dlg.panelMain.mark.getObject() == Obj.LITFLT)167 dlg.panelMain.mark.setShape(Shp.FLOAT);168 else dlg.panelMain.mark.setShape(Shp.UNKSHP);164 if (SmedAction.panelMain.mark.getObject() == Obj.LITVES) 165 SmedAction.panelMain.mark.setShape(Shp.SUPER); 166 else if (SmedAction.panelMain.mark.getObject() == Obj.LITFLT) 167 SmedAction.panelMain.mark.setShape(Shp.FLOAT); 168 else SmedAction.panelMain.mark.setShape(Shp.UNKSHP); 169 169 functionLabel.setVisible(false); 170 170 categoryLabel.setVisible(false); … … 181 181 chLabel.setVisible(false); 182 182 chBox.setVisible(false); 183 dlg.panelMain.mark.setCategory(Cat.NOCAT);183 SmedAction.panelMain.mark.setCategory(Cat.NOCAT); 184 184 if (landButton.isSelected()) { 185 185 functionLabel.setVisible(true); … … 227 227 alRadarCatBox.actionPerformed(null); 228 228 } 229 dlg.panelMain.mark.testValid();229 SmedAction.panelMain.mark.testValid(); 230 230 } 231 231 }; … … 234 234 private FocusListener flCh = new FocusAdapter() { 235 235 public void focusLost(java.awt.event.FocusEvent e) { 236 dlg.panelMain.mark.setChannel(chBox.getText());236 SmedAction.panelMain.mark.setChannel(chBox.getText()); 237 237 } 238 238 }; … … 462 462 chLabel.setVisible(false); 463 463 chBox.setVisible(false); 464 chBox.setText( dlg.panelMain.mark.getChannel());465 if (( dlg.panelMain.mark.getObject() == Obj.LNDMRK) && ((dlg.panelMain.mark.getCategory() != Cat.NOCAT) || (dlg.panelMain.mark.getFunc() != Fnc.UNKFNC))) {464 chBox.setText(SmedAction.panelMain.mark.getChannel()); 465 if ((SmedAction.panelMain.mark.getObject() == Obj.LNDMRK) && ((SmedAction.panelMain.mark.getCategory() != Cat.NOCAT) || (SmedAction.panelMain.mark.getFunc() != Fnc.UNKFNC))) { 466 466 functionLabel.setVisible(true); 467 467 categoryLabel.setVisible(true); … … 470 470 for (Fnc fnc : functions.keySet()) { 471 471 int item = functions.get(fnc); 472 if ( dlg.panelMain.mark.getFunc() == fnc)472 if (SmedAction.panelMain.mark.getFunc() == fnc) 473 473 functionBox.setSelectedIndex(item); 474 474 } 475 475 for (Cat cat : landCats.keySet()) { 476 476 int item = landCats.get(cat); 477 if ( dlg.panelMain.mark.getCategory() == cat)477 if (SmedAction.panelMain.mark.getCategory() == cat) 478 478 landCatBox.setSelectedIndex(item); 479 479 } 480 } else if ( dlg.panelMain.mark.getObject() == Obj.SISTAT) {480 } else if (SmedAction.panelMain.mark.getObject() == Obj.SISTAT) { 481 481 categoryLabel.setVisible(true); 482 482 trafficCatBox.setVisible(true); 483 483 for (Cat cat : trafficCats.keySet()) { 484 484 int item = trafficCats.get(cat); 485 if ( dlg.panelMain.mark.getCategory() == cat)485 if (SmedAction.panelMain.mark.getCategory() == cat) 486 486 trafficCatBox.setSelectedIndex(item); 487 487 } 488 488 chLabel.setVisible(true); 489 489 chBox.setVisible(true); 490 } else if ( dlg.panelMain.mark.getObject() == Obj.SISTAW) {490 } else if (SmedAction.panelMain.mark.getObject() == Obj.SISTAW) { 491 491 categoryLabel.setVisible(true); 492 492 warningCatBox.setVisible(true); 493 493 for (Cat cat : warningCats.keySet()) { 494 494 int item = warningCats.get(cat); 495 if ( dlg.panelMain.mark.getCategory() == cat)495 if (SmedAction.panelMain.mark.getCategory() == cat) 496 496 warningCatBox.setSelectedIndex(item); 497 497 } 498 498 chLabel.setVisible(true); 499 499 chBox.setVisible(true); 500 } else if ( dlg.panelMain.mark.getObject() == Obj.OFSPLF) {500 } else if (SmedAction.panelMain.mark.getObject() == Obj.OFSPLF) { 501 501 categoryLabel.setVisible(true); 502 502 platformCatBox.setVisible(true); 503 503 for (Cat cat : platformCats.keySet()) { 504 504 int item = platformCats.get(cat); 505 if ( dlg.panelMain.mark.getCategory() == cat)505 if (SmedAction.panelMain.mark.getCategory() == cat) 506 506 platformCatBox.setSelectedIndex(item); 507 507 } 508 } else if ( dlg.panelMain.mark.getObject() == Obj.PILBOP) {508 } else if (SmedAction.panelMain.mark.getObject() == Obj.PILBOP) { 509 509 categoryLabel.setVisible(true); 510 510 pilotCatBox.setVisible(true); 511 511 for (Cat cat : pilotCats.keySet()) { 512 512 int item = pilotCats.get(cat); 513 if ( dlg.panelMain.mark.getCategory() == cat)513 if (SmedAction.panelMain.mark.getCategory() == cat) 514 514 pilotCatBox.setSelectedIndex(item); 515 515 } 516 516 chLabel.setVisible(true); 517 517 chBox.setVisible(true); 518 } else if ( dlg.panelMain.mark.getObject() == Obj.RSCSTA) {518 } else if (SmedAction.panelMain.mark.getObject() == Obj.RSCSTA) { 519 519 categoryLabel.setVisible(true); 520 520 rescueCatBox.setVisible(true); 521 521 for (Cat cat : rescueCats.keySet()) { 522 522 int item = rescueCats.get(cat); 523 if ( dlg.panelMain.mark.getCategory() == cat)523 if (SmedAction.panelMain.mark.getCategory() == cat) 524 524 rescueCatBox.setSelectedIndex(item); 525 525 } 526 } else if ( dlg.panelMain.mark.getObject() == Obj.RDOSTA) {526 } else if (SmedAction.panelMain.mark.getObject() == Obj.RDOSTA) { 527 527 categoryLabel.setVisible(true); 528 528 radioCatBox.setVisible(true); 529 529 for (Cat cat : radioCats.keySet()) { 530 530 int item = radioCats.get(cat); 531 if ( dlg.panelMain.mark.getCategory() == cat)531 if (SmedAction.panelMain.mark.getCategory() == cat) 532 532 radioCatBox.setSelectedIndex(item); 533 533 } 534 534 chLabel.setVisible(true); 535 535 chBox.setVisible(true); 536 } else if ( dlg.panelMain.mark.getObject() == Obj.RADSTA) {536 } else if (SmedAction.panelMain.mark.getObject() == Obj.RADSTA) { 537 537 categoryLabel.setVisible(true); 538 538 radarCatBox.setVisible(true); 539 539 for (Cat cat : radarCats.keySet()) { 540 540 int item = radarCats.get(cat); 541 if ( dlg.panelMain.mark.getCategory() == cat)541 if (SmedAction.panelMain.mark.getCategory() == cat) 542 542 radarCatBox.setSelectedIndex(item); 543 543 } … … 547 547 for (Obj obj : objects.keySet()) { 548 548 JRadioButton button = objects.get(obj); 549 button.setBorderPainted( dlg.panelMain.mark.getObject() == obj);550 } 551 dlg.panelMain.mark.testValid();549 button.setBorderPainted(SmedAction.panelMain.mark.getObject() == obj); 550 } 551 SmedAction.panelMain.mark.testValid(); 552 552 } 553 553
Note:
See TracChangeset
for help on using the changeset viewer.
