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
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
14 * @author Toni Kalajainen
\r
16 package org.simantics.g2d.chassis;
\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
24 * Canvas chassis is a user operable base for canvas contexts
\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
31 public interface ICanvasChassis {
\r
34 * Get the hint context of the chassis
\r
37 IHintContext getHintContext();
\r
40 * Set canvas context into the chassis
\r
42 void setCanvasContext(ICanvasContext canvasContext);
\r
45 * Get canvas context
\r
46 * @return <code>null</code> if the chassis has no canvas context at the moment
\r
48 ICanvasContext getCanvasContext();
\r
51 * Add chassis listener
\r
52 * @param threadAccess
\r
55 void addChassisListener(IThreadWorkQueue threadAccess, IChassisListener listener);
\r
59 * @param threadAccess
\r
62 void removeChassisListener(IThreadWorkQueue threadAccess, IChassisListener listener);
\r
68 void addChassisListener(IChassisListener listener);
\r
74 void removeChassisListener(IChassisListener listener);
\r