]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling.template2d.ui/src/org/simantics/modeling/template2d/ui/diagram/adapter/DiagramGroup.java
3c2756a668723d7de6fe8e3b6350ebadf936ad55
[simantics/platform.git] / bundles / org.simantics.modeling.template2d.ui / src / org / simantics / modeling / template2d / ui / diagram / adapter / DiagramGroup.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2012 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.modeling.template2d.ui.diagram.adapter;
13
14 import org.simantics.db.RequestProcessor;
15 import org.simantics.db.Resource;
16 import org.simantics.db.procedure.SetListener;
17 import org.simantics.scenegraph.profile.Group;
18
19 /**
20  * @author Tuukka Lehtonen
21  */
22 public class DiagramGroup implements Group {
23     
24     
25     @Override
26     public String toString() {
27         return "diagram";
28     }
29
30         @Override
31         public void trackItems(RequestProcessor processor, Resource runtimeDiagram, SetListener<Resource> listener) {
32                 listener.add(runtimeDiagram);
33         }
34         
35     @Override
36     public int hashCode() {
37         return this.getClass().hashCode();
38     }
39
40     @Override
41     public boolean equals(Object obj) {
42         return obj.getClass().equals(this.getClass());
43     }
44
45 }
46