]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.browsing.ui/src/org/simantics/browsing/ui/content/ContributionViewpoint.java
8fcbf90ea338b5e75c5187dbd1fcf43bbd5d36d2
[simantics/platform.git] / bundles / org.simantics.browsing.ui / src / org / simantics / browsing / ui / content / ContributionViewpoint.java
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
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.browsing.ui.content;\r
13 \r
14 import java.util.Collection;\r
15 \r
16 import org.simantics.browsing.ui.GraphExplorer;\r
17 import org.simantics.browsing.ui.NodeContext;\r
18 import org.simantics.browsing.ui.PrimitiveQueryUpdater;\r
19 \r
20 /**\r
21  * A Viewpoint is used for describing the child node generation of a single UI\r
22  * (e.g. tree) node. Viewpoints are created on a per UI node basis, including\r
23  * the invisible root input of provided to\r
24  * {@link GraphExplorer#setRoot(Object)}. Viewpoints are created by\r
25  * {@link ViewpointFactory}s.\r
26  * \r
27  * <p>\r
28  * A Viewpoint is responsible for informing of any changes happening in the set\r
29  * of children provided by it. Updates are performed using the\r
30  * {@link PrimitiveQueryUpdater} received by the {@link ViewpointFactory} that\r
31  * created the Viewpoint. To signal that the set of children has (possibly)\r
32  * changed, invoke\r
33  * {@link PrimitiveQueryUpdater#scheduleReplace(NodeContext, org.simantics.browsing.ui.NodeContext.PrimitiveQueryKey, Object)}\r
34  * and eventually the query system will re-request the viewpoint for the new\r
35  * children.\r
36  * </p>\r
37  * \r
38  * @author Antti Villberg\r
39  * \r
40  * @see ViewpointStub\r
41  */\r
42 public interface ContributionViewpoint {\r
43 \r
44     Collection<ViewpointContributionFactory> getContributions();\r
45 \r
46 }\r