1 /*******************************************************************************
2 * Copyright (c) 2019 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 * Semantum Oy - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.document.server.client;
14 import java.util.TreeMap;
16 import org.simantics.document.server.IEventCommand;
17 import org.simantics.document.server.JSONObject;
18 import org.simantics.document.server.io.CommandContext;
19 import org.simantics.document.server.io.ICommand;
21 public interface WidgetManager<D extends Document, W> {
23 public W createWidget(JSONObject object);
25 public void updateProperties(D document, JSONObject object, W widget);
27 public void updateChildren(D document, JSONObject object, W widget, TreeMap<String, WidgetData> childMap);
29 public IEventCommand eventCommand(D document, JSONObject object, W widget, ICommand command, CommandContext context);
31 public String getProperty(D document, JSONObject object, W widget, String property);