View Javadoc

1   /*
2    WSMO Studio - a Semantic Web Service Editor
3    Copyright (c) 2004-2006, OntoText Lab. / SIRMA Group
4    
5    This library is free software; you can redistribute it and/or modify it under
6    the terms of the GNU Lesser General Public License as published by the Free
7    Software Foundation; either version 2.1 of the License, or (at your option)
8    any later version.
9    This library is distributed in the hope that it will be useful, but WITHOUT
10   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   details.
13   You should have received a copy of the GNU Lesser General Public License along
14   with this library; if not, write to the Free Software Foundation, Inc.,
15   59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16   */
17  
18  /***
19   * <p>Title: WSMO Studio</p>
20   * <p>Description: Semantic Web Service Editor</p>
21   * <p>Copyright:  Copyright (c) 2004-2006</p>
22   * <p>Company: OntoText Lab. / SIRMA </p>
23   */
24  
25  package org.wsmostudio.ui.perspective;
26  
27  import org.eclipse.ui.*;
28  import org.wsmostudio.repository.ui.RepositoriesExplorer;
29  
30  /***
31   * The <code>RepositoryPerspectiveFactory</code> generates the initial page layout for
32   * the Repository perspective.
33   * When a new page is created in the workbench a perspective is used to define
34   * the initial page layout.
35   * The perspective consists of two standard Eclipse views (<i>Resource Navigator</I>
36   * and <i>Properties</i> view) and one custom view (<i>Repositories Explorer</i>), which
37   * occupy different page regions.
38   * 
39   * @author not attributable
40   * @version $Revision: 469 $ $Date: 2006-01-09 14:51:14 +0200 $
41   */
42  
43  public class RepositoryPerspectiveFactory implements IPerspectiveFactory {
44  
45  	public void createInitialLayout(IPageLayout layout) {
46  		String edName = layout.getEditorArea();
47  		IFolderLayout naviFolder = layout.createFolder("naviFolder", IPageLayout.LEFT, 0.3f, edName);
48  		naviFolder.addView(IPageLayout.ID_RES_NAV);
49  
50  		IFolderLayout outlineFolder = layout.createFolder("outlineFolder", IPageLayout.BOTTOM, 0.5f, "naviFolder");
51  		outlineFolder.addView(RepositoriesExplorer.VIEW_ID);
52  		
53  		IFolderLayout propsFolder = layout.createFolder("propsFolder", IPageLayout.BOTTOM, 0.8f, edName);
54  		propsFolder.addView(IPageLayout.ID_PROP_SHEET);
55  	}
56  
57     public boolean isFixed(){
58     	return false;
59     }
60  }
61  
62  /*
63   * $Log$
64   * Revision 1.4  2006/01/09 12:51:12  alex_simov
65   * Copyright message in header updated
66   *
67   * Revision 1.3  2005/07/29 15:11:41  alex_simov
68   * javadoc update
69   *
70   * Revision 1.2  2005/07/21 11:46:32  alex_simov
71   * added javadoc: class description, footer
72   *
73   */