Changeset 24658 in osm for applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSafeWater.java
- Timestamp:
- 2010-12-08T20:06:07+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSafeWater.java
r24602 r24658 30 30 private JRadioButton barrelButton = null; 31 31 private JRadioButton floatButton = null; 32 32 33 33 public PanelSafeWater() { 34 34 super(); … … 37 37 38 38 private void initialize() { 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 39 this.setLayout(null); 40 this.add(getPillarButton(), null); 41 this.add(getSparButton(), null); 42 this.add(getSphereButton(), null); 43 this.add(getBarrelButton(), null); 44 this.add(getFloatButton(), null); 45 46 shapeButtons = new ButtonGroup(); 47 shapeButtons.add(pillarButton); 48 shapeButtons.add(sparButton); 49 shapeButtons.add(sphereButton); 50 shapeButtons.add(barrelButton); 51 shapeButtons.add(floatButton); 52 ActionListener alShape = new ActionListener() { 53 public void actionPerformed(java.awt.event.ActionEvent e) { 54 pillarButton.setEnabled(!pillarButton.isSelected()); 55 sparButton.setEnabled(!sparButton.isSelected()); 56 sphereButton.setEnabled(!sphereButton.isSelected()); 57 barrelButton.setEnabled(!barrelButton.isSelected()); 58 floatButton.setEnabled(!floatButton.isSelected()); 59 } 60 }; 61 pillarButton.addActionListener(alShape); 62 sparButton.addActionListener(alShape); 63 sphereButton.addActionListener(alShape); 64 barrelButton.addActionListener(alShape); 65 floatButton.addActionListener(alShape); 66 66 } 67 67 68 68 private JRadioButton getPillarButton() { 69 69 if (pillarButton == null) { 70 pillarButton = new JRadioButton(new ImageIcon(getClass() .getResource(71 Messages.getString("PillarButton"))));72 pillarButton.setBounds(new Rectangle(0, 0, 90, 32));70 pillarButton = new JRadioButton(new ImageIcon(getClass() 71 .getResource("/images/PillarButton.png"))); 72 pillarButton.setBounds(new Rectangle(0, 0, 35, 32)); 73 73 } 74 74 return pillarButton; … … 78 78 if (sparButton == null) { 79 79 sparButton = new JRadioButton(new ImageIcon(getClass().getResource( 80 Messages.getString("SparButton"))));81 sparButton.setBounds(new Rectangle(0, 32, 90, 32));80 "/images/SparButton.png"))); 81 sparButton.setBounds(new Rectangle(0, 32, 35, 32)); 82 82 } 83 83 return sparButton; … … 86 86 private JRadioButton getSphereButton() { 87 87 if (sphereButton == null) { 88 sphereButton = new JRadioButton(new ImageIcon(getClass() .getResource(89 Messages.getString("SphereButton"))));90 sphereButton.setBounds(new Rectangle(0, 64, 90, 32));88 sphereButton = new JRadioButton(new ImageIcon(getClass() 89 .getResource("/images/SphereButton.png"))); 90 sphereButton.setBounds(new Rectangle(0, 64, 35, 32)); 91 91 } 92 92 return sphereButton; … … 95 95 private JRadioButton getBarrelButton() { 96 96 if (barrelButton == null) { 97 barrelButton = new JRadioButton(new ImageIcon(getClass() .getResource(98 Messages.getString("BarrelButton"))));99 barrelButton.setBounds(new Rectangle(0, 96, 90, 32));97 barrelButton = new JRadioButton(new ImageIcon(getClass() 98 .getResource("/images/BarrelButton.png"))); 99 barrelButton.setBounds(new Rectangle(0, 96, 35, 32)); 100 100 } 101 101 return barrelButton; … … 104 104 private JRadioButton getFloatButton() { 105 105 if (floatButton == null) { 106 floatButton = new JRadioButton(new ImageIcon(getClass() .getResource(107 Messages.getString("FloatButton"))));108 floatButton.setBounds(new Rectangle(0, 128, 90, 32));106 floatButton = new JRadioButton(new ImageIcon(getClass() 107 .getResource("/images/FloatButton.png"))); 108 floatButton.setBounds(new Rectangle(0, 128, 35, 32)); 109 109 } 110 110 return floatButton;
Note:
See TracChangeset
for help on using the changeset viewer.