]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.g2d/src/org/simantics/g2d/chassis/ICanvasChassis.java
G2DParentNode handles "undefined" child bounds separately
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / chassis / ICanvasChassis.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
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
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 /*
13  *
14  * @author Toni Kalajainen
15  */
16 package org.simantics.g2d.chassis;
17
18 import org.simantics.g2d.canvas.ICanvasContext;
19 import org.simantics.utils.datastructures.hints.IHintContext;
20 import org.simantics.utils.threads.IThreadWorkQueue;
21
22
23 /**
24  * Canvas chassis is a user operable base for canvas contexts
25  *
26  * @See {@link AWTChassis}
27  * @See {@link SWTChassis}
28  * @See {@link FullscreenChassis} Full screen chassis
29  * @See {@link ImageChassis} Renders to a bitmap
30  */
31 public interface ICanvasChassis {
32
33     /**
34      * Get the hint context of the chassis
35      * @return
36      */
37     IHintContext getHintContext();
38     
39     /**
40      * Set canvas context into the chassis
41      */
42     void setCanvasContext(ICanvasContext canvasContext);
43     
44     /**
45      * Get canvas context
46      * @return <code>null</code> if the chassis has no canvas context at the moment
47      */
48     ICanvasContext getCanvasContext();
49     
50     /**
51      * Add chassis listener
52      * @param threadAccess
53      * @param listener
54      */
55     void addChassisListener(IThreadWorkQueue threadAccess, IChassisListener listener);
56     
57     /**
58      * 
59      * @param threadAccess
60      * @param listener
61      */
62     void removeChassisListener(IThreadWorkQueue threadAccess, IChassisListener listener);
63     
64     /**
65      * 
66      * @param listener
67      */
68     void addChassisListener(IChassisListener listener);
69     
70     /**
71      * 
72      * @param listener
73      */
74     void removeChassisListener(IChassisListener listener);
75     
76 }