]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.document.server/src/org/simantics/document/server/client/WidgetManager.java
ab0b8cf87503437c38f16f2e9f19cd98dafcd7e0
[simantics/platform.git] / bundles / org.simantics.document.server / src / org / simantics / document / server / client / WidgetManager.java
1 /*******************************************************************************
2  * Copyright (c) 2019 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  *     Semantum Oy - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.document.server.client;
13
14 import java.util.TreeMap;
15
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;
20
21 public interface WidgetManager<D extends Document, W> {
22
23         public W createWidget(JSONObject object);
24
25         public void updateProperties(D document, JSONObject object, W widget);
26
27         public void updateChildren(D document, JSONObject object, W widget, TreeMap<String, WidgetData> childMap);
28
29         public IEventCommand eventCommand(D document, JSONObject object, W widget, ICommand command, CommandContext context);
30
31         public String getProperty(D document, JSONObject object, W widget, String property);
32
33 }