bad0134b655ba6b5b3c7dc7f7c12bfb706b443e2
[taxeditor.git] / eclipseprojects / eu.etaxonomy.taxeditor / src / eu / etaxonomy / taxeditor / FreetextPropertiesPerspective.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9
10 package eu.etaxonomy.taxeditor;
11
12 import org.apache.log4j.Logger;
13 import org.eclipse.ui.IFolderLayout;
14 import org.eclipse.ui.IPageLayout;
15 import org.eclipse.ui.IPerspectiveFactory;
16
17 import eu.etaxonomy.taxeditor.navigation.RecentNamesView;
18 import eu.etaxonomy.taxeditor.navigation.SearchView;
19 import eu.etaxonomy.taxeditor.navigation.TaxonomicTreeView;
20
21 /**
22 * @author p.ciardelli
23 * @created 15.05.2008
24 * @version 1.0
25 */
26 public class FreetextPropertiesPerspective implements IPerspectiveFactory {
27 private static final Logger logger = Logger.getLogger(FreetextPropertiesPerspective.class);
28 /*
29 * To remember the user's layout and window sizes for the next time they
30 * start your application, add configurer.setSaveAndRestore(true); to the
31 * initialize() method of WorkbenchAdvisor.
32 */
33
34 public static final String ID = "eu.etaxonomy.taxeditor.perspective.freetextproperties";
35
36 public void createInitialLayout(IPageLayout layout) {
37 String editorArea = layout.getEditorArea();
38
39 // Note: plug-in org.eclipse.ui.ide necessary for
40 // IPageLayout.ID_PROBLEM_VIEW ("org.eclipse.ui.views.ProblemView") to run
41 // layout.addView(IPageLayout.ID_PROBLEM_VIEW, IPageLayout.BOTTOM, 0.8f, editorArea);
42
43 IFolderLayout folderLayoutLeft = layout.createFolder("leftfolder", IPageLayout.LEFT, 0.3f, editorArea);
44
45 folderLayoutLeft.addView(TaxonomicTreeView.ID);
46 folderLayoutLeft.addView(SearchView.ID);
47
48 IFolderLayout folderLayoutBottomLeft = layout.createFolder("bottomleftfolder", IPageLayout.BOTTOM, 0.75f, "leftfolder");
49 folderLayoutBottomLeft.addView(RecentNamesView.ID);
50 // folderLayoutBottomLeft.addView(FavoritesView.ID);
51
52 IFolderLayout folderLayoutRight = layout.createFolder("rightfolder", IPageLayout.RIGHT, 0.5f, editorArea);
53 folderLayoutRight.addView(IPageLayout.ID_PROP_SHEET);
54 // folderLayoutRight.addView(IPageLayout.ID_PROBLEM_VIEW);
55
56 layout.getViewLayout(IPageLayout.ID_PROP_SHEET).setCloseable(false);
57 layout.getViewLayout(IPageLayout.ID_PROP_SHEET);
58 layout.getViewLayout(TaxonomicTreeView.ID).setCloseable(false);
59 }
60 }