Changeset 24613 in osm for applications/editors/josm/plugins/smed/plugs
- Timestamp:
- 2010-12-06T14:46:18+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src
- Files:
-
- 15 added
- 4 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/dialogs/OSeaMAction.java
r24600 r24613 56 56 private JLabel raconIcon = null; 57 57 private JLabel fogIcon = null; 58 private JLabel nameLabel = null; 59 private JTextField nameBox = null; 60 private JButton saveButton = null; 58 61 private ButtonGroup typeButtons = null; 59 62 private JRadioButton chanButton = null; … … 62 65 private JRadioButton lightButton = null; 63 66 private PanelChan panelChan = null; 67 private PanelHaz panelHaz = null; 68 private PanelSpec panelSpec = null; 64 69 65 70 public OSeaMAction() { … … 79 84 panelChan.setBounds(new Rectangle(105, 0, 295, 160)); 80 85 panelChan.setVisible(false); 86 panelHaz= new PanelHaz(); 87 panelHaz.setBounds(new Rectangle(105, 0, 295, 160)); 88 panelHaz.setVisible(false); 89 panelSpec= new PanelSpec(); 90 panelSpec.setBounds(new Rectangle(105, 0, 295, 160)); 91 panelSpec.setVisible(false); 81 92 } 82 93 … … 112 123 oseamPanel.add(getLightButton(), null); 113 124 oseamPanel.add(panelChan, null); 125 oseamPanel.add(panelHaz, null); 126 oseamPanel.add(panelSpec, null); 114 127 typeButtons = new ButtonGroup(); 115 128 typeButtons.add(chanButton); … … 126 139 panelChan.setVisible(false); 127 140 } 128 hazButton.setEnabled(!hazButton.isSelected()); 129 specButton.setEnabled(!specButton.isSelected()); 141 if (hazButton.isSelected()) { 142 hazButton.setEnabled(false); 143 panelHaz.setVisible(true); 144 } else { 145 hazButton.setEnabled(true); 146 panelHaz.setVisible(false); 147 } 148 if (specButton.isSelected()) { 149 specButton.setEnabled(false); 150 panelSpec.setVisible(true); 151 } else { 152 specButton.setEnabled(true); 153 panelSpec.setVisible(false); 154 } 130 155 lightButton.setEnabled(!lightButton.isSelected()); 131 156 //System.out.println("pressed: " + chanButton.isSelected() + " " + hazButton.isSelected() + " " + specButton.isSelected() + " " + lightButton.isSelected()); … … 136 161 specButton.addActionListener(alType); 137 162 lightButton.addActionListener(alType); 163 164 nameLabel = new JLabel(); 165 nameLabel.setBounds(new Rectangle(5, 325, 60, 20)); 166 nameLabel.setText(tr("Name:")); 167 oseamPanel.add(nameLabel, null); 168 nameBox = new JTextField(); 169 nameBox.setBounds(new Rectangle(60, 320, 200, 30)); 170 oseamPanel.add(nameBox, null); 171 saveButton = new JButton(); 172 saveButton.setBounds(new Rectangle(285, 320, 100, 30)); 173 saveButton.setText(tr("Save")); 174 oseamPanel.add(saveButton, null); 138 175 } 139 176 return oseamPanel; -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages.properties
r24600 r24613 19 19 SafeWaterButton=/images/SafeWaterButton.png 20 20 SafeWaterTip=Safe Water marks 21 NorthButton=/images/CardNButton.png 22 PortTip=North cardinal marks 23 SouthButton=/images/CardSButton.png 24 SouthTip=South cardinal marks 25 EastButton=/images/CardEButton.png 26 EastTip=East cardinal marks 27 WestButton=/images/CardWButton.png 28 WestTip=West cardinal marks 29 IsolButton=/images/IsolButton.png 30 IsolTip=Isolated danger marks 21 31 PillarButton=/images/PillarButton.png 22 32 SparButton=/images/SparButton.png -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages_de.properties
r24600 r24613 19 19 SafeWaterButton=/images/SafeWaterButton_de.png 20 20 SafeWaterTip=Safe Water marks 21 NorthButton=/images/CardNButton_de.png 22 PortTip=North cardinal marks 23 SouthButton=/images/CardSButton_de.png 24 SouthTip=South cardinal marks 25 EastButton=/images/CardEButton_de.png 26 EastTip=East cardinal marks 27 WestButton=/images/CardWButton_de.png 28 WestTip=West cardinal marks 29 IsolButton=/images/IsolButton_de.png 30 IsolTip=Isolated danger marks 21 31 PillarButton=/images/PillarButton_de.png 22 32 SparButton=/images/SparButton_de.png -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages_en.properties
r24600 r24613 19 19 SafeWaterButton=/images/SafeWaterButton.png 20 20 SafeWaterTip=Safe Water marks 21 NorthButton=/images/CardNButton.png 22 PortTip=North cardinal marks 23 SouthButton=/images/CardSButton.png 24 SouthTip=South cardinal marks 25 EastButton=/images/CardEButton.png 26 EastTip=East cardinal marks 27 WestButton=/images/CardWButton.png 28 WestTip=West cardinal marks 29 IsolButton=/images/IsolButton.png 30 IsolTip=Isolated danger marks 21 31 PillarButton=/images/PillarButton.png 22 32 SparButton=/images/SparButton.png -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelHaz.java
r24608 r24613 22 22 import java.awt.event.ActionListener; 23 23 24 public class Panel Chanextends JPanel {24 public class PanelHaz extends JPanel { 25 25 26 26 private ButtonGroup catButtons = null; 27 private JRadioButton portButton = null; 28 private JRadioButton stbdButton = null; 29 private JRadioButton prefPortButton = null; 30 private JRadioButton prefStbdButton = null; 31 private JRadioButton safeWaterButton = null; 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; 37 38 public PanelChan() { 27 private JRadioButton northButton = null; 28 private JRadioButton southButton = null; 29 private JRadioButton eastButton = null; 30 private JRadioButton westButton = null; 31 private JRadioButton isolButton = null; 32 33 private ButtonGroup shapeButtons = null; 34 private JRadioButton pillarButton = null; 35 private JRadioButton sparButton = null; 36 private JRadioButton floatButton = null; 37 private JRadioButton beaconButton = null; 38 private JRadioButton towerButton = null; 39 40 public PanelHaz() { 39 41 super(); 40 panelPort = new PanelPort();41 panelPort.setBounds(new Rectangle(105, 0, 185, 160));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);55 42 initialize(); 56 43 } 57 44 58 45 private void initialize() { 59 this.setLayout(null); 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); 65 this.add(getPortButton(), null); 66 this.add(getStbdButton(), null); 67 this.add(getPrefPortButton(), null); 68 this.add(getPrefStbdButton(), null); 69 this.add(getSafeWaterButton(), null); 70 catButtons = new ButtonGroup(); 71 catButtons.add(portButton); 72 catButtons.add(stbdButton); 73 catButtons.add(prefPortButton); 74 catButtons.add(prefStbdButton); 75 catButtons.add(safeWaterButton); 76 ActionListener alCat = new ActionListener() { 77 public void actionPerformed(java.awt.event.ActionEvent e) { 78 if (portButton.isSelected()) { 79 portButton.setEnabled(false); 80 panelPort.setVisible(true); 81 } else { 82 portButton.setEnabled(true); 83 panelPort.setVisible(false); 84 } 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 } 113 } 114 }; 115 portButton.addActionListener(alCat); 116 stbdButton.addActionListener(alCat); 117 prefPortButton.addActionListener(alCat); 118 prefStbdButton.addActionListener(alCat); 119 safeWaterButton.addActionListener(alCat); 46 this.setLayout(null); 47 this.add(getNothButton(), null); 48 this.add(getSouthButton(), null); 49 this.add(getEastButton(), null); 50 this.add(getWestButton(), null); 51 this.add(getIsolButton(), null); 52 catButtons = new ButtonGroup(); 53 catButtons.add(northButton); 54 catButtons.add(southButton); 55 catButtons.add(eastButton); 56 catButtons.add(westButton); 57 catButtons.add(isolButton); 58 ActionListener alCat = new ActionListener() { 59 public void actionPerformed(java.awt.event.ActionEvent e) { 60 northButton.setEnabled(!northButton.isSelected()); 61 southButton.setEnabled(!southButton.isSelected()); 62 eastButton.setEnabled(!eastButton.isSelected()); 63 westButton.setEnabled(!westButton.isSelected()); 64 isolButton.setEnabled(!isolButton.isSelected()); 65 } 66 }; 67 northButton.addActionListener(alCat); 68 southButton.addActionListener(alCat); 69 eastButton.addActionListener(alCat); 70 westButton.addActionListener(alCat); 71 isolButton.addActionListener(alCat); 72 73 this.add(getPillarButton(), null); 74 this.add(getSparButton(), null); 75 this.add(getFloatButton(), null); 76 this.add(getBeaconButton(), null); 77 this.add(getTowerButton(), null); 78 shapeButtons = new ButtonGroup(); 79 shapeButtons.add(pillarButton); 80 shapeButtons.add(sparButton); 81 shapeButtons.add(floatButton); 82 shapeButtons.add(beaconButton); 83 shapeButtons.add(towerButton); 84 ActionListener alShape = new ActionListener() { 85 public void actionPerformed(java.awt.event.ActionEvent e) { 86 pillarButton.setEnabled(!pillarButton.isSelected()); 87 sparButton.setEnabled(!sparButton.isSelected()); 88 floatButton.setEnabled(!floatButton.isSelected()); 89 beaconButton.setEnabled(!beaconButton.isSelected()); 90 towerButton.setEnabled(!towerButton.isSelected()); 91 } 92 }; 93 pillarButton.addActionListener(alShape); 94 sparButton.addActionListener(alShape); 95 floatButton.addActionListener(alShape); 96 beaconButton.addActionListener(alShape); 97 towerButton.addActionListener(alShape); 120 98 } 121 99 122 private JRadioButton get PortButton() {123 if ( portButton == null) {124 portButton = new JRadioButton(new ImageIcon(getClass().getResource(125 Messages.getString("PortButton"))));126 portButton.setBounds(new Rectangle(0, 0, 105, 32));127 portButton.setToolTipText(Messages.getString("PortTip"));100 private JRadioButton getNothButton() { 101 if (northButton == null) { 102 northButton = new JRadioButton(new ImageIcon(getClass() 103 .getResource(Messages.getString("NorthButton")))); 104 northButton.setBounds(new Rectangle(0, 0, 105, 32)); 105 northButton.setToolTipText(Messages.getString("NorthTip")); 128 106 } 129 return portButton;107 return northButton; 130 108 } 131 109 132 private JRadioButton getS tbdButton() {133 if (s tbdButton == null) {134 s tbdButton = new JRadioButton(new ImageIcon(getClass().getResource(135 Messages.getString("StbdButton"))));136 s tbdButton.setBounds(new Rectangle(0, 32, 105, 32));137 s tbdButton.setToolTipText(Messages.getString("StbdTip"));110 private JRadioButton getSouthButton() { 111 if (southButton == null) { 112 southButton = new JRadioButton(new ImageIcon(getClass() 113 .getResource(Messages.getString("SouthButton")))); 114 southButton.setBounds(new Rectangle(0, 32, 105, 32)); 115 southButton.setToolTipText(Messages.getString("SouthTip")); 138 116 } 139 return s tbdButton;117 return southButton; 140 118 } 141 119 142 private JRadioButton get PrefPortButton() {143 if ( prefPortButton == null) {144 prefPortButton = new JRadioButton(new ImageIcon(getClass().getResource(145 Messages.getString(" PrefPortButton"))));146 prefPortButton.setBounds(new Rectangle(0, 64, 105, 32));147 prefPortButton.setToolTipText(Messages.getString("PrefPortTip"));120 private JRadioButton getEastButton() { 121 if (eastButton == null) { 122 eastButton = new JRadioButton(new ImageIcon(getClass().getResource( 123 Messages.getString("EastButton")))); 124 eastButton.setBounds(new Rectangle(0, 64, 105, 32)); 125 eastButton.setToolTipText(Messages.getString("EastTip")); 148 126 } 149 return prefPortButton;127 return eastButton; 150 128 } 151 129 152 private JRadioButton get PrefStbdButton() {153 if ( prefStbdButton == null) {154 prefStbdButton = new JRadioButton(new ImageIcon(getClass().getResource(155 Messages.getString(" PrefStbdButton"))));156 prefStbdButton.setBounds(new Rectangle(0, 96, 105, 32));157 prefStbdButton.setToolTipText(Messages.getString("PrefStbdTip"));130 private JRadioButton getWestButton() { 131 if (westButton == null) { 132 westButton = new JRadioButton(new ImageIcon(getClass().getResource( 133 Messages.getString("WestButton")))); 134 westButton.setBounds(new Rectangle(0, 96, 105, 32)); 135 westButton.setToolTipText(Messages.getString("WestTip")); 158 136 } 159 return prefStbdButton;137 return westButton; 160 138 } 161 139 162 private JRadioButton get SafeWaterButton() {163 if ( safeWaterButton == null) {164 safeWaterButton = new JRadioButton(new ImageIcon(getClass().getResource(165 Messages.getString(" SafeWaterButton"))));166 safeWaterButton.setBounds(new Rectangle(0, 128, 105, 32));167 safeWaterButton.setToolTipText(Messages.getString("SafeWaterTip"));140 private JRadioButton getIsolButton() { 141 if (isolButton == null) { 142 isolButton = new JRadioButton(new ImageIcon(getClass().getResource( 143 Messages.getString("IsolButton")))); 144 isolButton.setBounds(new Rectangle(0, 128, 105, 32)); 145 isolButton.setToolTipText(Messages.getString("IsolTip")); 168 146 } 169 return safeWaterButton; 147 return isolButton; 148 } 149 150 private JRadioButton getPillarButton() { 151 if (pillarButton == null) { 152 pillarButton = new JRadioButton(new ImageIcon(getClass() 153 .getResource(Messages.getString("PillarButton")))); 154 pillarButton.setBounds(new Rectangle(105, 0, 90, 32)); 155 } 156 return pillarButton; 157 } 158 159 private JRadioButton getSparButton() { 160 if (sparButton == null) { 161 sparButton = new JRadioButton(new ImageIcon(getClass().getResource( 162 Messages.getString("SparButton")))); 163 sparButton.setBounds(new Rectangle(105, 32, 90, 32)); 164 } 165 return sparButton; 166 } 167 168 private JRadioButton getFloatButton() { 169 if (floatButton == null) { 170 floatButton = new JRadioButton(new ImageIcon(getClass() 171 .getResource(Messages.getString("FloatButton")))); 172 floatButton.setBounds(new Rectangle(105, 64, 90, 32)); 173 } 174 return floatButton; 175 } 176 177 private JRadioButton getBeaconButton() { 178 if (beaconButton == null) { 179 beaconButton = new JRadioButton(new ImageIcon(getClass() 180 .getResource(Messages.getString("BeaconButton")))); 181 beaconButton.setBounds(new Rectangle(105, 96, 90, 32)); 182 } 183 return beaconButton; 184 } 185 186 private JRadioButton getTowerButton() { 187 if (towerButton == null) { 188 towerButton = new JRadioButton(new ImageIcon(getClass() 189 .getResource(Messages.getString("TowerButton")))); 190 towerButton.setBounds(new Rectangle(105, 128, 90, 32)); 191 } 192 return towerButton; 170 193 } 171 194 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSpec.java
r24608 r24613 22 22 import java.awt.event.ActionListener; 23 23 24 public class Panel Chanextends JPanel {24 public class PanelSpec extends JPanel { 25 25 26 private ButtonGroup catButtons = null;27 private JRadioButton p ortButton = null;28 private JRadioButton s tbdButton = null;29 private JRadioButton prefPortButton = null;30 private JRadioButton prefStbdButton = null;31 private JRadioButton s afeWaterButton = null;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;37 38 public Panel Chan() {26 private ButtonGroup shapeButtons = null; 27 private JRadioButton pillarButton = null; 28 private JRadioButton sparButton = null; 29 private JRadioButton canButton = null; 30 private JRadioButton coneButton = null; 31 private JRadioButton sphereButton = null; 32 private JRadioButton barrelButton = null; 33 private JRadioButton superButton = null; 34 private JRadioButton floatButton = null; 35 private JRadioButton beaconButton = null; 36 private JRadioButton towerButton = null; 37 38 public PanelSpec() { 39 39 super(); 40 panelPort = new PanelPort();41 panelPort.setBounds(new Rectangle(105, 0, 185, 160));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);55 40 initialize(); 56 41 } 57 42 58 43 private void initialize() { 59 this.setLayout(null); 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); 65 this.add(getPortButton(), null); 66 this.add(getStbdButton(), null); 67 this.add(getPrefPortButton(), null); 68 this.add(getPrefStbdButton(), null); 69 this.add(getSafeWaterButton(), null); 70 catButtons = new ButtonGroup(); 71 catButtons.add(portButton); 72 catButtons.add(stbdButton); 73 catButtons.add(prefPortButton); 74 catButtons.add(prefStbdButton); 75 catButtons.add(safeWaterButton); 76 ActionListener alCat = new ActionListener() { 77 public void actionPerformed(java.awt.event.ActionEvent e) { 78 if (portButton.isSelected()) { 79 portButton.setEnabled(false); 80 panelPort.setVisible(true); 81 } else { 82 portButton.setEnabled(true); 83 panelPort.setVisible(false); 84 } 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 } 113 } 114 }; 115 portButton.addActionListener(alCat); 116 stbdButton.addActionListener(alCat); 117 prefPortButton.addActionListener(alCat); 118 prefStbdButton.addActionListener(alCat); 119 safeWaterButton.addActionListener(alCat); 44 this.setLayout(null); 45 46 this.add(getPillarButton(), null); 47 this.add(getSparButton(), null); 48 this.add(getCanButton(), null); 49 this.add(getConeButton(), null); 50 this.add(getSphereButton(), null); 51 this.add(getBarrelButton(), null); 52 this.add(getSuperButton(), null); 53 this.add(getFloatButton(), null); 54 this.add(getBeaconButton(), null); 55 this.add(getTowerButton(), null); 56 shapeButtons = new ButtonGroup(); 57 shapeButtons.add(pillarButton); 58 shapeButtons.add(sparButton); 59 shapeButtons.add(canButton); 60 shapeButtons.add(coneButton); 61 shapeButtons.add(sphereButton); 62 shapeButtons.add(barrelButton); 63 shapeButtons.add(superButton); 64 shapeButtons.add(floatButton); 65 shapeButtons.add(beaconButton); 66 shapeButtons.add(towerButton); 67 ActionListener alShape = new ActionListener() { 68 public void actionPerformed(java.awt.event.ActionEvent e) { 69 pillarButton.setEnabled(!pillarButton.isSelected()); 70 sparButton.setEnabled(!sparButton.isSelected()); 71 canButton.setEnabled(!canButton.isSelected()); 72 coneButton.setEnabled(!coneButton.isSelected()); 73 sphereButton.setEnabled(!sphereButton.isSelected()); 74 barrelButton.setEnabled(!barrelButton.isSelected()); 75 superButton.setEnabled(!superButton.isSelected()); 76 floatButton.setEnabled(!floatButton.isSelected()); 77 beaconButton.setEnabled(!beaconButton.isSelected()); 78 towerButton.setEnabled(!towerButton.isSelected()); 79 } 80 }; 81 pillarButton.addActionListener(alShape); 82 sparButton.addActionListener(alShape); 83 canButton.addActionListener(alShape); 84 coneButton.addActionListener(alShape); 85 sphereButton.addActionListener(alShape); 86 barrelButton.addActionListener(alShape); 87 superButton.addActionListener(alShape); 88 floatButton.addActionListener(alShape); 89 beaconButton.addActionListener(alShape); 90 towerButton.addActionListener(alShape); 120 91 } 121 92 122 private JRadioButton getPortButton() { 123 if (portButton == null) { 124 portButton = new JRadioButton(new ImageIcon(getClass().getResource( 125 Messages.getString("PortButton")))); 126 portButton.setBounds(new Rectangle(0, 0, 105, 32)); 127 portButton.setToolTipText(Messages.getString("PortTip")); 93 private JRadioButton getPillarButton() { 94 if (pillarButton == null) { 95 pillarButton = new JRadioButton(new ImageIcon(getClass() 96 .getResource(Messages.getString("PillarButton")))); 97 pillarButton.setBounds(new Rectangle(105, 0, 90, 32)); 128 98 } 129 return p ortButton;99 return pillarButton; 130 100 } 131 101 132 private JRadioButton getStbdButton() { 133 if (stbdButton == null) { 134 stbdButton = new JRadioButton(new ImageIcon(getClass().getResource( 135 Messages.getString("StbdButton")))); 136 stbdButton.setBounds(new Rectangle(0, 32, 105, 32)); 137 stbdButton.setToolTipText(Messages.getString("StbdTip")); 102 private JRadioButton getSparButton() { 103 if (sparButton == null) { 104 sparButton = new JRadioButton(new ImageIcon(getClass().getResource( 105 Messages.getString("SparButton")))); 106 sparButton.setBounds(new Rectangle(105, 32, 90, 32)); 138 107 } 139 return s tbdButton;108 return sparButton; 140 109 } 141 110 142 private JRadioButton getPrefPortButton() { 143 if (prefPortButton == null) { 144 prefPortButton = new JRadioButton(new ImageIcon(getClass().getResource( 145 Messages.getString("PrefPortButton")))); 146 prefPortButton.setBounds(new Rectangle(0, 64, 105, 32)); 147 prefPortButton.setToolTipText(Messages.getString("PrefPortTip")); 111 private JRadioButton getCanButton() { 112 if (canButton == null) { 113 canButton = new JRadioButton(new ImageIcon(getClass().getResource( 114 Messages.getString("CanButton")))); 115 canButton.setBounds(new Rectangle(105, 64, 90, 32)); 148 116 } 149 return prefPortButton;117 return canButton; 150 118 } 151 119 152 private JRadioButton getPrefStbdButton() { 153 if (prefStbdButton == null) { 154 prefStbdButton = new JRadioButton(new ImageIcon(getClass().getResource( 155 Messages.getString("PrefStbdButton")))); 156 prefStbdButton.setBounds(new Rectangle(0, 96, 105, 32)); 157 prefStbdButton.setToolTipText(Messages.getString("PrefStbdTip")); 120 private JRadioButton getConeButton() { 121 if (coneButton == null) { 122 coneButton = new JRadioButton(new ImageIcon(getClass().getResource( 123 Messages.getString("ConeButton")))); 124 coneButton.setBounds(new Rectangle(105, 96, 90, 32)); 158 125 } 159 return prefStbdButton;126 return coneButton; 160 127 } 161 128 162 private JRadioButton getSafeWaterButton() { 163 if (safeWaterButton == null) { 164 safeWaterButton = new JRadioButton(new ImageIcon(getClass().getResource( 165 Messages.getString("SafeWaterButton")))); 166 safeWaterButton.setBounds(new Rectangle(0, 128, 105, 32)); 167 safeWaterButton.setToolTipText(Messages.getString("SafeWaterTip")); 129 private JRadioButton getSphereButton() { 130 if (sphereButton == null) { 131 sphereButton = new JRadioButton(new ImageIcon(getClass().getResource( 132 Messages.getString("SphereButton")))); 133 sphereButton.setBounds(new Rectangle(105, 128, 90, 32)); 168 134 } 169 return safeWaterButton; 135 return sphereButton; 136 } 137 138 private JRadioButton getBarrelButton() { 139 if (barrelButton == null) { 140 barrelButton = new JRadioButton(new ImageIcon(getClass().getResource( 141 Messages.getString("BarrelButton")))); 142 barrelButton.setBounds(new Rectangle(195, 0, 90, 32)); 143 } 144 return barrelButton; 145 } 146 147 private JRadioButton getSuperButton() { 148 if (superButton == null) { 149 superButton = new JRadioButton(new ImageIcon(getClass().getResource( 150 Messages.getString("SuperButton")))); 151 superButton.setBounds(new Rectangle(195, 32, 90, 32)); 152 } 153 return superButton; 154 } 155 156 private JRadioButton getFloatButton() { 157 if (floatButton == null) { 158 floatButton = new JRadioButton(new ImageIcon(getClass() 159 .getResource(Messages.getString("FloatButton")))); 160 floatButton.setBounds(new Rectangle(195, 64, 90, 32)); 161 } 162 return floatButton; 163 } 164 165 private JRadioButton getBeaconButton() { 166 if (beaconButton == null) { 167 beaconButton = new JRadioButton(new ImageIcon(getClass() 168 .getResource(Messages.getString("BeaconButton")))); 169 beaconButton.setBounds(new Rectangle(195, 96, 90, 32)); 170 } 171 return beaconButton; 172 } 173 174 private JRadioButton getTowerButton() { 175 if (towerButton == null) { 176 towerButton = new JRadioButton(new ImageIcon(getClass() 177 .getResource(Messages.getString("TowerButton")))); 178 towerButton.setBounds(new Rectangle(195, 128, 90, 32)); 179 } 180 return towerButton; 170 181 } 171 182
Note:
See TracChangeset
for help on using the changeset viewer.