コード例 #1
0
ファイル: Core.java プロジェクト: orbisgis/orbisgis
  private void initialize(ProgressMonitor parentProgress) {
    ProgressMonitor progress = parentProgress.startTask(I18N.tr("Loading the main window"), 100);
    makeMainFrame();
    progress.endTask();
    progress.setTaskName(I18N.tr("Loading docking system and frames"));
    // Initiate the docking management system
    DockingManagerImpl dockManagerImpl = new DockingManagerImpl(mainFrame);
    dockManager = dockManagerImpl;
    mainFrame.setDockingManager(dockManager);
    // Initiate the docking panel tracker
    singleFrameTracker =
        new DockingPanelTracker(pluginFramework.getHostBundleContext(), dockManager);
    singleFrameTracker.open();
    toolBarTracker =
        new MenuItemServiceTracker<MainWindow, ToolBarAction>(
            pluginFramework.getHostBundleContext(),
            ToolBarAction.class,
            dockManagerImpl,
            mainFrame);
    toolBarTracker.open();
    progress.endTask();

    // Load the log panels
    makeLoggingPanels();
    progress.endTask();

    // Load the editor factories manager
    makeEditorManager(dockManager);
    progress.endTask();

    // Load the GeoCatalog
    makeGeoCatalogPanel();
    progress.endTask();

    // Load Built-ins Editors
    loadEditorFactories();
    progress.endTask();

    progress.setTaskName(I18N.tr("Restore the former layout.."));
    // Load the docking layout and editors opened in last OrbisGis instance
    File savedDockingLayout = new File(viewWorkspace.getDockingLayoutPath());
    if (!savedDockingLayout.exists()) {
      // Copy the default docking layout
      // First OrbisGIS start
      copyDefaultDockingLayout(savedDockingLayout);
    }
    dockManager.setDockingLayoutPersistanceFilePath(viewWorkspace.getDockingLayoutPath());
    progress.endTask();
    addCoreMenu();
  }