Changeset 24870 in osm for applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelPrefStbd.java
- Timestamp:
- 2010-12-24T21:56:55+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelPrefStbd.java
r24839 r24870 28 28 private OSeaMAction dlg; 29 29 private ButtonGroup regionButtons = null; 30 public JRadioButton regionAButton = n ull;31 public JRadioButton regionBButton = n ull;30 public JRadioButton regionAButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/RegionAButton.png"))); 31 public JRadioButton regionBButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/RegionBButton.png"))); 32 32 private ButtonGroup shapeButtons = null; 33 public JRadioButton pillarButton = n ull;34 public JRadioButton sparButton = n ull;35 public JRadioButton coneButton = n ull;36 public JRadioButton floatButton = n ull;37 public JRadioButton beaconButton = n ull;38 public JRadioButton towerButton = n ull;33 public JRadioButton pillarButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PillarButton.png"))); 34 public JRadioButton sparButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SparButton.png"))); 35 public JRadioButton coneButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/ConeButton.png"))); 36 public JRadioButton floatButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/FloatButton.png"))); 37 public JRadioButton beaconButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/BeaconButton.png"))); 38 public JRadioButton towerButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/TowerButton.png"))); 39 39 private ActionListener alShape = null; 40 40 … … 42 42 dlg = dia; 43 43 this.setLayout(null); 44 this.add(get RegionAButton(), null);45 this.add(get RegionBButton(), null);46 this.add(get PillarButton(), null);47 this.add(get SparButton(), null);48 this.add(get ConeButton(), null);49 this.add(get FloatButton(), null);50 this.add(getB eaconButton(), null);51 this.add(get TowerButton(), null);44 this.add(getButton(regionAButton, 0, 2, 34, 30, "RegionATip"), null); 45 this.add(getButton(regionBButton, 0, 32, 34, 30, "RegionBTip"), null); 46 this.add(getButton(pillarButton, 0, 64, 34, 32, "PillarTip"), null); 47 this.add(getButton(sparButton, 0, 96, 34, 32, "SparTip"), null); 48 this.add(getButton(coneButton, 0, 128, 34, 32, "ConeTip"), null); 49 this.add(getButton(floatButton, 35, 0, 34, 32, "FloatTip"), null); 50 this.add(getButton(beaconButton, 35, 32, 34, 32, "BeaconTip"), null); 51 this.add(getButton(towerButton, 35, 64, 34, 32, "TowerTip"), null); 52 52 53 53 regionButtons = new ButtonGroup(); … … 126 126 } 127 127 128 private JRadioButton getRegionAButton() { 129 if (regionAButton == null) { 130 regionAButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/RegionAButton.png"))); 131 regionAButton.setBounds(new Rectangle(0, 2, 34, 30)); 132 regionAButton.setBorder(BorderFactory.createLineBorder(Color.magenta, 2)); 133 regionAButton.setToolTipText(Messages.getString("RegionATip")); 134 } 135 return regionAButton; 136 } 137 138 private JRadioButton getRegionBButton() { 139 if (regionBButton == null) { 140 regionBButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/RegionBButton.png"))); 141 regionBButton.setBounds(new Rectangle(0, 32, 34, 30)); 142 regionBButton.setBorder(BorderFactory.createLineBorder(Color.magenta, 2)); 143 regionBButton.setToolTipText(Messages.getString("RegionBTip")); 144 } 145 return regionBButton; 146 } 147 148 private JRadioButton getPillarButton() { 149 if (pillarButton == null) { 150 pillarButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PillarButton.png"))); 151 pillarButton.setBounds(new Rectangle(0, 64, 34, 32)); 152 pillarButton.setBorder(BorderFactory.createLineBorder(Color.magenta, 2)); 153 pillarButton.setToolTipText(Messages.getString("PillarTip")); 154 } 155 return pillarButton; 156 } 157 158 private JRadioButton getSparButton() { 159 if (sparButton == null) { 160 sparButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SparButton.png"))); 161 sparButton.setBounds(new Rectangle(0, 96, 34, 32)); 162 sparButton.setBorder(BorderFactory.createLineBorder(Color.magenta, 2)); 163 sparButton.setToolTipText(Messages.getString("SparTip")); 164 } 165 return sparButton; 166 } 167 168 private JRadioButton getConeButton() { 169 if (coneButton == null) { 170 coneButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/ConeButton.png"))); 171 coneButton.setBounds(new Rectangle(0, 128, 34, 32)); 172 coneButton.setBorder(BorderFactory.createLineBorder(Color.magenta, 2)); 173 coneButton.setToolTipText(Messages.getString("ConeTip")); 174 } 175 return coneButton; 176 } 177 178 private JRadioButton getFloatButton() { 179 if (floatButton == null) { 180 floatButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/FloatButton.png"))); 181 floatButton.setBounds(new Rectangle(35, 0, 34, 32)); 182 floatButton.setBorder(BorderFactory.createLineBorder(Color.magenta, 2)); 183 floatButton.setToolTipText(Messages.getString("FloatTip")); 184 } 185 return floatButton; 186 } 187 188 private JRadioButton getBeaconButton() { 189 if (beaconButton == null) { 190 beaconButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/BeaconButton.png"))); 191 beaconButton.setBounds(new Rectangle(35, 32, 34, 32)); 192 beaconButton.setBorder(BorderFactory.createLineBorder(Color.magenta, 2)); 193 beaconButton.setToolTipText(Messages.getString("BeaconTip")); 194 } 195 return beaconButton; 196 } 197 198 private JRadioButton getTowerButton() { 199 if (towerButton == null) { 200 towerButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/TowerButton.png"))); 201 towerButton.setBounds(new Rectangle(35, 64, 34, 32)); 202 towerButton.setBorder(BorderFactory.createLineBorder(Color.magenta, 2)); 203 towerButton.setToolTipText(Messages.getString("TowerTip")); 204 } 205 return towerButton; 128 private JRadioButton getButton(JRadioButton button, int x, int y, int w, int h, String tip) { 129 button.setBounds(new Rectangle(x, y, w, h)); 130 button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2)); 131 button.setToolTipText(Messages.getString(tip)); 132 return button; 206 133 } 207 134
Note:
See TracChangeset
for help on using the changeset viewer.