X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.g2d%2Fsrc%2Forg%2Fsimantics%2Fg2d%2Felement%2Fhandler%2FAdapter.java;h=8533090072951beb5cbd556107dd0722c7972d38;hb=a43df9e895f022132f9b94dfedeae78fb4eed712;hp=3f5e50274226a884343724895b618a0a645b38db;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/Adapter.java b/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/Adapter.java index 3f5e50274..853309007 100644 --- a/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/Adapter.java +++ b/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/Adapter.java @@ -1,40 +1,40 @@ -/******************************************************************************* - * 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.g2d.element.handler; - -import org.simantics.g2d.element.ElementClass; -import org.simantics.g2d.element.ElementUtils; -import org.simantics.g2d.element.handler.impl.StaticObjectAdapter; - -/** - * This handler makes it possible to add adapters to different objects into an - * {@link ElementClass}. An element can have multiple Adapter handlers. For - * adaption, they are processed in the order of definition within the - * {@link ElementClass} and adaption should return the first - * non-null result returned by the any Adapter implementation. - * - *

- * See {@link ElementUtils#adapt(org.simantics.g2d.element.IElement, Class)} for - * a utility that implements the above logic. - *

- * - * @author Tuukka Lehtonen - * @see StaticObjectAdapter - */ -public interface Adapter extends ElementHandler { - - /** - * @return - */ - T adapt(Class toClass); - +/******************************************************************************* + * 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.g2d.element.handler; + +import org.simantics.g2d.element.ElementClass; +import org.simantics.g2d.element.ElementUtils; +import org.simantics.g2d.element.handler.impl.StaticObjectAdapter; + +/** + * This handler makes it possible to add adapters to different objects into an + * {@link ElementClass}. An element can have multiple Adapter handlers. For + * adaption, they are processed in the order of definition within the + * {@link ElementClass} and adaption should return the first + * non-null result returned by the any Adapter implementation. + * + *

+ * See {@link ElementUtils#adapt(org.simantics.g2d.element.IElement, Class)} for + * a utility that implements the above logic. + *

+ * + * @author Tuukka Lehtonen + * @see StaticObjectAdapter + */ +public interface Adapter extends ElementHandler { + + /** + * @return + */ + T adapt(Class toClass); + } \ No newline at end of file