]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scenegraph.profile/src/org/simantics/scenegraph/profile/Observer.java
48dce8fd2b271d78b96a8348d22bf7b466c1a735
[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      * For logging exceptional situations that occur within profile entries or
31      * styles.
32      * 
33      * @param throwable
34      */
35     void exception(Throwable throwable);
36
37     /**
38      * @return <code>true</code> if this profile system instance has been shut
39      *         down, <code>false</code> otherwise
40      */
41     boolean isDisposed();
42
43 }