1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.g2d.elementclass.canvas;
14 import org.simantics.g2d.canvas.ICanvasContext;
15 import org.simantics.g2d.diagram.DiagramHints;
16 import org.simantics.g2d.element.ElementClass;
17 import org.simantics.g2d.element.handler.impl.BorderColorImpl;
18 import org.simantics.g2d.element.handler.impl.DefaultTransform;
19 import org.simantics.g2d.element.handler.impl.FillColorImpl;
20 import org.simantics.g2d.element.handler.impl.Resizeable;
21 import org.simantics.utils.datastructures.hints.IHintContext.Key;
22 import org.simantics.utils.datastructures.hints.IHintContext.KeyOf;
25 * @author Toni Kalajainen
27 public class CanvasClass {
29 public static final Key KEY_CANVAS = new KeyOf(ICanvasContext.class);
32 * Class that paints canvas as an element
34 * {@link CanvasPainter}.KEY_CANVAS
36 public static final ElementClass CANVAS_CLASS =
38 Resizeable.UNCONSTRICTED,
39 DefaultTransform.INSTANCE,
40 CanvasPainter.INSTANCE
44 * Class that previews another diagram
46 * {@link DiagramHints}.KEY_DIAGRAM
47 * {@link DiagramPainter}.KEY_VIEWPORT
49 public static final ElementClass DIAGRAM_CLASS =
51 Resizeable.UNCONSTRICTED,
52 DefaultTransform.INSTANCE,
53 DiagramPainter.INSTANCE
57 * Class that previews an element of another diagram.
59 * {@link ElementViewport}.KEY_ELEMENT
61 public static final ElementClass ELEMENT_VIEWPORT_CLASS =
64 BorderColorImpl.UNSET,
65 Resizeable.UNCONSTRICTED,
66 DefaultTransform.INSTANCE,
67 ElementViewport.INSTANCE,
68 DiagramPainter.INSTANCE