Changeset 27955 in osm
- Timestamp:
- 2012-02-28T15:08:45+01:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/smed
- Files:
-
- 16 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelRadar.java
r27423 r27955 119 119 rangeBox.setBounds(new Rectangle(155, 60, 50, 20)); 120 120 rangeBox.setHorizontalAlignment(SwingConstants.CENTER); 121 add(rangeBox); 121 122 rangeBox.addFocusListener(flRange); 122 123 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r27941 r27955 725 725 726 726 public enum Pat { 727 NOPAT, HSTRP, VSTRP, DIAG, SQUARED, BORDER, CROSS 727 NOPAT, HSTRP, VSTRP, DIAG, SQUARED, BORDER, CROSS, SALTIRE 728 728 } 729 729 … … 736 736 PatSTR.put(Pat.BORDER, "border"); 737 737 PatSTR.put(Pat.CROSS, "cross"); 738 PatSTR.put(Pat.SALTIRE, "saltire"); 738 739 } 739 740 -
applications/editors/josm/plugins/smed/src/smed/tabs/SmedTabAction.java
r27947 r27955 23 23 public class SmedTabAction extends JosmAction { 24 24 25 25 /** 26 26 * 27 27 */ … … 31 31 private JFrame frame = null; 32 32 private boolean isOpen = false; 33 private JMenuItem osmItem = 33 private JMenuItem osmItem =null; 34 34 public static JTextField smedStatusBar = null; 35 private static String editor = tr("SeaMap Editor"); 35 private static String editor =tr("SeaMap Editor"); 36 37 public SmedTabAction() { 38 super( editor, "Smed",editor, 39 Shortcut.registerShortcut("tools:Seamaps", tr("Tool: {0}", tr("SeaMap Editor")), 40 KeyEvent.VK_K, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), 41 true); //$NON-NLS-1$ //$NON-NLS-2$ 42 } 36 43 37 public SmedTabAction() {38 super( editor, "Smed",editor, Shortcut.registerShortcut("tools:Seamaps", tr("Tool: {0}", tr("SeaMap Editor")), KeyEvent.VK_K, Shortcut.SHIFT_DEFAULT), true); //$NON-NLS-1$ //$NON-NLS-2$39 }40 44 41 @Override 42 public void actionPerformed(ActionEvent e) { 43 SwingUtilities.invokeLater(new Runnable() { 44 public void run() { 45 createAndShowTabs(); 46 } 47 }); 48 49 isOpen = true; 50 if (osmItem == null) 51 return; 45 @Override 46 public void actionPerformed(ActionEvent e) { 47 SwingUtilities.invokeLater(new Runnable() { 48 public void run() { 49 createAndShowTabs(); 50 } 51 }); 52 53 isOpen = true; 54 if (osmItem == null) return; 52 55 53 56 osmItem.setEnabled(false); 54 57 } 55 58 56 protected void createAndShowTabs() {57 // Create and set up the window.58 frame = new JFrame(editor);59 smedStatusBar = new JTextField();60 frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);61 frame.setResizable(false);62 frame.setAlwaysOnTop(true);63 59 64 // Add content to the window. 65 frame.setJMenuBar(smedMenu); 66 frame.add(smedTabs, BorderLayout.CENTER); 67 frame.add(smedStatusBar, BorderLayout.PAGE_END); 60 protected void createAndShowTabs() { 61 //Create and set up the window. 62 frame = new JFrame(editor); 63 smedStatusBar = new JTextField(); 64 frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); 65 frame.setResizable(false); 66 frame.setAlwaysOnTop(true); 68 67 69 // Displaythe window.70 frame.addWindowListener(new java.awt.event.WindowAdapter() { 71 public void windowClosing(java.awt.event.WindowEvent e) { 72 osmItem.setEnabled(true);68 //Add content to the window. 69 frame.setJMenuBar(smedMenu); 70 frame.add(smedTabs, BorderLayout.CENTER); 71 frame.add(smedStatusBar,BorderLayout.PAGE_END); 73 72 74 closeDialog(); 75 } 76 }); 77 frame.setSize(new Dimension(420, 470)); 78 // frame.pack(); 79 frame.setVisible(true); 80 } 73 //Display the window. 74 frame.addWindowListener(new java.awt.event.WindowAdapter() { 75 public void windowClosing(java.awt.event.WindowEvent e) { 76 osmItem.setEnabled(true); 77 78 closeDialog(); 79 } 80 }); 81 frame.setSize(new Dimension(420, 470)); 82 // frame.pack(); 83 frame.setVisible(true); 84 } 85 81 86 82 87 public void closeDialog() { 83 88 List<SmedPluggable> plugins = SmedTabbedPane.getPlugins(); 84 85 if (plugins != null) { 86 for (SmedPluggable p : plugins) 87 p.stop(); 89 90 if(plugins != null) { 91 for(SmedPluggable p : plugins) p.stop(); 88 92 } 89 90 if 93 94 if(isOpen) { 91 95 frame.setVisible(false); 92 96 frame.dispose(); 93 97 } 94 98 95 99 isOpen = false; 96 100 } 97 101 102 98 103 public void setOsmItem(JMenuItem item) { 99 osmItem = item; 104 osmItem = item; 100 105 } 101 106
Note:
See TracChangeset
for help on using the changeset viewer.