X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.diagram%2Fsrc%2Forg%2Fsimantics%2Fdiagram%2Fadapter%2FDefaultConnectionEdgeClassFactory.java;h=f4e8f34850dfafa6be3b15973d58bd036110acb5;hb=617b9475710b80a125597f222f9777224972ce72;hp=1b7b8b7b1e5c6fe76e5c920b4712a2f3d4697c1e;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/DefaultConnectionEdgeClassFactory.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/DefaultConnectionEdgeClassFactory.java index 1b7b8b7b1..f4e8f3485 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/DefaultConnectionEdgeClassFactory.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/DefaultConnectionEdgeClassFactory.java @@ -1,47 +1,47 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.diagram.adapter; - -import org.simantics.db.AsyncReadGraph; -import org.simantics.db.Resource; -import org.simantics.db.procedure.AsyncProcedure; -import org.simantics.g2d.canvas.ICanvasContext; -import org.simantics.g2d.diagram.IDiagram; -import org.simantics.g2d.element.ElementClass; -import org.simantics.g2d.elementclass.connection.EdgeClass; - -/** - * An element class factory for connection edge segments. - * - * @author Tuukka Lehtonen - */ -public class DefaultConnectionEdgeClassFactory extends ElementFactoryAdapter { - - private static final ElementClass CLASS = EdgeClass.STRAIGHT; - - public static ElementClass create() { - return CLASS; - } - - @Override - public void create(AsyncReadGraph graph, ICanvasContext canvas, IDiagram diagram, Resource elementType, - AsyncProcedure procedure) { - procedure.execute(graph, CLASS); - } - - @Override - public void getClass(AsyncReadGraph graph, ICanvasContext canvas, IDiagram diagram, Resource elementResource, - AsyncProcedure procedure) { - procedure.execute(graph, CLASS); - } - -} +/******************************************************************************* + * Copyright (c) 2007, 2010 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.diagram.adapter; + +import org.simantics.db.AsyncReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.procedure.AsyncProcedure; +import org.simantics.g2d.canvas.ICanvasContext; +import org.simantics.g2d.diagram.IDiagram; +import org.simantics.g2d.element.ElementClass; +import org.simantics.g2d.elementclass.connection.EdgeClass; + +/** + * An element class factory for connection edge segments. + * + * @author Tuukka Lehtonen + */ +public class DefaultConnectionEdgeClassFactory extends ElementFactoryAdapter { + + private static final ElementClass CLASS = EdgeClass.STRAIGHT; + + public static ElementClass create() { + return CLASS; + } + + @Override + public void create(AsyncReadGraph graph, ICanvasContext canvas, IDiagram diagram, Resource elementType, + AsyncProcedure procedure) { + procedure.execute(graph, CLASS); + } + + @Override + public void getClass(AsyncReadGraph graph, ICanvasContext canvas, IDiagram diagram, Resource elementResource, + AsyncProcedure procedure) { + procedure.execute(graph, CLASS); + } + +}