1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
\r
3 * in Industry THTH ry.
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.selectionview;
\r
14 import org.eclipse.swt.widgets.Composite;
\r
15 import org.eclipse.ui.IWorkbenchSite;
\r
16 import org.eclipse.ui.part.IPageSite;
\r
17 import org.eclipse.ui.part.PageBook;
\r
18 import org.simantics.db.management.ISessionContext;
\r
19 import org.simantics.selectionview.ComparableTabContributor;
\r
20 import org.simantics.selectionview.SelectionProcessor;
\r
23 * A {@link PropertyTabContributor} is used to encapsulate initialization of the
\r
24 * controls of a single tab control within a tabbed property page.
\r
25 * PropertyTabContributors are created internally by {@link SelectionProcessor}
\r
29 * {@link ComparableTabContributor} is used for ordering a set of
\r
30 * {@link PropertyTabContributor}s according to their designated priority. This
\r
31 * is necessary to make the tabbed UI presentation order deterministic.
\r
33 * @author Tuukka Lehtonen
\r
35 * @see ComparableTabContributor
\r
37 public interface PropertyTabContributor {
\r
40 * Creates and initializes a property tab (see {@link IPropertyTab}).
\r
42 * @param parent the parent composite for the property tab to create
\r
43 * @param site site of the {@link PageBook} page this TabbedPropertyTable
\r
44 * contributes to (see {@link IPageSite})
\r
45 * @param context the current database session context
\r
46 * @param input processed input provided internally by
\r
47 * {@link SelectionProcessor} implementations. Do not pass this on,
\r
48 * to get input for property tab, wait for invocations to
\r
49 * {@link IPropertyTab#setInput(ISessionContext, org.eclipse.jface.viewers.ISelection, boolean)}
\r
51 * @return the created property tab control
\r
53 IPropertyTab create(Composite parent, IWorkbenchSite site, ISessionContext context, Object input);
\r