Changeset 24602 in osm for applications/editors/josm/plugins/smed
- Timestamp:
- 2010-12-05T21:42:28+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels
- Files:
-
- 1 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelChan.java
r24600 r24602 31 31 private JRadioButton safeWaterButton = null; 32 32 private PanelPort panelPort = null; 33 private PanelStbd panelStbd = null; 34 private PanelPrefPort panelPrefPort = null; 35 private PanelPrefStbd panelPrefStbd = null; 36 private PanelSafeWater panelSafeWater = null; 33 37 34 38 public PanelChan() { 35 39 super(); 36 panelPort = new PanelPort();40 panelPort = new PanelPort(); 37 41 panelPort.setBounds(new Rectangle(105, 0, 185, 160)); 38 42 panelPort.setVisible(false); 43 panelStbd = new PanelStbd(); 44 panelStbd.setBounds(new Rectangle(105, 0, 185, 160)); 45 panelStbd.setVisible(false); 46 panelPrefPort = new PanelPrefPort(); 47 panelPrefPort.setBounds(new Rectangle(105, 0, 185, 160)); 48 panelPrefPort.setVisible(false); 49 panelPrefStbd = new PanelPrefStbd(); 50 panelPrefStbd.setBounds(new Rectangle(105, 0, 185, 160)); 51 panelPrefStbd.setVisible(false); 52 panelSafeWater = new PanelSafeWater(); 53 panelSafeWater.setBounds(new Rectangle(105, 0, 185, 160)); 54 panelSafeWater.setVisible(false); 39 55 initialize(); 40 56 } … … 43 59 this.setLayout(null); 44 60 this.add(panelPort, null); 61 this.add(panelStbd, null); 62 this.add(panelPrefPort, null); 63 this.add(panelPrefStbd, null); 64 this.add(panelSafeWater, null); 45 65 this.add(getPortButton(), null); 46 66 this.add(getStbdButton(), null); … … 63 83 panelPort.setVisible(false); 64 84 } 65 stbdButton.setEnabled(!stbdButton.isSelected()); 66 prefPortButton.setEnabled(!prefPortButton.isSelected()); 67 prefStbdButton.setEnabled(!prefStbdButton.isSelected()); 68 safeWaterButton.setEnabled(!safeWaterButton.isSelected()); 85 if (stbdButton.isSelected()) { 86 stbdButton.setEnabled(false); 87 panelStbd.setVisible(true); 88 } else { 89 stbdButton.setEnabled(true); 90 panelStbd.setVisible(false); 91 } 92 if (prefPortButton.isSelected()) { 93 prefPortButton.setEnabled(false); 94 panelPrefPort.setVisible(true); 95 } else { 96 prefPortButton.setEnabled(true); 97 panelPrefPort.setVisible(false); 98 } 99 if (prefStbdButton.isSelected()) { 100 prefStbdButton.setEnabled(false); 101 panelPrefStbd.setVisible(true); 102 } else { 103 prefStbdButton.setEnabled(true); 104 panelPrefStbd.setVisible(false); 105 } 106 if (safeWaterButton.isSelected()) { 107 safeWaterButton.setEnabled(false); 108 panelSafeWater.setVisible(true); 109 } else { 110 safeWaterButton.setEnabled(true); 111 panelSafeWater.setVisible(false); 112 } 69 113 } 70 114 }; -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelPrefPort.java
r24600 r24602 22 22 import java.awt.event.ActionListener; 23 23 24 public class PanelP ort extends JPanel {24 public class PanelPrefPort extends JPanel { 25 25 26 26 private ButtonGroup regionButtons = null; … … 34 34 private JRadioButton beaconButton = null; 35 35 private JRadioButton towerButton = null; 36 private JRadioButton perchButton = null;37 36 38 public PanelP ort() {37 public PanelPrefPort() { 39 38 super(); 40 39 initialize(); … … 51 50 this.add(getBeaconButton(), null); 52 51 this.add(getTowerButton(), null); 53 this.add(getPerchButton(), null);54 52 55 53 regionButtons = new ButtonGroup(); … … 80 78 shapeButtons.add(beaconButton); 81 79 shapeButtons.add(towerButton); 82 shapeButtons.add(perchButton);83 80 ActionListener alShape = new ActionListener() { 84 81 public void actionPerformed(java.awt.event.ActionEvent e) { … … 89 86 beaconButton.setEnabled(!beaconButton.isSelected()); 90 87 towerButton.setEnabled(!towerButton.isSelected()); 91 perchButton.setEnabled(!perchButton.isSelected());92 88 } 93 89 }; … … 98 94 beaconButton.addActionListener(alShape); 99 95 towerButton.addActionListener(alShape); 100 perchButton.addActionListener(alShape);101 96 } 102 97 … … 173 168 } 174 169 175 private JRadioButton getPerchButton() {176 if (perchButton == null) {177 perchButton = new JRadioButton(new ImageIcon(getClass().getResource(178 Messages.getString("PerchPButton"))));179 perchButton.setBounds(new Rectangle(90, 96, 90, 32));180 }181 return perchButton;182 }183 184 185 170 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelPrefStbd.java
r24600 r24602 22 22 import java.awt.event.ActionListener; 23 23 24 public class PanelP ortextends JPanel {24 public class PanelPrefStbd extends JPanel { 25 25 26 26 private ButtonGroup regionButtons = null; … … 30 30 private JRadioButton pillarButton = null; 31 31 private JRadioButton sparButton = null; 32 private JRadioButton c anButton = null;32 private JRadioButton coneButton = null; 33 33 private JRadioButton floatButton = null; 34 34 private JRadioButton beaconButton = null; 35 35 private JRadioButton towerButton = null; 36 private JRadioButton perchButton = null;37 36 38 public PanelP ort() {37 public PanelPrefStbd() { 39 38 super(); 40 39 initialize(); … … 47 46 this.add(getPillarButton(), null); 48 47 this.add(getSparButton(), null); 49 this.add(getC anButton(), null);48 this.add(getConeButton(), null); 50 49 this.add(getFloatButton(), null); 51 50 this.add(getBeaconButton(), null); 52 51 this.add(getTowerButton(), null); 53 this.add(getPerchButton(), null);54 52 55 53 regionButtons = new ButtonGroup(); … … 76 74 shapeButtons.add(pillarButton); 77 75 shapeButtons.add(sparButton); 78 shapeButtons.add(c anButton);76 shapeButtons.add(coneButton); 79 77 shapeButtons.add(floatButton); 80 78 shapeButtons.add(beaconButton); 81 79 shapeButtons.add(towerButton); 82 shapeButtons.add(perchButton);83 80 ActionListener alShape = new ActionListener() { 84 81 public void actionPerformed(java.awt.event.ActionEvent e) { 85 82 pillarButton.setEnabled(!pillarButton.isSelected()); 86 83 sparButton.setEnabled(!sparButton.isSelected()); 87 c anButton.setEnabled(!canButton.isSelected());84 coneButton.setEnabled(!coneButton.isSelected()); 88 85 floatButton.setEnabled(!floatButton.isSelected()); 89 86 beaconButton.setEnabled(!beaconButton.isSelected()); 90 87 towerButton.setEnabled(!towerButton.isSelected()); 91 perchButton.setEnabled(!perchButton.isSelected());92 88 } 93 89 }; 94 90 pillarButton.addActionListener(alShape); 95 91 sparButton.addActionListener(alShape); 96 c anButton.addActionListener(alShape);92 coneButton.addActionListener(alShape); 97 93 floatButton.addActionListener(alShape); 98 94 beaconButton.addActionListener(alShape); 99 95 towerButton.addActionListener(alShape); 100 perchButton.addActionListener(alShape);101 96 } 102 97 … … 137 132 } 138 133 139 private JRadioButton getC anButton() {140 if (c anButton == null) {141 c anButton = new JRadioButton(new ImageIcon(getClass().getResource(142 Messages.getString("C anButton"))));143 c anButton.setBounds(new Rectangle(0, 128, 90, 32));134 private JRadioButton getConeButton() { 135 if (coneButton == null) { 136 coneButton = new JRadioButton(new ImageIcon(getClass().getResource( 137 Messages.getString("ConeButton")))); 138 coneButton.setBounds(new Rectangle(0, 128, 90, 32)); 144 139 } 145 return c anButton;140 return coneButton; 146 141 } 147 142 … … 173 168 } 174 169 175 private JRadioButton getPerchButton() {176 if (perchButton == null) {177 perchButton = new JRadioButton(new ImageIcon(getClass().getResource(178 Messages.getString("PerchPButton"))));179 perchButton.setBounds(new Rectangle(90, 96, 90, 32));180 }181 return perchButton;182 }183 184 185 170 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSafeWater.java
r24600 r24602 22 22 import java.awt.event.ActionListener; 23 23 24 public class Panel Portextends JPanel {24 public class PanelSafeWater extends JPanel { 25 25 26 private ButtonGroup regionButtons = null;27 private JRadioButton regionAButton = null;28 private JRadioButton regionBButton = null;29 26 private ButtonGroup shapeButtons = null; 30 27 private JRadioButton pillarButton = null; 31 28 private JRadioButton sparButton = null; 32 private JRadioButton canButton = null; 29 private JRadioButton sphereButton = null; 30 private JRadioButton barrelButton = null; 33 31 private JRadioButton floatButton = null; 34 private JRadioButton beaconButton = null;35 private JRadioButton towerButton = null;36 private JRadioButton perchButton = null;37 32 38 public Panel Port() {33 public PanelSafeWater() { 39 34 super(); 40 35 initialize(); … … 43 38 private void initialize() { 44 39 this.setLayout(null); 45 this.add(getRegionAButton(), null);46 this.add(getRegionBButton(), null);47 40 this.add(getPillarButton(), null); 48 41 this.add(getSparButton(), null); 49 this.add(getCanButton(), null); 42 this.add(getSphereButton(), null); 43 this.add(getBarrelButton(), null); 50 44 this.add(getFloatButton(), null); 51 this.add(getBeaconButton(), null);52 this.add(getTowerButton(), null);53 this.add(getPerchButton(), null);54 55 regionButtons = new ButtonGroup();56 regionButtons.add(regionAButton);57 regionButtons.add(regionBButton);58 ActionListener alRegion = new ActionListener() {59 public void actionPerformed(java.awt.event.ActionEvent e) {60 if (regionAButton.isSelected()) {61 regionAButton.setEnabled(false);62 } else {63 regionAButton.setEnabled(true);64 }65 if (regionBButton.isSelected()) {66 regionBButton.setEnabled(false);67 } else {68 regionBButton.setEnabled(true);69 }70 }71 };72 regionAButton.addActionListener(alRegion);73 regionBButton.addActionListener(alRegion);74 45 75 46 shapeButtons = new ButtonGroup(); 76 47 shapeButtons.add(pillarButton); 77 48 shapeButtons.add(sparButton); 78 shapeButtons.add(canButton); 49 shapeButtons.add(sphereButton); 50 shapeButtons.add(barrelButton); 79 51 shapeButtons.add(floatButton); 80 shapeButtons.add(beaconButton);81 shapeButtons.add(towerButton);82 shapeButtons.add(perchButton);83 52 ActionListener alShape = new ActionListener() { 84 53 public void actionPerformed(java.awt.event.ActionEvent e) { 85 54 pillarButton.setEnabled(!pillarButton.isSelected()); 86 55 sparButton.setEnabled(!sparButton.isSelected()); 87 canButton.setEnabled(!canButton.isSelected()); 56 sphereButton.setEnabled(!sphereButton.isSelected()); 57 barrelButton.setEnabled(!barrelButton.isSelected()); 88 58 floatButton.setEnabled(!floatButton.isSelected()); 89 beaconButton.setEnabled(!beaconButton.isSelected());90 towerButton.setEnabled(!towerButton.isSelected());91 perchButton.setEnabled(!perchButton.isSelected());92 59 } 93 60 }; 94 61 pillarButton.addActionListener(alShape); 95 62 sparButton.addActionListener(alShape); 96 canButton.addActionListener(alShape); 63 sphereButton.addActionListener(alShape); 64 barrelButton.addActionListener(alShape); 97 65 floatButton.addActionListener(alShape); 98 beaconButton.addActionListener(alShape);99 towerButton.addActionListener(alShape);100 perchButton.addActionListener(alShape);101 }102 103 private JRadioButton getRegionAButton() {104 if (regionAButton == null) {105 regionAButton = new JRadioButton(new ImageIcon(getClass().getResource(106 "/images/RegionAButton.png")));107 regionAButton.setBounds(new Rectangle(10, 0, 65, 30));108 }109 return regionAButton;110 }111 112 private JRadioButton getRegionBButton() {113 if (regionBButton == null) {114 regionBButton = new JRadioButton(new ImageIcon(getClass().getResource(115 "/images/RegionBButton.png")));116 regionBButton.setBounds(new Rectangle(10, 30, 65, 30));117 }118 return regionBButton;119 66 } 120 67 … … 123 70 pillarButton = new JRadioButton(new ImageIcon(getClass().getResource( 124 71 Messages.getString("PillarButton")))); 125 pillarButton.setBounds(new Rectangle(0, 64, 90, 32));72 pillarButton.setBounds(new Rectangle(0, 0, 90, 32)); 126 73 } 127 74 return pillarButton; … … 132 79 sparButton = new JRadioButton(new ImageIcon(getClass().getResource( 133 80 Messages.getString("SparButton")))); 134 sparButton.setBounds(new Rectangle(0, 96, 90, 32));81 sparButton.setBounds(new Rectangle(0, 32, 90, 32)); 135 82 } 136 83 return sparButton; 137 84 } 138 85 139 private JRadioButton get CanButton() {140 if ( canButton == null) {141 canButton = new JRadioButton(new ImageIcon(getClass().getResource(142 Messages.getString(" CanButton"))));143 canButton.setBounds(new Rectangle(0, 128, 90, 32));86 private JRadioButton getSphereButton() { 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)); 144 91 } 145 return canButton; 92 return sphereButton; 93 } 94 95 private JRadioButton getBarrelButton() { 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)); 100 } 101 return barrelButton; 146 102 } 147 103 … … 150 106 floatButton = new JRadioButton(new ImageIcon(getClass().getResource( 151 107 Messages.getString("FloatButton")))); 152 floatButton.setBounds(new Rectangle( 90, 0, 90, 32));108 floatButton.setBounds(new Rectangle(0, 128, 90, 32)); 153 109 } 154 110 return floatButton; 155 111 } 156 112 157 private JRadioButton getBeaconButton() {158 if (beaconButton == null) {159 beaconButton = new JRadioButton(new ImageIcon(getClass().getResource(160 Messages.getString("BeaconButton"))));161 beaconButton.setBounds(new Rectangle(90, 32, 90, 32));162 }163 return beaconButton;164 }165 166 private JRadioButton getTowerButton() {167 if (towerButton == null) {168 towerButton = new JRadioButton(new ImageIcon(getClass().getResource(169 Messages.getString("TowerButton"))));170 towerButton.setBounds(new Rectangle(90, 64, 90, 32));171 }172 return towerButton;173 }174 175 private JRadioButton getPerchButton() {176 if (perchButton == null) {177 perchButton = new JRadioButton(new ImageIcon(getClass().getResource(178 Messages.getString("PerchPButton"))));179 perchButton.setBounds(new Rectangle(90, 96, 90, 32));180 }181 return perchButton;182 }183 184 185 113 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelStbd.java
r24600 r24602 22 22 import java.awt.event.ActionListener; 23 23 24 public class Panel Portextends JPanel {24 public class PanelStbd extends JPanel { 25 25 26 26 private ButtonGroup regionButtons = null; … … 30 30 private JRadioButton pillarButton = null; 31 31 private JRadioButton sparButton = null; 32 private JRadioButton c anButton = null;32 private JRadioButton coneButton = null; 33 33 private JRadioButton floatButton = null; 34 34 private JRadioButton beaconButton = null; … … 36 36 private JRadioButton perchButton = null; 37 37 38 public Panel Port() {38 public PanelStbd() { 39 39 super(); 40 40 initialize(); … … 47 47 this.add(getPillarButton(), null); 48 48 this.add(getSparButton(), null); 49 this.add(getC anButton(), null);49 this.add(getConeButton(), null); 50 50 this.add(getFloatButton(), null); 51 51 this.add(getBeaconButton(), null); … … 76 76 shapeButtons.add(pillarButton); 77 77 shapeButtons.add(sparButton); 78 shapeButtons.add(c anButton);78 shapeButtons.add(coneButton); 79 79 shapeButtons.add(floatButton); 80 80 shapeButtons.add(beaconButton); … … 85 85 pillarButton.setEnabled(!pillarButton.isSelected()); 86 86 sparButton.setEnabled(!sparButton.isSelected()); 87 c anButton.setEnabled(!canButton.isSelected());87 coneButton.setEnabled(!coneButton.isSelected()); 88 88 floatButton.setEnabled(!floatButton.isSelected()); 89 89 beaconButton.setEnabled(!beaconButton.isSelected()); … … 94 94 pillarButton.addActionListener(alShape); 95 95 sparButton.addActionListener(alShape); 96 c anButton.addActionListener(alShape);96 coneButton.addActionListener(alShape); 97 97 floatButton.addActionListener(alShape); 98 98 beaconButton.addActionListener(alShape); … … 137 137 } 138 138 139 private JRadioButton getC anButton() {140 if (c anButton == null) {141 c anButton = new JRadioButton(new ImageIcon(getClass().getResource(142 Messages.getString("C anButton"))));143 c anButton.setBounds(new Rectangle(0, 128, 90, 32));139 private JRadioButton getConeButton() { 140 if (coneButton == null) { 141 coneButton = new JRadioButton(new ImageIcon(getClass().getResource( 142 Messages.getString("ConeButton")))); 143 coneButton.setBounds(new Rectangle(0, 128, 90, 32)); 144 144 } 145 return c anButton;145 return coneButton; 146 146 } 147 147 … … 176 176 if (perchButton == null) { 177 177 perchButton = new JRadioButton(new ImageIcon(getClass().getResource( 178 Messages.getString("Perch PButton"))));178 Messages.getString("PerchSButton")))); 179 179 perchButton.setBounds(new Rectangle(90, 96, 90, 32)); 180 180 }
Note:
See TracChangeset
for help on using the changeset viewer.