Changeset 24600 in osm
- Timestamp:
- 2010-12-05T20:53:39+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src
- Files:
-
- 4 added
- 5 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/dialogs/OSeaMAction.java
r24594 r24600 50 50 private JPanel oseamPanel = null; 51 51 52 private JLabel shapeIcon = null; 53 private JLabel lightIcon = null; 54 private JLabel topIcon = null; 55 private JLabel reflIcon = null; 56 private JLabel raconIcon = null; 57 private JLabel fogIcon = null; 52 58 private ButtonGroup typeButtons = null; 53 59 private JRadioButton chanButton = null; … … 71 77 72 78 panelChan= new PanelChan(); 73 panelChan.setBounds(new Rectangle(1 10, 0, 290, 160));79 panelChan.setBounds(new Rectangle(105, 0, 295, 160)); 74 80 panelChan.setVisible(false); 75 81 } … … 80 86 oseamPanel.setLayout(null); 81 87 oseamPanel.setSize(new Dimension(400, 360)); 88 89 shapeIcon = new JLabel(); 90 shapeIcon.setBounds(new Rectangle(270, 160, 125, 155)); 91 shapeIcon.setBorder(BorderFactory.createLineBorder(Color.black, 1)); 92 oseamPanel.add(shapeIcon, null); 93 lightIcon = new JLabel(); 94 lightIcon.setBounds(new Rectangle(270, 160, 125, 155)); 95 oseamPanel.add(lightIcon, null); 96 topIcon = new JLabel(); 97 topIcon.setBounds(new Rectangle(270, 160, 125, 155)); 98 oseamPanel.add(topIcon, null); 99 reflIcon = new JLabel(); 100 reflIcon.setBounds(new Rectangle(270, 160, 125, 155)); 101 oseamPanel.add(reflIcon, null); 102 raconIcon = new JLabel(); 103 raconIcon.setBounds(new Rectangle(270, 160, 125, 155)); 104 oseamPanel.add(raconIcon, null); 105 fogIcon = new JLabel(); 106 fogIcon.setBounds(new Rectangle(270, 160, 125, 155)); 107 oseamPanel.add(fogIcon, null); 82 108 83 109 oseamPanel.add(getChanButton(), null); … … 118 144 chanButton = new JRadioButton(new ImageIcon(getClass().getResource( 119 145 Messages.getString("ChanButton")))); 120 chanButton.setBounds(new Rectangle( 5, 0, 105, 40));146 chanButton.setBounds(new Rectangle(0, 0, 105, 40)); 121 147 chanButton.setToolTipText(Messages.getString("ChanTip")); 122 148 } … … 128 154 hazButton = new JRadioButton(new ImageIcon(getClass().getResource( 129 155 Messages.getString("HazButton")))); 130 hazButton.setBounds(new Rectangle( 5, 40, 105, 40));156 hazButton.setBounds(new Rectangle(0, 40, 105, 40)); 131 157 hazButton.setToolTipText(Messages.getString("HazTip")); 132 158 } … … 138 164 specButton = new JRadioButton(new ImageIcon(getClass().getResource( 139 165 Messages.getString("SpecButton")))); 140 specButton.setBounds(new Rectangle( 5, 80, 105, 40));166 specButton.setBounds(new Rectangle(0, 80, 105, 40)); 141 167 specButton.setToolTipText(Messages.getString("SpecTip")); 142 168 } … … 148 174 lightButton = new JRadioButton(new ImageIcon(getClass().getResource( 149 175 Messages.getString("LightsButton")))); 150 lightButton.setBounds(new Rectangle( 5, 120, 105, 40));176 lightButton.setBounds(new Rectangle(0, 120, 105, 40)); 151 177 lightButton.setToolTipText(Messages.getString("LightsTip")); 152 178 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages.properties
r24594 r24600 19 19 SafeWaterButton=/images/SafeWaterButton.png 20 20 SafeWaterTip=Safe Water marks 21 PillarButton=/images/PillarButton.png 22 SparButton=/images/SparButton.png 23 CanButton=/images/CanButton.png 24 ConeButton=/images/ConeButton.png 25 SphereButton=/images/SphereButton.png 26 BarrelButton=/images/BarrelButton.png 27 FloatButton=/images/FloatButton.png 28 SuperButton=/images/SuperButton.png 29 BeaconButton=/images/BeaconButton.png 30 TowerButton=/images/TowerButton.png 31 PerchPButton=/images/PerchPButton.png 32 PerchSButton=/images/PerchSButton.png 33 StakeButton=/images/StakeButton.png -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages_de.properties
r24594 r24600 19 19 SafeWaterButton=/images/SafeWaterButton_de.png 20 20 SafeWaterTip=Safe Water marks 21 PillarButton=/images/PillarButton_de.png 22 SparButton=/images/SparButton_de.png 23 CanButton=/images/CanButton_de.png 24 ConeButton=/images/ConeButton_de.png 25 SphereButton=/images/SphereButton_de.png 26 BarrelButton=/images/BarrelButton_de.png 27 FloatButton=/images/FloatButton_de.png 28 SuperButton=/images/SuperButton_de.png 29 BeaconButton=/images/BeaconButton_de.png 30 TowerButton=/images/TowerButton_de.png 31 PerchPButton=/images/PerchPButton_de.png 32 PerchSButton=/images/PerchSButton_de.png 33 StakeButton=/images/StakeButton_de.png -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages_en.properties
r24594 r24600 19 19 SafeWaterButton=/images/SafeWaterButton.png 20 20 SafeWaterTip=Safe Water marks 21 PillarButton=/images/PillarButton.png 22 SparButton=/images/SparButton.png 23 CanButton=/images/CanButton.png 24 ConeButton=/images/ConeButton.png 25 SphereButton=/images/SphereButton.png 26 BarrelButton=/images/BarrelButton.png 27 FloatButton=/images/FloatButton.png 28 SuperButton=/images/SuperButton.png 29 BeaconButton=/images/BeaconButton.png 30 TowerButton=/images/TowerButton.png 31 PerchPButton=/images/PerchPButton.png 32 PerchSButton=/images/PerchSButton.png 33 StakeButton=/images/StakeButton.png -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelChan.java
r24597 r24600 30 30 private JRadioButton prefStbdButton = null; 31 31 private JRadioButton safeWaterButton = null; 32 private PanelPort panelPort = null; 33 32 34 public PanelChan() { 33 35 super(); 36 panelPort= new PanelPort(); 37 panelPort.setBounds(new Rectangle(105, 0, 185, 160)); 38 panelPort.setVisible(false); 34 39 initialize(); 35 40 } … … 37 42 private void initialize() { 38 43 this.setLayout(null); 44 this.add(panelPort, null); 39 45 this.add(getPortButton(), null); 40 46 this.add(getStbdButton(), null); … … 52 58 if (portButton.isSelected()) { 53 59 portButton.setEnabled(false); 54 //panelPort.setVisible(true);60 panelPort.setVisible(true); 55 61 } else { 56 62 portButton.setEnabled(true); 57 //panelPort.setVisible(false);63 panelPort.setVisible(false); 58 64 } 59 65 stbdButton.setEnabled(!stbdButton.isSelected()); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelPort.java
r24597 r24600 22 22 import java.awt.event.ActionListener; 23 23 24 public class Panel Chanextends JPanel {24 public class PanelPort extends JPanel { 25 25 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 public PanelChan() { 26 private ButtonGroup regionButtons = null; 27 private JRadioButton regionAButton = null; 28 private JRadioButton regionBButton = null; 29 private ButtonGroup shapeButtons = null; 30 private JRadioButton pillarButton = null; 31 private JRadioButton sparButton = null; 32 private JRadioButton canButton = null; 33 private JRadioButton floatButton = null; 34 private JRadioButton beaconButton = null; 35 private JRadioButton towerButton = null; 36 private JRadioButton perchButton = null; 37 38 public PanelPort() { 33 39 super(); 34 40 initialize(); … … 37 43 private void initialize() { 38 44 this.setLayout(null); 39 this.add(getPortButton(), null); 40 this.add(getStbdButton(), null); 41 this.add(getPrefPortButton(), null); 42 this.add(getPrefStbdButton(), null); 43 this.add(getSafeWaterButton(), null); 44 catButtons = new ButtonGroup(); 45 catButtons.add(portButton); 46 catButtons.add(stbdButton); 47 catButtons.add(prefPortButton); 48 catButtons.add(prefStbdButton); 49 catButtons.add(safeWaterButton); 50 ActionListener alCat = new ActionListener() { 45 this.add(getRegionAButton(), null); 46 this.add(getRegionBButton(), null); 47 this.add(getPillarButton(), null); 48 this.add(getSparButton(), null); 49 this.add(getCanButton(), null); 50 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() { 51 59 public void actionPerformed(java.awt.event.ActionEvent e) { 52 if (portButton.isSelected()) { 53 portButton.setEnabled(false); 54 // panelPort.setVisible(true); 60 if (regionAButton.isSelected()) { 61 regionAButton.setEnabled(false); 55 62 } else { 56 portButton.setEnabled(true); 57 // panelPort.setVisible(false); 63 regionAButton.setEnabled(true); 58 64 } 59 stbdButton.setEnabled(!stbdButton.isSelected()); 60 prefPortButton.setEnabled(!prefPortButton.isSelected()); 61 prefStbdButton.setEnabled(!prefStbdButton.isSelected()); 62 safeWaterButton.setEnabled(!safeWaterButton.isSelected()); 65 if (regionBButton.isSelected()) { 66 regionBButton.setEnabled(false); 67 } else { 68 regionBButton.setEnabled(true); 69 } 63 70 } 64 71 }; 65 portButton.addActionListener(alCat); 66 stbdButton.addActionListener(alCat); 67 prefPortButton.addActionListener(alCat); 68 prefStbdButton.addActionListener(alCat); 69 safeWaterButton.addActionListener(alCat); 72 regionAButton.addActionListener(alRegion); 73 regionBButton.addActionListener(alRegion); 74 75 shapeButtons = new ButtonGroup(); 76 shapeButtons.add(pillarButton); 77 shapeButtons.add(sparButton); 78 shapeButtons.add(canButton); 79 shapeButtons.add(floatButton); 80 shapeButtons.add(beaconButton); 81 shapeButtons.add(towerButton); 82 shapeButtons.add(perchButton); 83 ActionListener alShape = new ActionListener() { 84 public void actionPerformed(java.awt.event.ActionEvent e) { 85 pillarButton.setEnabled(!pillarButton.isSelected()); 86 sparButton.setEnabled(!sparButton.isSelected()); 87 canButton.setEnabled(!canButton.isSelected()); 88 floatButton.setEnabled(!floatButton.isSelected()); 89 beaconButton.setEnabled(!beaconButton.isSelected()); 90 towerButton.setEnabled(!towerButton.isSelected()); 91 perchButton.setEnabled(!perchButton.isSelected()); 92 } 93 }; 94 pillarButton.addActionListener(alShape); 95 sparButton.addActionListener(alShape); 96 canButton.addActionListener(alShape); 97 floatButton.addActionListener(alShape); 98 beaconButton.addActionListener(alShape); 99 towerButton.addActionListener(alShape); 100 perchButton.addActionListener(alShape); 70 101 } 71 102 72 private JRadioButton getPortButton() { 73 if (portButton == null) { 74 portButton = new JRadioButton(new ImageIcon(getClass().getResource( 75 Messages.getString("PortButton")))); 76 portButton.setBounds(new Rectangle(0, 0, 105, 32)); 77 portButton.setToolTipText(Messages.getString("PortTip")); 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)); 78 108 } 79 return portButton;109 return regionAButton; 80 110 } 81 111 82 private JRadioButton getStbdButton() { 83 if (stbdButton == null) { 84 stbdButton = new JRadioButton(new ImageIcon(getClass().getResource( 85 Messages.getString("StbdButton")))); 86 stbdButton.setBounds(new Rectangle(0, 32, 105, 32)); 87 stbdButton.setToolTipText(Messages.getString("StbdTip")); 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)); 88 117 } 89 return stbdButton;118 return regionBButton; 90 119 } 91 120 92 private JRadioButton getPrefPortButton() { 93 if (prefPortButton == null) { 94 prefPortButton = new JRadioButton(new ImageIcon(getClass().getResource( 95 Messages.getString("PrefPortButton")))); 96 prefPortButton.setBounds(new Rectangle(0, 64, 105, 32)); 97 prefPortButton.setToolTipText(Messages.getString("PrefPortTip")); 121 private JRadioButton getPillarButton() { 122 if (pillarButton == null) { 123 pillarButton = new JRadioButton(new ImageIcon(getClass().getResource( 124 Messages.getString("PillarButton")))); 125 pillarButton.setBounds(new Rectangle(0, 64, 90, 32)); 98 126 } 99 return p refPortButton;127 return pillarButton; 100 128 } 101 129 102 private JRadioButton getPrefStbdButton() { 103 if (prefStbdButton == null) { 104 prefStbdButton = new JRadioButton(new ImageIcon(getClass().getResource( 105 Messages.getString("PrefStbdButton")))); 106 prefStbdButton.setBounds(new Rectangle(0, 96, 105, 32)); 107 prefStbdButton.setToolTipText(Messages.getString("PrefStbdTip")); 130 private JRadioButton getSparButton() { 131 if (sparButton == null) { 132 sparButton = new JRadioButton(new ImageIcon(getClass().getResource( 133 Messages.getString("SparButton")))); 134 sparButton.setBounds(new Rectangle(0, 96, 90, 32)); 108 135 } 109 return prefStbdButton;136 return sparButton; 110 137 } 111 138 112 private JRadioButton getSafeWaterButton() { 113 if (safeWaterButton == null) { 114 safeWaterButton = new JRadioButton(new ImageIcon(getClass().getResource( 115 Messages.getString("SafeWaterButton")))); 116 safeWaterButton.setBounds(new Rectangle(0, 128, 105, 32)); 117 safeWaterButton.setToolTipText(Messages.getString("SafeWaterTip")); 139 private JRadioButton getCanButton() { 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)); 118 144 } 119 return safeWaterButton;145 return canButton; 120 146 } 121 147 148 private JRadioButton getFloatButton() { 149 if (floatButton == null) { 150 floatButton = new JRadioButton(new ImageIcon(getClass().getResource( 151 Messages.getString("FloatButton")))); 152 floatButton.setBounds(new Rectangle(90, 0, 90, 32)); 153 } 154 return floatButton; 155 } 156 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 122 185 }
Note:
See TracChangeset
for help on using the changeset viewer.