Changeset 30738 in osm for applications/editors/josm/plugins/smed/src/panels/PanelLit.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/PanelLit.java
r30737 r30738 21 21 private FocusListener flGroup = new FocusAdapter() { 22 22 public void focusLost(java.awt.event.FocusEvent e) { 23 dlg.panelMain.mark.setLightAtt(Att.GRP, 0, groupBox.getText());23 SmedAction.panelMain.mark.setLightAtt(Att.GRP, 0, groupBox.getText()); 24 24 } 25 25 }; … … 28 28 private FocusListener flPeriod = new FocusAdapter() { 29 29 public void focusLost(java.awt.event.FocusEvent e) { 30 dlg.panelMain.mark.setLightAtt(Att.PER, 0, periodBox.getText());30 SmedAction.panelMain.mark.setLightAtt(Att.PER, 0, periodBox.getText()); 31 31 } 32 32 }; … … 35 35 private FocusListener flSequence = new FocusAdapter() { 36 36 public void focusLost(java.awt.event.FocusEvent e) { 37 dlg.panelMain.mark.setLightAtt(Att.SEQ, 0, sequenceBox.getText());37 SmedAction.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.panelMain.mark.setLightAtt(Att.VIS, 0, vis);48 SmedAction.panelMain.mark.setLightAtt(Att.VIS, 0, vis); 49 49 } 50 50 } … … 54 54 private FocusListener flHeight = new FocusAdapter() { 55 55 public void focusLost(java.awt.event.FocusEvent e) { 56 dlg.panelMain.mark.setLightAtt(Att.HGT, 0, heightBox.getText());56 SmedAction.panelMain.mark.setLightAtt(Att.HGT, 0, heightBox.getText()); 57 57 } 58 58 }; … … 61 61 private FocusListener flRange = new FocusAdapter() { 62 62 public void focusLost(java.awt.event.FocusEvent e) { 63 dlg.panelMain.mark.setLightAtt(Att.RNG, 0, rangeBox.getText());63 SmedAction.panelMain.mark.setLightAtt(Att.RNG, 0, rangeBox.getText()); 64 64 } 65 65 }; … … 68 68 private FocusListener flOrientation = new FocusAdapter() { 69 69 public void focusLost(java.awt.event.FocusEvent e) { 70 dlg.panelMain.mark.setLightAtt(Att.ORT, 0, orientationBox.getText());70 SmedAction.panelMain.mark.setLightAtt(Att.ORT, 0, orientationBox.getText()); 71 71 } 72 72 }; … … 75 75 private FocusListener flMultiple = new FocusAdapter() { 76 76 public void focusLost(java.awt.event.FocusEvent e) { 77 dlg.panelMain.mark.setLightAtt(Att.MLT, 0, multipleBox.getText());77 SmedAction.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.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, "");88 SmedAction.panelMain.mark.setLightAtt(Att.LIT, 0, lit); 89 } 90 if (SmedAction.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.DIR) { 91 SmedAction.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.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, "");97 } else if ((SmedAction.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.VERT) || (SmedAction.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.HORIZ)) { 98 SmedAction.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.panelMain.mark.setLightAtt(Att.MLT, 0, "");105 SmedAction.panelMain.mark.setLightAtt(Att.MLT, 0, ""); 106 106 multipleBox.setText(""); 107 dlg.panelMain.mark.setLightAtt(Att.ORT, 0, "");107 SmedAction.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.panelMain.mark.setLightAtt(Att.EXH, 0, exh);124 SmedAction.panelMain.mark.setLightAtt(Att.EXH, 0, exh); 125 125 } 126 126 } … … 137 137 } else { 138 138 panelSector.setVisible(false); 139 while ( dlg.panelMain.mark.getSectorCount() > 1)140 dlg.panelMain.mark.delLight(1);139 while (SmedAction.panelMain.mark.getSectorCount() > 1) 140 SmedAction.panelMain.mark.delLight(1); 141 141 } 142 142 } … … 285 285 multipleLabel.setVisible(false); 286 286 multipleBox.setVisible(false); 287 groupBox.setText((String) dlg.panelMain.mark.getLightAtt(Att.GRP, 0));288 periodBox.setText((String) dlg.panelMain.mark.getLightAtt(Att.PER, 0));289 sequenceBox.setText((String) dlg.panelMain.mark.getLightAtt(Att.SEQ, 0));290 heightBox.setText((String) dlg.panelMain.mark.getLightAtt(Att.HGT, 0));291 rangeBox.setText((String) dlg.panelMain.mark.getLightAtt(Att.RNG, 0));292 orientationBox.setText((String) dlg.panelMain.mark.getLightAtt(Att.ORT, 0));293 orientationBox.setVisible( dlg.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.DIR);294 multipleBox.setText((String) dlg.panelMain.mark.getLightAtt(Att.MLT, 0));295 multipleBox.setVisible(( dlg.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.VERT) || (dlg.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.HORIZ));287 groupBox.setText((String)SmedAction.panelMain.mark.getLightAtt(Att.GRP, 0)); 288 periodBox.setText((String)SmedAction.panelMain.mark.getLightAtt(Att.PER, 0)); 289 sequenceBox.setText((String)SmedAction.panelMain.mark.getLightAtt(Att.SEQ, 0)); 290 heightBox.setText((String)SmedAction.panelMain.mark.getLightAtt(Att.HGT, 0)); 291 rangeBox.setText((String)SmedAction.panelMain.mark.getLightAtt(Att.RNG, 0)); 292 orientationBox.setText((String)SmedAction.panelMain.mark.getLightAtt(Att.ORT, 0)); 293 orientationBox.setVisible(SmedAction.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.DIR); 294 multipleBox.setText((String)SmedAction.panelMain.mark.getLightAtt(Att.MLT, 0)); 295 multipleBox.setVisible((SmedAction.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.VERT) || (SmedAction.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.HORIZ)); 296 296 for (Vis vis : visibilities.keySet()) { 297 297 int item = visibilities.get(vis); 298 if ( dlg.panelMain.mark.getLightAtt(Att.VIS, 0) == vis)298 if (SmedAction.panelMain.mark.getLightAtt(Att.VIS, 0) == vis) 299 299 visibilityBox.setSelectedIndex(item); 300 300 } 301 301 for (Lit lit : categories.keySet()) { 302 302 int item = categories.get(lit); 303 if ( dlg.panelMain.mark.getLightAtt(Att.LIT, 0) == lit)303 if (SmedAction.panelMain.mark.getLightAtt(Att.LIT, 0) == lit) 304 304 categoryBox.setSelectedIndex(item); 305 305 } 306 306 for (Exh exh : exhibitions.keySet()) { 307 307 int item = exhibitions.get(exh); 308 if ( dlg.panelMain.mark.getLightAtt(Att.EXH, 0) == exh)308 if (SmedAction.panelMain.mark.getLightAtt(Att.EXH, 0) == exh) 309 309 exhibitionBox.setSelectedIndex(item); 310 310 } 311 if ( dlg.panelMain.mark.isSectored()) {311 if (SmedAction.panelMain.mark.isSectored()) { 312 312 singleButton.setBorderPainted(false); 313 313 sectorButton.setBorderPainted(true); … … 317 317 sectorButton.setBorderPainted(false); 318 318 panelSector.setVisible(false); 319 while ( dlg.panelMain.mark.getSectorCount() > 1)320 dlg.panelMain.mark.delLight(dlg.panelMain.mark.getSectorCount() - 1);319 while (SmedAction.panelMain.mark.getSectorCount() > 1) 320 SmedAction.panelMain.mark.delLight(SmedAction.panelMain.mark.getSectorCount() - 1); 321 321 } 322 322 panelCol.syncPanel();
Note:
See TracChangeset
for help on using the changeset viewer.
