]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.selectionview/src/org/simantics/selectionview/PropertyTabContributor.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.selectionview / src / org / simantics / selectionview / PropertyTabContributor.java
diff --git a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/PropertyTabContributor.java b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/PropertyTabContributor.java
new file mode 100644 (file)
index 0000000..d618aa4
--- /dev/null
@@ -0,0 +1,55 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
+ * in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.selectionview;\r
+\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.ui.IWorkbenchSite;\r
+import org.eclipse.ui.part.IPageSite;\r
+import org.eclipse.ui.part.PageBook;\r
+import org.simantics.db.management.ISessionContext;\r
+import org.simantics.selectionview.ComparableTabContributor;\r
+import org.simantics.selectionview.SelectionProcessor;\r
+\r
+/**\r
+ * A {@link PropertyTabContributor} is used to encapsulate initialization of the\r
+ * controls of a single tab control within a tabbed property page.\r
+ * PropertyTabContributors are created internally by {@link SelectionProcessor}\r
+ * implementations.\r
+ * \r
+ * <p>\r
+ * {@link ComparableTabContributor} is used for ordering a set of\r
+ * {@link PropertyTabContributor}s according to their designated priority. This\r
+ * is necessary to make the tabbed UI presentation order deterministic.\r
+ * \r
+ * @author Tuukka Lehtonen\r
+ * \r
+ * @see ComparableTabContributor\r
+ */\r
+public interface PropertyTabContributor {\r
+\r
+    /**\r
+     * Creates and initializes a property tab (see {@link IPropertyTab}).\r
+     * \r
+     * @param parent the parent composite for the property tab to create\r
+     * @param site site of the {@link PageBook} page this TabbedPropertyTable\r
+     *        contributes to (see {@link IPageSite})\r
+     * @param context the current database session context\r
+     * @param input processed input provided internally by\r
+     *        {@link SelectionProcessor} implementations. Do not pass this on,\r
+     *        to get input for property tab, wait for invocations to\r
+     *        {@link IPropertyTab#setInput(ISessionContext, org.eclipse.jface.viewers.ISelection, boolean)}\r
+     *        instead\r
+     * @return the created property tab control\r
+     */\r
+    IPropertyTab create(Composite parent, IWorkbenchSite site, ISessionContext context, Object input);\r
+\r
+}
\ No newline at end of file