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.canvas;
14 import org.simantics.g2d.canvas.impl.PaintableContextImpl;
15 import org.simantics.utils.threads.IThreadWorkQueue;
20 * @See {@link PaintableContextImpl}
21 * @author Toni Kalajainen
23 public interface IContentContext {
27 * Marks the canvas dirty. It will be repainted later.
30 void addPaintableContextListener(IContentListener listener);
31 void addPaintableContextListener(IContentListener listener, IThreadWorkQueue thread);
32 void removePaintableContextListener(IContentListener listener);
33 void removePaintableContextListener(IContentListener listener, IThreadWorkQueue thread);
35 public interface IContentListener {
38 * Notification for canvas becoming dirty
40 * @param sender the context
42 public void onDirty(IContentContext sender);