p2izing the editor
[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 * IMPORTANT:
34 * If you set configurer.setSaveAndRestore(true) and you are adding a new view
35 * to the perspective make sure you set it to false for at least one start.
36 * Otherwise the new view will not show.
37 *
38 */
39
40 public static final String ID = "eu.etaxonomy.taxeditor.perspective.freetextproperties";
41
42 public void createInitialLayout(IPageLayout layout) {
43 String editorArea = layout.getEditorArea();
44
45 // Note: plug-in org.eclipse.ui.ide necessary for
46 // IPageLayout.ID_PROBLEM_VIEW ("org.eclipse.ui.views.ProblemView") to run
47 // layout.addView(IPageLayout.ID_PROBLEM_VIEW, IPageLayout.BOTTOM, 0.8f, editorArea);
48
49 IFolderLayout folderLayoutLeft = layout.createFolder("leftfolder", IPageLayout.LEFT, 0.3f, editorArea);
50
51 folderLayoutLeft.addView(TaxonomicTreeView.ID);
52 folderLayoutLeft.addView(SearchView.ID);
53
54 IFolderLayout folderLayoutBottomLeft = layout.createFolder("bottomleftfolder", IPageLayout.BOTTOM, 0.75f, "leftfolder");
55 folderLayoutBottomLeft.addView(RecentNamesView.ID);
56 // folderLayoutBottomLeft.addView(FavoritesView.ID);
57
58 IFolderLayout folderLayoutRight = layout.createFolder("rightfolder", IPageLayout.RIGHT, 0.5f, editorArea);
59 folderLayoutRight.addView(IPageLayout.ID_PROP_SHEET);
60 //// folderLayoutRight.addView(IPageLayout.ID_PROBLEM_VIEW);
61
62 layout.getViewLayout(IPageLayout.ID_PROP_SHEET).setCloseable(false);
63 layout.getViewLayout(IPageLayout.ID_PROP_SHEET);
64 layout.getViewLayout(TaxonomicTreeView.ID).setCloseable(false);
65
66 layout.setFixed(false);
67
68 // layout.createPlaceholderFolder(folderId, relationship, ratio, refId);
69 }
70 }