]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scenegraph.profile/src/org/simantics/scenegraph/profile/Group.java
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / bundles / org.simantics.scenegraph.profile / src / org / simantics / scenegraph / profile / Group.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
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
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.scenegraph.profile;
13
14 import org.simantics.db.RequestProcessor;
15 import org.simantics.db.Resource;
16 import org.simantics.db.exception.DatabaseException;
17 import org.simantics.db.procedure.SetListener;
18
19
20 /**
21  * Groups are a part of the diagram profile framework. They are used to form and
22  * keep track of the group of objects on which {@link Style}s operate.
23  * 
24  * @author Antti Villberg
25  */
26 public interface Group {
27
28     /**
29      * Allows styles to start tracking the set of objects (resources) listed by
30      * this Group implementation through the specified {@link SetListener}.
31      * 
32      * @param processor graph database access handle
33      * @param runtimeDiagram runtime resource of the active diagram editor
34      *        instance
35      * @param configuration variable access to the diagram's mapped
36      *        configuration
37      * @param listener the listener to notify of changes in the tracked set of
38      *        objects. Usually one just delegates normal database listener
39      *        events to this listener.
40      */
41     void trackItems(RequestProcessor processor, Resource runtimeDiagram, SetListener<Resource> listener) throws DatabaseException;
42
43 }