01: /*******************************************************************************
02: * Copyright (c) 2004, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.presentations.defaultpresentation;
11:
12: import org.eclipse.swt.widgets.Composite;
13: import org.eclipse.ui.internal.presentations.util.StandardEditorSystemMenu;
14: import org.eclipse.ui.internal.presentations.util.StandardViewSystemMenu;
15: import org.eclipse.ui.internal.presentations.util.TabbedStackPresentation;
16: import org.eclipse.ui.presentations.AbstractPresentationFactory;
17: import org.eclipse.ui.presentations.IStackPresentationSite;
18: import org.eclipse.ui.presentations.StackPresentation;
19:
20: /**
21: * @since 3.1
22: */
23: public class NativePresentationFactory extends
24: AbstractPresentationFactory {
25:
26: /*
27: * (non-Javadoc)
28: *
29: * @see org.eclipse.ui.presentations.AbstractPresentationFactory
30: */
31: public StackPresentation createEditorPresentation(Composite parent,
32: IStackPresentationSite site) {
33: return new TabbedStackPresentation(site, new NativeTabFolder(
34: parent), new StandardEditorSystemMenu(site));
35: }
36:
37: /*
38: * (non-Javadoc)
39: *
40: * @see org.eclipse.ui.presentations.AbstractPresentationFactory
41: */
42: public StackPresentation createViewPresentation(Composite parent,
43: IStackPresentationSite site) {
44: return new TabbedStackPresentation(site, new NativeTabFolder(
45: parent), new StandardViewSystemMenu(site));
46: }
47:
48: /*
49: * (non-Javadoc)
50: *
51: * @see org.eclipse.ui.presentations.AbstractPresentationFactory
52: */
53: public StackPresentation createStandaloneViewPresentation(
54: Composite parent, IStackPresentationSite site,
55: boolean showTitle) {
56: // TODO honour showTitle
57: return new TabbedStackPresentation(site, new NativeTabFolder(
58: parent), new StandardViewSystemMenu(site));
59: }
60:
61: }
|