1 /*******************************************************************************
\r
2 * Copyright (c) 2010 Association for Decentralized Information Management in
\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.sysdyn.ui.elements.connections;
\r
14 import org.simantics.db.AsyncReadGraph;
\r
15 import org.simantics.db.Resource;
\r
16 import org.simantics.db.procedure.AsyncProcedure;
\r
17 import org.simantics.diagram.adapter.ElementFactoryAdapter;
\r
18 import org.simantics.g2d.canvas.ICanvasContext;
\r
19 import org.simantics.g2d.diagram.IDiagram;
\r
20 import org.simantics.g2d.element.ElementClass;
\r
23 * An element class factory for sysdyn dependency connection edge segments.
\r
25 * @author Tuukka Lehtonen
\r
27 public class DependencyEdgeFactory extends ElementFactoryAdapter {
\r
29 private static final ElementClass CLASS = DependencyEdgeClass.CLASS;
\r
32 public void create(AsyncReadGraph graph, ICanvasContext canvas, IDiagram diagram, Resource elementType,
\r
33 AsyncProcedure<ElementClass> procedure) {
\r
34 procedure.execute(graph, CLASS);
\r
38 public void getClass(AsyncReadGraph graph, ICanvasContext canvas, IDiagram diagram, Resource elementResource,
\r
39 AsyncProcedure<ElementClass> procedure) {
\r
40 procedure.execute(graph, CLASS);
\r