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.sidewinder;
11:
12: import org.eclipse.swt.SWT;
13: import org.eclipse.swt.widgets.Composite;
14: import org.eclipse.ui.presentations.*;
15:
16: /**
17: * @since 3.0
18: */
19: public class SideWinderPresentationFactory extends
20: AbstractPresentationFactory {
21:
22: /* (non-Javadoc)
23: * @see org.eclipse.ui.presentations.AbstractPresentationFactory#createEditorPresentation(org.eclipse.swt.widgets.Composite, org.eclipse.ui.presentations.IStackPresentationSite)
24: */
25: public StackPresentation createEditorPresentation(Composite parent,
26: IStackPresentationSite site) {
27: return new SideWinderItemViewPresentation(parent, site, true,
28: true, SWT.HORIZONTAL | SWT.TOP);
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 SideWinderItemViewPresentation(parent, site, false,
37: true, SWT.HORIZONTAL | SWT.TOP);
38: }
39:
40: /* (non-Javadoc)
41: * @see org.eclipse.ui.presentations.AbstractPresentationFactory#createStandaloneViewPresentation(org.eclipse.swt.widgets.Composite, org.eclipse.ui.presentations.IStackPresentationSite, boolean)
42: */
43: public StackPresentation createStandaloneViewPresentation(
44: Composite parent, IStackPresentationSite site,
45: boolean showTitle) {
46: return new SideWinderItemViewPresentation(parent, site, false,
47: true, SWT.HORIZONTAL | SWT.TOP);
48: }
49: }
|