Changeset 24355 in osm for applications/editors/josm
- Timestamp:
- 2010-11-24T00:31:31+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/harbour/src
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/harbour/src/harbour/dialogs/HarbourAction.java
r24325 r24355 1 1 package harbour.dialogs; 2 3 import harbour.panels.*; 2 4 3 5 import javax.swing.JPanel; … … 5 7 import java.awt.Rectangle; 6 8 import javax.swing.JButton; 7 import javax.swing.BorderFactory;8 import java.awt.Color;9 9 import javax.swing.JTextField; 10 10 import javax.swing.JLabel; … … 16 16 17 17 private JPanel harbourPanel = null; // @jve:decl-index=0:visual-constraint="68,31" 18 private JPanel comArea = null;19 18 private JButton comButton = null; 20 19 private JButton restButton = null; … … 30 29 private JButton forButton = null; 31 30 private JButton fastforButton = null; 32 private JLabel jLabel = null;33 private JButton quer aButton = null;31 private JLabel queryLabel = null; 32 private JButton queryButton = null; 34 33 private JButton changequeryButton = null; 35 34 private JComboBox typComboBox = null; … … 41 40 private JLabel regLabel = null; 42 41 private JTextField regTextField = null; 42 private PanelGeneral panelGeneral = null; 43 private PanelLimits panelLimits = null; 44 private PanelServices panelServices = null; 45 private PanelEnv panelEnv = null; 46 private PanelRelations panelRelations = null; 47 48 public HarbourAction() { 49 panelGeneral= new PanelGeneral(); 50 panelGeneral.setBounds(new Rectangle(2, 56, 330, 270)); 51 panelGeneral.setVisible(true); 52 53 panelLimits = new PanelLimits(); 54 panelLimits.setBounds(new Rectangle(2, 56, 330, 270)); 55 panelLimits.setVisible(false); 56 57 panelServices = new PanelServices(); 58 panelServices.setBounds(new Rectangle(2, 56, 330, 270)); 59 panelServices.setVisible(false); 60 61 panelEnv = new PanelEnv(); 62 panelEnv.setBounds(new Rectangle(2, 56, 330, 270)); 63 panelEnv.setVisible(false); 64 65 panelRelations = new PanelRelations(); 66 panelRelations.setBounds(new Rectangle(2, 56, 330, 270)); 67 panelRelations.setVisible(false); 68 } 69 43 70 /** 44 71 * This method initializes harbourPanel … … 60 87 typeLabel.setBounds(new Rectangle(289, 5, 43, 20)); 61 88 typeLabel.setText("Type:"); 62 jLabel = new JLabel();63 jLabel.setBounds(new Rectangle(212, 334, 80, 15));64 jLabel.setFont(new Font("Dialog", Font.PLAIN, 12));65 jLabel.setText("Suche nach:");89 queryLabel = new JLabel(); 90 queryLabel.setBounds(new Rectangle(212, 334, 80, 15)); 91 queryLabel.setFont(new Font("Dialog", Font.PLAIN, 12)); 92 queryLabel.setText("Suche nach:"); 66 93 setLabel = new JLabel(); 67 94 setLabel.setBounds(new Rectangle(2, 330, 68, 21)); … … 74 101 harbourPanel.setLayout(null); 75 102 harbourPanel.setSize(new Dimension(400, 360)); 76 harbourPanel.add(getComArea(), null); 77 harbourPanel.add(getComButton(), null); 103 harbourPanel.add(panelGeneral, null); 104 harbourPanel.add(panelLimits, null); 105 harbourPanel.add(panelServices, null); 106 harbourPanel.add(panelEnv, null); 107 harbourPanel.add(panelRelations, null); 108 harbourPanel.add(getComButton(), null); 78 109 harbourPanel.add(getRestButton(), null); 79 110 harbourPanel.add(getServButton(), null); 80 harbourPanel.add(getEnvButton(), null);81 harbourPanel.add(getRelButton(), null);111 harbourPanel.add(getEnvButton(), null); 112 harbourPanel.add(getRelButton(), null); 82 113 harbourPanel.add(getNameTextField(), null); 83 114 harbourPanel.add(getFastbackButton(), null); … … 88 119 harbourPanel.add(getForButton(), null); 89 120 harbourPanel.add(getFastforButton(), null); 90 harbourPanel.add( jLabel, null);91 harbourPanel.add(getQuer aButton(), null);121 harbourPanel.add(queryLabel, null); 122 harbourPanel.add(getQueryButton(), null); 92 123 harbourPanel.add(getChangequeryButton(), null); 93 124 harbourPanel.add(getTypComboBox(), null); … … 103 134 } 104 135 105 /**106 * This method initializes comArea107 *108 * @return javax.swing.JPanel109 */110 private JPanel getComArea() {111 if (comArea == null) {112 comArea = new JPanel();113 comArea.setLayout(null);114 comArea.setBounds(new Rectangle(2, 56, 330, 270));115 comArea.setBorder(BorderFactory.createLineBorder(Color.black, 1));116 }117 return comArea;118 }119 136 120 137 /** … … 130 147 comButton.setIcon(new ImageIcon(getClass().getResource("/images/Windrose.png"))); 131 148 comButton.setToolTipText("Allgemeines"); 149 comButton.addActionListener(new java.awt.event.ActionListener() { 150 public void actionPerformed(java.awt.event.ActionEvent e) { 151 panelLimits.setVisible(false); 152 panelServices.setVisible(false); 153 panelEnv.setVisible(false); 154 panelRelations.setVisible(false); 155 panelGeneral.setVisible(true); 156 } 157 }); 132 158 } 133 159 return comButton; … … 143 169 restButton = new JButton(); 144 170 restButton.setBounds(new Rectangle(340, 111, 50, 50)); 145 restButton.setIcon(new ImageIcon(getClass().getResource("/images/ Zeichen_264.png")));171 restButton.setIcon(new ImageIcon(getClass().getResource("/images/Schranken.png"))); 146 172 restButton.setToolTipText("Einfahrtbeschränkungen"); 173 restButton.addActionListener(new java.awt.event.ActionListener() { 174 public void actionPerformed(java.awt.event.ActionEvent e) { 175 panelGeneral.setVisible(false); 176 panelServices.setVisible(false); 177 panelEnv.setVisible(false); 178 panelRelations.setVisible(false); 179 panelLimits.setVisible(true); 180 } 181 }); 147 182 } 148 183 return restButton; … … 160 195 servButton.setIcon(new ImageIcon(getClass().getResource("/images/Kran.png"))); 161 196 servButton.setToolTipText("Dienste"); 197 servButton.addActionListener(new java.awt.event.ActionListener() { 198 public void actionPerformed(java.awt.event.ActionEvent e) { 199 panelGeneral.setVisible(false); 200 panelLimits.setVisible(false); 201 panelEnv.setVisible(false); 202 panelRelations.setVisible(false); 203 panelServices.setVisible(true); 204 } 205 }); 162 206 } 163 207 return servButton; … … 173 217 envButton = new JButton(); 174 218 envButton.setBounds(new Rectangle(340, 221, 50, 50)); 219 envButton.setIcon(new ImageIcon(getClass().getResource("/images/Env.png"))); 175 220 envButton.setToolTipText("Umgebung"); 221 envButton.addActionListener(new java.awt.event.ActionListener() { 222 public void actionPerformed(java.awt.event.ActionEvent e) { 223 panelGeneral.setVisible(false); 224 panelLimits.setVisible(false); 225 panelServices.setVisible(false); 226 panelRelations.setVisible(false); 227 panelEnv.setVisible(true); 228 } 229 }); 176 230 } 177 231 return envButton; … … 187 241 relButton = new JButton(); 188 242 relButton.setBounds(new Rectangle(340, 276, 50, 50)); 243 relButton.setIcon(new ImageIcon(getClass().getResource("/images/Relationen.png"))); 189 244 relButton.setToolTipText("Relationen"); 245 relButton.addActionListener(new java.awt.event.ActionListener() { 246 public void actionPerformed(java.awt.event.ActionEvent e) { 247 panelGeneral.setVisible(false); 248 panelLimits.setVisible(false); 249 panelServices.setVisible(false); 250 panelEnv.setVisible(false); 251 panelRelations.setVisible(true); 252 } 253 }); 190 254 } 191 255 return relButton; … … 272 336 273 337 /** 274 * This method initializes quer aButton275 * 276 * @return javax.swing.JButton 277 */ 278 private JButton getQuer aButton() {279 if (quer aButton == null) {280 quer aButton = new JButton();281 quer aButton.setBounds(new Rectangle(292, 330, 80, 20));282 quer aButton.setFont(new Font("Dialog", Font.PLAIN, 12));283 quer aButton.setToolTipText("");284 quer aButton.setText("Hafen");285 } 286 return quer aButton;338 * This method initializes queryButton 339 * 340 * @return javax.swing.JButton 341 */ 342 private JButton getQueryButton() { 343 if (queryButton == null) { 344 queryButton = new JButton(); 345 queryButton.setBounds(new Rectangle(292, 330, 80, 20)); 346 queryButton.setFont(new Font("Dialog", Font.PLAIN, 12)); 347 queryButton.setToolTipText(""); 348 queryButton.setText("Hafen"); 349 } 350 return queryButton; 287 351 } 288 352
Note:
See TracChangeset
for help on using the changeset viewer.