-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.g2d.elementclass.canvas;\r
-\r
-import org.simantics.g2d.canvas.ICanvasContext;\r
-import org.simantics.g2d.diagram.DiagramHints;\r
-import org.simantics.g2d.element.ElementClass;\r
-import org.simantics.g2d.element.handler.impl.BorderColorImpl;\r
-import org.simantics.g2d.element.handler.impl.DefaultTransform;\r
-import org.simantics.g2d.element.handler.impl.FillColorImpl;\r
-import org.simantics.g2d.element.handler.impl.Resizeable;\r
-import org.simantics.utils.datastructures.hints.IHintContext.Key;\r
-import org.simantics.utils.datastructures.hints.IHintContext.KeyOf;\r
-\r
-/**\r
- * @author Toni Kalajainen\r
- */\r
-public class CanvasClass {\r
-\r
- public static final Key KEY_CANVAS = new KeyOf(ICanvasContext.class);\r
-\r
- /**\r
- * Class that paints canvas as an element\r
- * Keys:\r
- * {@link CanvasPainter}.KEY_CANVAS\r
- */\r
- public static final ElementClass CANVAS_CLASS =\r
- ElementClass.compile(\r
- Resizeable.UNCONSTRICTED,\r
- DefaultTransform.INSTANCE,\r
- CanvasPainter.INSTANCE\r
- );\r
-\r
- /**\r
- * Class that previews another diagram\r
- * Keys:\r
- * {@link DiagramHints}.KEY_DIAGRAM\r
- * {@link DiagramPainter}.KEY_VIEWPORT\r
- */\r
- public static final ElementClass DIAGRAM_CLASS =\r
- ElementClass.compile(\r
- Resizeable.UNCONSTRICTED,\r
- DefaultTransform.INSTANCE,\r
- DiagramPainter.INSTANCE\r
- );\r
-\r
- /**\r
- * Class that previews an element of another diagram.\r
- * Keys:\r
- * {@link ElementViewport}.KEY_ELEMENT\r
- */\r
- public static final ElementClass ELEMENT_VIEWPORT_CLASS =\r
- ElementClass.compile(\r
- FillColorImpl.UNSET,\r
- BorderColorImpl.UNSET,\r
- Resizeable.UNCONSTRICTED,\r
- DefaultTransform.INSTANCE,\r
- ElementViewport.INSTANCE,\r
- DiagramPainter.INSTANCE\r
- );\r
-\r
-}\r
+/*******************************************************************************
+ * 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
+ );
+
+}