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.browsing.ui.content;
\r
14 import java.util.Collection;
\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
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
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
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
38 * @author Antti Villberg
\r
40 * @see ViewpointStub
\r
42 public interface ContributionViewpoint {
\r
44 Collection<ViewpointContributionFactory> getContributions();
\r