Changeset 23393 in osm for applications/editors/josm/plugins/smed/src
- Timestamp:
- 2010-09-29T00:12:24+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/smed/src/smed
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/src/smed/Smed.java
r23382 r23393 32 32 33 33 private JMenuItem item; 34 private SmedTabAction SmedTab;35 private List<SmedPluggable> plugins = null; 34 private SmedTabAction smedTab; 35 // private List<SmedPluggable> plugins = null; 36 36 37 37 public Smed(PluginInformation info) { … … 135 135 } 136 136 137 SmedTab = new SmedTabAction(); 138 item = Main.main.menu.toolsMenu.add(SmedTab); 139 137 smedTab = new SmedTabAction(); 138 item = Main.main.menu.toolsMenu.add(smedTab); 139 smedTab.setOsmItem(item); 140 140 141 item.setEnabled(false); 141 142 … … 148 149 } else { 149 150 item.setEnabled(false); 150 // SmpDialog.CloseDialog();151 smedTab.closeDialog(); 151 152 } 152 153 } 153 154 155 /* 154 156 public void setPlugins(List<SmedPluggable> plugins) { 155 157 this.plugins = plugins; 156 158 157 159 } 160 */ 158 161 159 162 } -
applications/editors/josm/plugins/smed/src/smed/tabs/SmedTabAction.java
r23389 r23393 10 10 11 11 import javax.swing.JFrame; 12 import javax.swing.JMenuItem; 12 13 import javax.swing.SwingUtilities; 13 14 import javax.swing.UIManager; … … 28 29 private SmedTabbedPane smedTabs = new SmedTabbedPane(); 29 30 private SmedMenuBar smedMenu = new SmedMenuBar(); 30 31 private JFrame frame = null; 32 private boolean isOpen = false; 33 private JMenuItem osmItem; 34 31 35 public SmedTabAction() { 32 36 super( "Seekarten Editor", "Smed","Seekarten Editor", Shortcut.registerShortcut( … … 44 48 } 45 49 }); 50 51 isOpen = true; 52 if (osmItem == null) return; 53 54 osmItem.setEnabled(false); 46 55 } 47 56 … … 49 58 protected void createAndShowTabs() { 50 59 //Create and set up the window. 51 JFrameframe = new JFrame("TabbedPaneDemo");60 frame = new JFrame("TabbedPaneDemo"); 52 61 frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); 53 62 frame.setResizable(false); … … 65 74 66 75 76 public void closeDialog() { 77 List<SmedPluggable> plugins = SmedTabbedPane.getPlugins(); 78 79 if(plugins != null) { 80 for(SmedPluggable p : plugins) p.stop(); 81 } 82 83 if(isOpen) { 84 frame.setVisible(false); 85 frame.dispose(); 86 } 87 88 isOpen = false; 89 } 90 91 92 public void setOsmItem(JMenuItem item) { 93 osmItem = item; 94 } 95 67 96 }
Note:
See TracChangeset
for help on using the changeset viewer.