01: /*******************************************************************************
02: * Copyright (c) 2004 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Common Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/cpl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.examples.presentation.wrappedtabs;
11:
12: import org.eclipse.swt.widgets.Composite;
13: import org.eclipse.ui.presentations.AbstractPresentationFactory;
14: import org.eclipse.ui.presentations.IStackPresentationSite;
15: import org.eclipse.ui.presentations.StackPresentation;
16:
17: /**
18: * @since 3.0
19: */
20: public class WrappedTabsPresentationFactory extends
21: AbstractPresentationFactory {
22:
23: /* (non-Javadoc)
24: * @see org.eclipse.ui.presentations.AbstractPresentationFactory#createEditorPresentation(org.eclipse.swt.widgets.Composite, org.eclipse.ui.presentations.IStackPresentationSite)
25: */
26: public StackPresentation createEditorPresentation(Composite parent,
27: IStackPresentationSite site) {
28: return new WrappedTabsPartPresentation(parent, site, true);
29: }
30:
31: /* (non-Javadoc)
32: * @see org.eclipse.ui.presentations.AbstractPresentationFactory#createViewPresentation(org.eclipse.swt.widgets.Composite, org.eclipse.ui.presentations.IStackPresentationSite)
33: */
34: public StackPresentation createViewPresentation(Composite parent,
35: IStackPresentationSite site) {
36: return new WrappedTabsPartPresentation(parent, site, false);
37: }
38:
39: /* (non-Javadoc)
40: * @see org.eclipse.ui.presentations.AbstractPresentationFactory#createStandaloneViewPresentation(org.eclipse.swt.widgets.Composite, org.eclipse.ui.presentations.IStackPresentationSite, boolean)
41: */
42: public StackPresentation createStandaloneViewPresentation(
43: Composite parent, IStackPresentationSite site,
44: boolean showTitle) {
45: return new WrappedTabsPartPresentation(parent, site, false);
46: }
47:
48: }
|