]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.document.swt.core/src/org/simantics/document/swt/core/widget/FillComposite.java
Improvements to modelled SWT documents
[simantics/platform.git] / bundles / org.simantics.document.swt.core / src / org / simantics / document / swt / core / widget / FillComposite.java
index 998be35727487003ea3ca1036557d0aa4b64a1f5..2a92068c77baf0eabf5aa2aecbe81a06941fbb48 100644 (file)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2019 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:
+ *     Semantum Oy - initial API and implementation
+ *******************************************************************************/
 package org.simantics.document.swt.core.widget;
 
 import java.util.TreeMap;
@@ -7,7 +18,6 @@ import org.eclipse.jface.layout.GridLayoutFactory;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
-import org.simantics.document.server.IEventCommand;
 import org.simantics.document.server.JSONObject;
 import org.simantics.document.server.client.WidgetData;
 import org.simantics.document.swt.core.SWTDocument;
@@ -29,23 +39,18 @@ public class FillComposite extends HasWidgetsWidgetManager<Composite> {
 //             result.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_RED));
                return result;
        }
-       
+
        @SuppressWarnings("unchecked")
        @Override
        public void updateChildren(SWTDocument document, JSONObject object, WidgetContainer widget, TreeMap<String, WidgetData> childMap) {
-               
+
                super.updateChildren(document, object, widget, childMap);
 
                WidgetData child = childMap.values().iterator().next();
                WidgetContainer container = (WidgetContainer)child.widget;
                if(container.getControl() == null) return;
                GridDataFactory.fillDefaults().grab(true, true).minSize(1, 1).applyTo((Control)container.getControl());
-               
-       }
-       
-       @Override
-       public IEventCommand eventCommand(SWTDocument document, JSONObject object, WidgetContainer widget, String command) {
-           return null;
+
        }
-       
+
 }