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