1 19 20 21 package org.netbeans.core.windows; 22 23 24 import org.netbeans.core.NbTopManager; 25 import org.netbeans.core.windows.persistence.PersistenceManager; 26 import org.netbeans.core.windows.services.DialogDisplayerImpl; 27 28 29 34 public class WindowSystemImpl implements NbTopManager.WindowSystem { 35 36 37 public WindowSystemImpl() { 38 } 39 40 41 44 public void load() { 45 WindowManagerImpl.assertEventDispatchThread(); 46 47 PersistenceHandler.getDefault().load(); 48 } 49 51 public void save() { 52 WindowManagerImpl.assertEventDispatchThread(); 53 54 PersistenceHandler.getDefault().save(); 55 } 56 57 60 public void show() { 61 WindowManagerImpl.assertEventDispatchThread(); 62 63 DialogDisplayerImpl.runDelayed(); 64 ShortcutAndMenuKeyEventProcessor.install(); 65 WindowManagerImpl.getInstance().setVisible(true); 66 } 67 69 public void hide() { 70 WindowManagerImpl.assertEventDispatchThread(); 71 72 WindowManagerImpl.getInstance().setVisible(false); 73 ShortcutAndMenuKeyEventProcessor.uninstall(); 74 } 75 76 82 public void clear() { 83 WindowManagerImpl.assertEventDispatchThread(); 84 hide(); 85 WindowManagerImpl.getInstance().resetModel(); 86 PersistenceManager.getDefault().clear(); 87 PersistenceHandler.getDefault().clear(); 88 load(); 89 show(); 90 } 91 92 } 93 | Popular Tags |