KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2004, 2006 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 using native widgets.
20  * <p>
21  * EXPERIMENTAL
22  * </p>
23  *
24  * @since 3.0
25  */

26 public class NativePresentationFactory extends WorkbenchPresentationFactory {
27
28     /*
29      * (non-Javadoc)
30      *
31      * @see org.eclipse.ui.presentations.AbstractPresentationFactory
32      */

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

43     public StackPresentation createViewPresentation(Composite parent,
44             IStackPresentationSite site) {
45         return new NativeStackPresentation(parent, site);
46     }
47
48     /*
49      * (non-Javadoc)
50      *
51      * @see org.eclipse.ui.presentations.AbstractPresentationFactory
52      */

53     public StackPresentation createStandaloneViewPresentation(Composite parent,
54             IStackPresentationSite site, boolean showTitle) {
55         // TODO honour showTitle
56
return new NativeStackPresentation(parent, site);
57     }
58
59 }
60
Popular Tags