Changeset 29992 in osm for applications/editors/josm/plugins/smed2/src/panels
- Timestamp:
- 2013-10-04T14:33:00+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/panels/PanelMain.java
r29881 r29992 54 54 }; 55 55 56 public ButtonGroup sectionButtons = null;57 public JRadioButton eButton = new JRadioButton();58 public JRadioButton fButton = new JRadioButton();59 public JRadioButton jButton = new JRadioButton();60 public JRadioButton kButton = new JRadioButton();61 public JRadioButton lButton = new JRadioButton();62 public JRadioButton mButton = new JRadioButton();63 public JRadioButton nButton = new JRadioButton();64 public JRadioButton pButton = new JRadioButton();65 public JRadioButton qButton = new JRadioButton();66 public JRadioButton rButton = new JRadioButton();67 public JRadioButton sButton = new JRadioButton();68 public JRadioButton tButton = new JRadioButton();69 public JRadioButton uButton = new JRadioButton();70 private ActionListener alSection = new ActionListener() {71 public void actionPerformed(java.awt.event.ActionEvent e) {72 if (eButton.isSelected()) {73 eButton.setBorderPainted(true);74 } else {75 eButton.setBorderPainted(false);76 }77 if (fButton.isSelected()) {78 fButton.setBorderPainted(true);79 } else {80 fButton.setBorderPainted(false);81 }82 if (jButton.isSelected()) {83 jButton.setBorderPainted(true);84 } else {85 jButton.setBorderPainted(false);86 }87 if (kButton.isSelected()) {88 kButton.setBorderPainted(true);89 } else {90 kButton.setBorderPainted(false);91 }92 }93 };94 95 56 public PanelMain() { 96 57 … … 117 78 saveButton.addActionListener(alSave); 118 79 119 add(getButton(eButton, 0, 0, 200, 20, "E Landmarks"), null);120 add(getButton(fButton, 0, 20, 200, 20, "F Ports"), null);121 add(getButton(jButton, 0, 40, 200, 20, "J Seabed"), null);122 add(getButton(kButton, 0, 60, 200, 20, "K Obstructions"), null);123 add(getButton(lButton, 0, 80, 200, 20, "L Obstructions"), null);124 add(getButton(mButton, 0, 100, 200, 20, "M Offshore Installations"), null);125 add(getButton(nButton, 0, 120, 200, 20, "N Areas & Limits"), null);126 add(getButton(pButton, 0, 140, 200, 20, "P Lights"), null);127 add(getButton(qButton, 0, 160, 200, 20, "Q Buoys & Beacons"), null);128 add(getButton(rButton, 0, 180, 200, 20, "R Fog Sigals"), null);129 add(getButton(sButton, 0, 200, 200, 20, "S Radio & Radar"), null);130 add(getButton(tButton, 0, 220, 200, 20, "T Services"), null);131 add(getButton(uButton, 0, 240, 200, 20, "U Small Craft Facilities"), null);132 sectionButtons = new ButtonGroup();133 sectionButtons.add(eButton);134 sectionButtons.add(fButton);135 sectionButtons.add(jButton);136 sectionButtons.add(kButton);137 sectionButtons.add(lButton);138 sectionButtons.add(mButton);139 sectionButtons.add(nButton);140 sectionButtons.add(pButton);141 sectionButtons.add(qButton);142 sectionButtons.add(rButton);143 sectionButtons.add(sButton);144 sectionButtons.add(tButton);145 sectionButtons.add(uButton);146 eButton.addActionListener(alSection);147 fButton.addActionListener(alSection);148 jButton.addActionListener(alSection);149 kButton.addActionListener(alSection);150 lButton.addActionListener(alSection);151 mButton.addActionListener(alSection);152 nButton.addActionListener(alSection);153 pButton.addActionListener(alSection);154 qButton.addActionListener(alSection);155 rButton.addActionListener(alSection);156 sButton.addActionListener(alSection);157 tButton.addActionListener(alSection);158 uButton.addActionListener(alSection);159 80 } 160 81
Note:
See TracChangeset
for help on using the changeset viewer.