KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2004, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-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 import org.eclipse.ui.presentations.StackPresentation;
16 import org.eclipse.ui.presentations.WorkbenchPresentationFactory;
17
18 /**
19  * A presentation factory that creates a look similar to previous verisons of eclipse.
20  */

21 public class R21PresentationFactory extends WorkbenchPresentationFactory {
22
23     /* (non-Javadoc)
24      * @see org.eclipse.ui.presentations.AbstractPresentationFactory
25      */

26     public StackPresentation createEditorPresentation(Composite parent,
27             IStackPresentationSite site) {
28         return new R21EditorStackPresentation(parent, site);
29     }
30
31     /* (non-Javadoc)
32      * @see org.eclipse.ui.presentations.AbstractPresentationFactory
33      */

34     public StackPresentation createViewPresentation(Composite parent,
35             IStackPresentationSite site) {
36         return new R21ViewStackPresentation(parent, site);
37     }
38
39     /* (non-Javadoc)
40      * @see org.eclipse.ui.presentations.AbstractPresentationFactory
41      */

42     public StackPresentation createStandaloneViewPresentation(Composite parent,
43             IStackPresentationSite site, boolean showTitle) {
44         // TODO: honour showTitle
45
return new R21ViewStackPresentation(parent, site);
46     }
47
48 }
49
Popular Tags