Changeset 24416 in osm for applications/editors/josm/plugins/smed
- Timestamp:
- 2010-11-26T16:38:45+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/smed
- Files:
-
- 13 added
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/harbour/src/harbour/panels/PanelGeneral.java
r24356 r24416 1 1 package harbour.panels; 2 3 import harbour.widgets.Sheltergram; 2 4 3 5 import javax.swing.BorderFactory; … … 6 8 import java.awt.Color; 7 9 import java.awt.Dimension; 8 import javax.swing.JButton;9 10 import java.awt.Rectangle; 10 11 import java.awt.Font; … … 12 13 import javax.swing.JTextField; 13 14 import javax.swing.JComboBox; 14 import java.awt.Label;15 15 import javax.swing.JCheckBox; 16 16 import java.awt.Cursor; 17 import java.awt.GridBagLayout;18 import javax.swing.ImageIcon;19 17 20 18 public class PanelGeneral extends JPanel { … … 44 42 private JCheckBox desCheckBox = null; 45 43 private JCheckBox jCheckBox1 = null; 46 private JLabel shelterLabel = null;47 44 private JLabel tshelterLabel = null; 45 private JPanel shelterPanel = null; 46 private JLabel sizeLabel = null; 47 private JLabel typeLabel = null; 48 48 public PanelGeneral() { 49 49 super(); … … 58 58 */ 59 59 private void initialize() { 60 typeLabel = new JLabel(); 61 typeLabel.setBounds(new Rectangle(270, 2, 43, 20)); 62 typeLabel.setFont(new Font("Dialog", Font.PLAIN, 12)); 63 typeLabel.setText("Type"); 64 sizeLabel = new JLabel(); 65 sizeLabel.setBounds(new Rectangle(210, 2, 34, 20)); 66 sizeLabel.setFont(new Font("Dialog", Font.PLAIN, 12)); 67 sizeLabel.setText("Size"); 60 68 tshelterLabel = new JLabel(); 61 tshelterLabel.setBounds(new Rectangle(2 52, 145, 50, 20));69 tshelterLabel.setBounds(new Rectangle(246, 144, 50, 20)); 62 70 tshelterLabel.setText("Schutz"); 63 shelterLabel = new JLabel();64 shelterLabel.setBounds(new Rectangle(235, 167, 80, 80));65 shelterLabel.setIcon(new ImageIcon(getClass().getResource("/images/shelter.png")));66 71 qLabel = new JLabel(); 67 72 qLabel.setBounds(new Rectangle(50, 205, 85, 20)); … … 76 81 chartLabel.setBounds(new Rectangle(210, 50, 35, 20)); 77 82 chartLabel.setFont(new Font("Dialog", Font.PLAIN, 12)); 78 chartLabel.setText(" Chart");83 chartLabel.setText("Karte"); 79 84 pubLabel = new JLabel(); 80 85 pubLabel.setBounds(new Rectangle(53, 50, 70, 20)); … … 82 87 pubLabel.setText("Publication"); 83 88 harborLabel = new JLabel(); 84 harborLabel.setBounds(new Rectangle(148, 2, 160, 20));85 harborLabel.setText("Harbor : Size Type");89 harborLabel.setBounds(new Rectangle(148, 2, 55, 20)); 90 harborLabel.setText("Harbor:"); 86 91 lonLabel = new JLabel(); 87 92 lonLabel.setBounds(new Rectangle(100, 25, 23, 20)); … … 123 128 this.add(getDesCheckBox(), null); 124 129 this.add(getJCheckBox1(), null); 125 this.add(shelterLabel, null);126 130 this.add(tshelterLabel, null); 131 this.add(getShelterPanel(), null); 132 this.add(sizeLabel, null); 133 this.add(typeLabel, null); 127 134 } 128 135 … … 282 289 if (jCheckBox2 == null) { 283 290 jCheckBox2 = new JCheckBox(); 284 jCheckBox2.setBounds(new Rectangle(125, 117, 110, 21));291 jCheckBox2.setBounds(new Rectangle(125, 117, 70, 21)); 285 292 jCheckBox2.setFont(new Font("Dialog", Font.PLAIN, 12)); 286 293 jCheckBox2.setText("ratsam"); … … 301 308 tugCheckBox.setBounds(new Rectangle(5, 160, 121, 20)); 302 309 tugCheckBox.setFont(new Font("Dialog", Font.PLAIN, 12)); 303 tugCheckBox.setText(" Rettungsdienst");310 tugCheckBox.setText("Bergungsschiff"); 304 311 } 305 312 return tugCheckBox; … … 374 381 } 375 382 383 384 385 /** 386 * This method initializes shelterPanel 387 * 388 * @return javax.swing.JPanel 389 */ 390 private JPanel getShelterPanel() { 391 if (shelterPanel == null) { 392 shelterPanel = new Sheltergram(); 393 shelterPanel.setBounds(new Rectangle(232, 170, 75, 75)); 394 } 395 return shelterPanel; 396 } 397 376 398 } -
applications/editors/josm/plugins/smed/src/smed/menu/SmedMenuBar.java
r23474 r24416 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import java.awt.Desktop; 5 6 import java.awt.event.KeyEvent; 7 import java.io.IOException; 8 import java.net.URI; 9 import java.net.URISyntaxException; 6 10 import java.util.ResourceBundle; 7 11 … … 14 18 public class SmedMenuBar extends JMenuBar { 15 19 16 /** 17 * 18 */ 19 private static final long serialVersionUID = 1L; 20 21 JMenuBar menuBar; 22 JMenu menu, submenu; 23 JMenuItem menuItem; 20 /** 21 * 22 */ 23 private static final long serialVersionUID = 1L; 24 25 private String[] cmd = new String[4]; 26 27 private JMenuBar menuBar; 28 private JMenu menuFile, menuHelp, submenu; 29 private JMenuItem menuItemFile, menuItemOnLineHelp; 24 30 25 31 public SmedMenuBar() { 26 ResourceBundle keyEvents = ResourceBundle.getBundle("smed.keys.Events"); 32 cmd[0] = "cmd.exe"; 33 cmd[1] = "/C"; 34 cmd[2] = "start"; 35 cmd[3] = "http://www.openseamap.org/"; 36 37 ResourceBundle keyEvents = ResourceBundle.getBundle("smed.keys.Events"); 27 38 28 39 menuBar = new JMenuBar(); 29 40 30 menu = new JMenu(tr("File"));41 menuFile = new JMenu(tr("File")); 31 42 // menu.setMnemonic(KeyEvent.VK_F); 32 menu .setMnemonic((Integer) keyEvents.getObject("SmedMenuBar.001"));43 menuFile.setMnemonic((Integer) keyEvents.getObject("SmedMenuBar.001")); 33 44 34 menu .getAccessibleContext().setAccessibleDescription(45 menuFile.getAccessibleContext().setAccessibleDescription( 35 46 "The only menu in this program that has menu items"); 36 47 37 menuItem = new JMenuItem("Tabmanager", 38 KeyEvent.VK_T); 39 40 menuItem.addActionListener(new java.awt.event.ActionListener() { 48 menuItemFile = new JMenuItem("Tabmanager", KeyEvent.VK_T); 49 menuItemFile.addActionListener(new java.awt.event.ActionListener() { 41 50 public void actionPerformed(java.awt.event.ActionEvent e) { new TabManager(); } 42 51 }); 52 53 menuFile.add(menuItemFile); 54 55 menuHelp = new JMenu(tr("Help")); 56 menuHelp.setMnemonic(KeyEvent.VK_H); 57 58 menuItemOnLineHelp = new JMenuItem(tr("Online Help"), KeyEvent.VK_O); 59 menuItemOnLineHelp.addActionListener(new java.awt.event.ActionListener() { 60 public void actionPerformed(java.awt.event.ActionEvent e) { 61 try { 62 Desktop.getDesktop().browse( new URI("http://www.openseamap.org/") ); 63 } catch (Exception ex) { 64 ex.printStackTrace(); 65 } 43 66 67 } 44 68 45 menu.add(menuItem); 46 47 menuBar.add(menu); 69 }); 70 71 menuHelp.add(menuItemOnLineHelp); 72 73 menuBar.add(menuFile); 74 menuBar.add(menuHelp); 48 75 49 76 add(menuBar);
Note:
See TracChangeset
for help on using the changeset viewer.