KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > directory > ldapstudio > proxy > view > Perspective


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  *
19  */

20 package org.apache.directory.ldapstudio.proxy.view;
21
22
23 import org.apache.directory.ldapstudio.proxy.Activator;
24 import org.eclipse.ui.IPageLayout;
25 import org.eclipse.ui.IPerspectiveFactory;
26
27
28 /**
29  * This class implements the default perpective for the Proxy Plugin.
30  *
31  * @author <a HREF="mailto:dev@directory.apache.org">Apache Directory Project</a>
32  * @version $Rev$, $Date$
33  */

34 public class Perspective implements IPerspectiveFactory
35 {
36     /** The Perspective ID */
37     public static final String JavaDoc ID = Activator.PLUGIN_ID + ".perspective"; //$NON-NLS-1$
38

39
40     /* (non-Javadoc)
41      * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
42      */

43     public void createInitialLayout( IPageLayout layout )
44     {
45         String JavaDoc editorArea = layout.getEditorArea();
46         layout.setEditorAreaVisible( false );
47
48         layout.addStandaloneView( ProxyView.ID, true, IPageLayout.LEFT, 0.5f, editorArea );
49         layout.getViewLayout( ProxyView.ID ).setCloseable( false );
50
51         layout.addStandaloneView( LdapMessageView.ID, true, IPageLayout.RIGHT, 0.5f, ProxyView.ID );
52         layout.getViewLayout( LdapMessageView.ID ).setCloseable( false );
53
54         // Perspective shortcuts
55
layout.addPerspectiveShortcut( "org.apache.directory.ldapstudio.browser.ui.perspective.BrowserPerspective" );
56         layout.addPerspectiveShortcut( "org.apache.directory.ldapstudio.schemas.perspective" );
57         layout.addPerspectiveShortcut( Perspective.ID );
58
59         // View shortcuts
60
layout.addShowViewShortcut( ProxyView.ID );
61         layout.addShowViewShortcut( LdapMessageView.ID );
62     }
63 }
64
Popular Tags