]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scenegraph.profile/src/org/simantics/scenegraph/profile/Observer.java
Preliminary implementation to update only changed profile entries
[simantics/platform.git] / bundles / org.simantics.scenegraph.profile / src / org / simantics / scenegraph / profile / Observer.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.scenegraph.profile;
13
14 /**
15  * Diagram profile observer interface is a channel for {@link ProfileEntry} and
16  * {@link Style} to request style re-application, log exceptions and track the
17  * current state of the profile system for a particular diagram instance.
18  * 
19  * TODO: add mechanism for partial style re-application
20  */
21 public interface Observer {
22
23     /**
24      * Notifies this profile system instance that a profile subsystem is
25      * requesting for style re-application for the whole diagram.
26      */
27     void update();
28     
29     /**
30      * Notifies this profile system instance that a profile subsystem is
31      * requesting for style re-application for the given item.
32      */
33     void update(Style style, Object item);
34
35     /**
36      * For logging exceptional situations that occur within profile entries or
37      * styles.
38      * 
39      * @param throwable
40      */
41     void exception(Throwable throwable);
42
43     /**
44      * @return <code>true</code> if this profile system instance has been shut
45      *         down, <code>false</code> otherwise
46      */
47     boolean isDisposed();
48
49 }