1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2012 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
12 package org.simantics.browsing.ui.swt.widgets.impl;
\r
14 import org.eclipse.jface.resource.ResourceManager;
\r
15 import org.simantics.db.ReadGraph;
\r
16 import org.simantics.db.exception.DatabaseException;
\r
18 public interface WidgetSupport {
\r
21 * The key for {@link #setParameter(String, Object)} used to associate a
\r
22 * {@link ResourceManager} instance with this widget support context.
\r
23 * Widgets that need to load resources (fonts, colors or images) need this.
\r
25 public static final String RESOURCE_MANAGER = "resourceManager";
\r
27 public static final Object NO_INPUT = new Object();
\r
30 * The widget is set to receive input updates from this support
\r
32 void register(Widget widget);
\r
34 * Updates will start only after this call
\r
38 * Force update of widget
\r
40 void update(Widget widget);
\r
42 * Force update of all widgets
\r
46 * Query current input
\r
50 <T> T getParameter(String key);
\r
51 void setParameter(String key, Object value);
\r
53 <T> T getInput(ReadGraph graph) throws DatabaseException;
\r