Changeset 30738 in osm for applications/editors/josm/plugins/smed/src/panels/PanelCol.java
- Timestamp:
- 2014-10-19T01:27:04+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/src/panels/PanelCol.java
r30737 r30738 41 41 if (button.isSelected()) { 42 42 if (ent == Ent.LIGHT) { 43 if (((String) dlg.panelMain.mark.getLightAtt(Att.CHR, 0)).contains("Al")) {44 if (((button == delButton) && ( dlg.panelMain.mark.getLightAtt(Att.ALT, 0) == Col.UNKCOL))45 || ( dlg.panelMain.mark.getLightAtt(Att.COL, 0) == Col.UNKCOL)) {46 dlg.panelMain.mark.setLightAtt(Att.COL, 0, col);47 dlg.panelMain.panelLit.panelChr.col1Label.setBackground(SeaMark.ColMAP.get(col));43 if (((String) SmedAction.panelMain.mark.getLightAtt(Att.CHR, 0)).contains("Al")) { 44 if (((button == delButton) && (SmedAction.panelMain.mark.getLightAtt(Att.ALT, 0) == Col.UNKCOL)) 45 || (SmedAction.panelMain.mark.getLightAtt(Att.COL, 0) == Col.UNKCOL)) { 46 SmedAction.panelMain.mark.setLightAtt(Att.COL, 0, col); 47 SmedAction.panelMain.panelLit.panelChr.col1Label.setBackground(SeaMark.ColMAP.get(col)); 48 48 } else { 49 dlg.panelMain.mark.setLightAtt(Att.ALT, 0, col);50 dlg.panelMain.panelLit.panelChr.col2Label.setBackground(SeaMark.ColMAP.get(col));49 SmedAction.panelMain.mark.setLightAtt(Att.ALT, 0, col); 50 SmedAction.panelMain.panelLit.panelChr.col2Label.setBackground(SeaMark.ColMAP.get(col)); 51 51 } 52 52 } else { 53 dlg.panelMain.mark.setLightAtt(Att.COL, 0, col);54 dlg.panelMain.panelLit.panelChr.col1Label.setBackground(SeaMark.ColMAP.get(col));55 dlg.panelMain.panelLit.panelChr.col2Label.setBackground(SeaMark.ColMAP.get(col));53 SmedAction.panelMain.mark.setLightAtt(Att.COL, 0, col); 54 SmedAction.panelMain.panelLit.panelChr.col1Label.setBackground(SeaMark.ColMAP.get(col)); 55 SmedAction.panelMain.panelLit.panelChr.col2Label.setBackground(SeaMark.ColMAP.get(col)); 56 56 } 57 57 button.setBorderPainted(true); 58 58 } else { 59 59 if (button == delButton) { 60 dlg.panelMain.mark.subColour(ent, stackIdx);60 SmedAction.panelMain.mark.subColour(ent, stackIdx); 61 61 } else if (button == addButton) { 62 62 if (stackCol.size() != 0) 63 63 stackIdx++; 64 64 if (stackCol.size() == 0) 65 dlg.panelMain.mark.setColour(ent, col);65 SmedAction.panelMain.mark.setColour(ent, col); 66 66 else 67 switch ( dlg.panelMain.mark.getPattern(ent)) {67 switch (SmedAction.panelMain.mark.getPattern(ent)) { 68 68 case NOPAT: 69 69 break; … … 71 71 case CROSS: 72 72 if (stackCol.size() < 2) 73 dlg.panelMain.mark.addColour(ent, stackIdx, col);73 SmedAction.panelMain.mark.addColour(ent, stackIdx, col); 74 74 break; 75 75 case SQUARED: 76 76 if (stackCol.size() < 4) 77 dlg.panelMain.mark.addColour(ent, stackIdx, col);77 SmedAction.panelMain.mark.addColour(ent, stackIdx, col); 78 78 break; 79 79 default: 80 dlg.panelMain.mark.addColour(ent, stackIdx, col);80 SmedAction.panelMain.mark.addColour(ent, stackIdx, col); 81 81 break; 82 82 } 83 83 } else { 84 dlg.panelMain.mark.setColour(ent, stackIdx, col);84 SmedAction.panelMain.mark.setColour(ent, stackIdx, col); 85 85 } 86 86 syncPanel(); … … 150 150 for (Col col : colours.keySet()) { 151 151 JRadioButton button = colours.get(col); 152 if ( dlg.panelMain.mark.getLightAtt(Att.COL, 0) == col) {152 if (SmedAction.panelMain.mark.getLightAtt(Att.COL, 0) == col) { 153 153 button.setBorderPainted(true); 154 154 } else … … 157 157 } else { 158 158 int idx; 159 for (idx = 0; dlg.panelMain.mark.getColour(ent, idx) != Col.UNKCOL; idx++) {159 for (idx = 0; SmedAction.panelMain.mark.getColour(ent, idx) != Col.UNKCOL; idx++) { 160 160 if (stackCol.size() <= idx) { 161 161 stackCol.add(idx, new JRadioButton(new ImageIcon(getClass().getResource("/images/ColourButton.png")))); … … 185 185 JRadioButton btnI = stackCol.get(idx); 186 186 btnI.setBounds(2, (2 + (idx * height)), 30, height); 187 btnI.setBackground(SeaMark.ColMAP.get( dlg.panelMain.mark.getColour(ent, idx)));187 btnI.setBackground(SeaMark.ColMAP.get(SmedAction.panelMain.mark.getColour(ent, idx))); 188 188 if (stackIdx == idx) { 189 189 btnI.setBorderPainted(true);
Note:
See TracChangeset
for help on using the changeset viewer.