X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.g2d%2Fsrc%2Forg%2Fsimantics%2Fg2d%2Felementclass%2Fcanvas%2FCanvasClass.java;h=ae4708fd380f5a8e86aada25e46e98373407f871;hp=f0d713d76f2bdea49c7157678918d7d1ce649808;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.g2d/src/org/simantics/g2d/elementclass/canvas/CanvasClass.java b/bundles/org.simantics.g2d/src/org/simantics/g2d/elementclass/canvas/CanvasClass.java index f0d713d76..ae4708fd3 100644 --- a/bundles/org.simantics.g2d/src/org/simantics/g2d/elementclass/canvas/CanvasClass.java +++ b/bundles/org.simantics.g2d/src/org/simantics/g2d/elementclass/canvas/CanvasClass.java @@ -1,71 +1,71 @@ -/******************************************************************************* - * 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.elementclass.canvas; - -import org.simantics.g2d.canvas.ICanvasContext; -import org.simantics.g2d.diagram.DiagramHints; -import org.simantics.g2d.element.ElementClass; -import org.simantics.g2d.element.handler.impl.BorderColorImpl; -import org.simantics.g2d.element.handler.impl.DefaultTransform; -import org.simantics.g2d.element.handler.impl.FillColorImpl; -import org.simantics.g2d.element.handler.impl.Resizeable; -import org.simantics.utils.datastructures.hints.IHintContext.Key; -import org.simantics.utils.datastructures.hints.IHintContext.KeyOf; - -/** - * @author Toni Kalajainen - */ -public class CanvasClass { - - public static final Key KEY_CANVAS = new KeyOf(ICanvasContext.class); - - /** - * Class that paints canvas as an element - * Keys: - * {@link CanvasPainter}.KEY_CANVAS - */ - public static final ElementClass CANVAS_CLASS = - ElementClass.compile( - Resizeable.UNCONSTRICTED, - DefaultTransform.INSTANCE, - CanvasPainter.INSTANCE - ); - - /** - * Class that previews another diagram - * Keys: - * {@link DiagramHints}.KEY_DIAGRAM - * {@link DiagramPainter}.KEY_VIEWPORT - */ - public static final ElementClass DIAGRAM_CLASS = - ElementClass.compile( - Resizeable.UNCONSTRICTED, - DefaultTransform.INSTANCE, - DiagramPainter.INSTANCE - ); - - /** - * Class that previews an element of another diagram. - * Keys: - * {@link ElementViewport}.KEY_ELEMENT - */ - public static final ElementClass ELEMENT_VIEWPORT_CLASS = - ElementClass.compile( - FillColorImpl.UNSET, - BorderColorImpl.UNSET, - Resizeable.UNCONSTRICTED, - DefaultTransform.INSTANCE, - ElementViewport.INSTANCE, - DiagramPainter.INSTANCE - ); - -} +/******************************************************************************* + * 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.elementclass.canvas; + +import org.simantics.g2d.canvas.ICanvasContext; +import org.simantics.g2d.diagram.DiagramHints; +import org.simantics.g2d.element.ElementClass; +import org.simantics.g2d.element.handler.impl.BorderColorImpl; +import org.simantics.g2d.element.handler.impl.DefaultTransform; +import org.simantics.g2d.element.handler.impl.FillColorImpl; +import org.simantics.g2d.element.handler.impl.Resizeable; +import org.simantics.utils.datastructures.hints.IHintContext.Key; +import org.simantics.utils.datastructures.hints.IHintContext.KeyOf; + +/** + * @author Toni Kalajainen + */ +public class CanvasClass { + + public static final Key KEY_CANVAS = new KeyOf(ICanvasContext.class); + + /** + * Class that paints canvas as an element + * Keys: + * {@link CanvasPainter}.KEY_CANVAS + */ + public static final ElementClass CANVAS_CLASS = + ElementClass.compile( + Resizeable.UNCONSTRICTED, + DefaultTransform.INSTANCE, + CanvasPainter.INSTANCE + ); + + /** + * Class that previews another diagram + * Keys: + * {@link DiagramHints}.KEY_DIAGRAM + * {@link DiagramPainter}.KEY_VIEWPORT + */ + public static final ElementClass DIAGRAM_CLASS = + ElementClass.compile( + Resizeable.UNCONSTRICTED, + DefaultTransform.INSTANCE, + DiagramPainter.INSTANCE + ); + + /** + * Class that previews an element of another diagram. + * Keys: + * {@link ElementViewport}.KEY_ELEMENT + */ + public static final ElementClass ELEMENT_VIEWPORT_CLASS = + ElementClass.compile( + FillColorImpl.UNSET, + BorderColorImpl.UNSET, + Resizeable.UNCONSTRICTED, + DefaultTransform.INSTANCE, + ElementViewport.INSTANCE, + DiagramPainter.INSTANCE + ); + +}