1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.browsing.ui.content;
14 import java.util.Collection;
16 import org.simantics.browsing.ui.GraphExplorer;
17 import org.simantics.browsing.ui.NodeContext;
18 import org.simantics.browsing.ui.PrimitiveQueryUpdater;
21 * A Viewpoint is used for describing the child node generation of a single UI
22 * (e.g. tree) node. Viewpoints are created on a per UI node basis, including
23 * the invisible root input of provided to
24 * {@link GraphExplorer#setRoot(Object)}. Viewpoints are created by
25 * {@link ViewpointFactory}s.
28 * A Viewpoint is responsible for informing of any changes happening in the set
29 * of children provided by it. Updates are performed using the
30 * {@link PrimitiveQueryUpdater} received by the {@link ViewpointFactory} that
31 * created the Viewpoint. To signal that the set of children has (possibly)
33 * {@link PrimitiveQueryUpdater#scheduleReplace(NodeContext, org.simantics.browsing.ui.NodeContext.PrimitiveQueryKey, Object)}
34 * and eventually the query system will re-request the viewpoint for the new
38 * @author Antti Villberg
42 public interface ContributionViewpoint {
44 Collection<ViewpointContributionFactory> getContributions();