X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.browsing.ui.swt%2Fsrc%2Forg%2Fsimantics%2Fbrowsing%2Fui%2Fswt%2Fwidgets%2Fimpl%2FWidgetSupport.java;h=bdfea568a0469bebc0a773da2539289de1a4aeb3;hp=d08f05879b8187c0230d7fab1c744657586cc8dc;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/widgets/impl/WidgetSupport.java b/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/widgets/impl/WidgetSupport.java index d08f05879..bdfea568a 100644 --- a/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/widgets/impl/WidgetSupport.java +++ b/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/widgets/impl/WidgetSupport.java @@ -1,55 +1,55 @@ -/******************************************************************************* - * Copyright (c) 2007, 2012 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.browsing.ui.swt.widgets.impl; - -import org.eclipse.jface.resource.ResourceManager; -import org.simantics.db.ReadGraph; -import org.simantics.db.exception.DatabaseException; - -public interface WidgetSupport { - - /** - * The key for {@link #setParameter(String, Object)} used to associate a - * {@link ResourceManager} instance with this widget support context. - * Widgets that need to load resources (fonts, colors or images) need this. - */ - public static final String RESOURCE_MANAGER = "resourceManager"; - - public static final Object NO_INPUT = new Object(); - - /* - * The widget is set to receive input updates from this support - */ - void register(Widget widget); - /* - * Updates will start only after this call - */ - void finish(); - /* - * Force update of widget - */ - void update(Widget widget); - /* - * Force update of all widgets - */ - void update(); - /* - * Query current input - */ - T getInput(); - - T getParameter(String key); - void setParameter(String key, Object value); - - T getInput(ReadGraph graph) throws DatabaseException; - -} +/******************************************************************************* + * Copyright (c) 2007, 2012 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.browsing.ui.swt.widgets.impl; + +import org.eclipse.jface.resource.ResourceManager; +import org.simantics.db.ReadGraph; +import org.simantics.db.exception.DatabaseException; + +public interface WidgetSupport { + + /** + * The key for {@link #setParameter(String, Object)} used to associate a + * {@link ResourceManager} instance with this widget support context. + * Widgets that need to load resources (fonts, colors or images) need this. + */ + public static final String RESOURCE_MANAGER = "resourceManager"; + + public static final Object NO_INPUT = new Object(); + + /* + * The widget is set to receive input updates from this support + */ + void register(Widget widget); + /* + * Updates will start only after this call + */ + void finish(); + /* + * Force update of widget + */ + void update(Widget widget); + /* + * Force update of all widgets + */ + void update(); + /* + * Query current input + */ + T getInput(); + + T getParameter(String key); + void setParameter(String key, Object value); + + T getInput(ReadGraph graph) throws DatabaseException; + +}