KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > presentations > DefaultStandalonePresentation


1 /*******************************************************************************
2  * Copyright (c) 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.internal.presentations;
12
13 import org.eclipse.swt.widgets.Composite;
14 import org.eclipse.ui.presentations.IStackPresentationSite;
15
16 /**
17  * Extends <code>DefaultViewPresentation</code> with support for standalone
18  * parts. A standalone part cannot be docked together with other parts in
19  * the same folder, and can optionally have its title hidden.
20  */

21 public class DefaultStandalonePresentation extends
22         DefaultViewPresentation {
23
24     /**
25      * Constructs a new <code>DefaultStandalonePresentation</code>.
26      *
27      * @param parent the parent composite
28      * @param newSite the site for interacting with the workbench
29      * @param showTitle <code>true</code> iff the part's title should be shown.
30      */

31     public DefaultStandalonePresentation(Composite parent,
32             IStackPresentationSite newSite, boolean showTitle) {
33         super(parent, newSite);
34         PaneFolder folder = getTabFolder();
35         folder.setSingleTab(true);
36         if (!showTitle) {
37             folder.hideTitle();
38         }
39     }
40
41
42 }
43
Popular Tags