]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.g2d/src/org/simantics/g2d/chassis/ICanvasChassis.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / chassis / ICanvasChassis.java
1 /*******************************************************************************\r
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
3  * in Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 /*\r
13  *\r
14  * @author Toni Kalajainen\r
15  */\r
16 package org.simantics.g2d.chassis;\r
17 \r
18 import org.simantics.g2d.canvas.ICanvasContext;\r
19 import org.simantics.utils.datastructures.hints.IHintContext;\r
20 import org.simantics.utils.threads.IThreadWorkQueue;\r
21 \r
22 \r
23 /**\r
24  * Canvas chassis is a user operable base for canvas contexts\r
25  *\r
26  * @See {@link AWTChassis}\r
27  * @See {@link SWTChassis}\r
28  * @See {@link FullscreenChassis} Full screen chassis\r
29  * @See {@link ImageChassis} Renders to a bitmap\r
30  */\r
31 public interface ICanvasChassis {\r
32 \r
33     /**\r
34      * Get the hint context of the chassis\r
35      * @return\r
36      */\r
37     IHintContext getHintContext();\r
38     \r
39     /**\r
40      * Set canvas context into the chassis\r
41      */\r
42     void setCanvasContext(ICanvasContext canvasContext);\r
43     \r
44     /**\r
45      * Get canvas context\r
46      * @return <code>null</code> if the chassis has no canvas context at the moment\r
47      */\r
48     ICanvasContext getCanvasContext();\r
49     \r
50     /**\r
51      * Add chassis listener\r
52      * @param threadAccess\r
53      * @param listener\r
54      */\r
55     void addChassisListener(IThreadWorkQueue threadAccess, IChassisListener listener);\r
56     \r
57     /**\r
58      * \r
59      * @param threadAccess\r
60      * @param listener\r
61      */\r
62     void removeChassisListener(IThreadWorkQueue threadAccess, IChassisListener listener);\r
63     \r
64     /**\r
65      * \r
66      * @param listener\r
67      */\r
68     void addChassisListener(IChassisListener listener);\r
69     \r
70     /**\r
71      * \r
72      * @param listener\r
73      */\r
74     void removeChassisListener(IChassisListener listener);\r
75     \r
76 }\r