]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.g2d/src/org/simantics/g2d/canvas/IContentContext.java
Let the request processor handle the exceptions
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / canvas / IContentContext.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 package org.simantics.g2d.canvas;
13
14 import org.simantics.g2d.canvas.impl.PaintableContextImpl;
15 import org.simantics.utils.threads.IThreadWorkQueue;
16
17
18 /**
19  * 
20  * @See {@link PaintableContextImpl}
21  * @author Toni Kalajainen
22  */
23 public interface IContentContext {
24
25         
26     /**
27      * Marks the canvas dirty. It will be repainted later. 
28      */
29     void setDirty();
30     void addPaintableContextListener(IContentListener listener);
31     void addPaintableContextListener(IContentListener listener, IThreadWorkQueue thread);    
32     void removePaintableContextListener(IContentListener listener);        
33     void removePaintableContextListener(IContentListener listener, IThreadWorkQueue thread);        
34     
35     public interface IContentListener {
36
37         /** 
38          * Notification for canvas becoming dirty
39          * 
40          * @param sender the context
41          */
42         public void onDirty(IContentContext sender);    
43     }    
44     
45 }