X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.document.swt.core%2Fsrc%2Forg%2Fsimantics%2Fdocument%2Fswt%2Fcore%2Fwidget%2FGridComposite.java;h=199fc0f488b2087a20c7e092b063ae2e4490547e;hb=e4ffdffae875e518a4eb070b8bda6ead1a9843d3;hp=ce2538c03e9eefb82aa9645c523a7cd6ec36c14b;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.document.swt.core/src/org/simantics/document/swt/core/widget/GridComposite.java b/bundles/org.simantics.document.swt.core/src/org/simantics/document/swt/core/widget/GridComposite.java index ce2538c03..199fc0f48 100644 --- a/bundles/org.simantics.document.swt.core/src/org/simantics/document/swt/core/widget/GridComposite.java +++ b/bundles/org.simantics.document.swt.core/src/org/simantics/document/swt/core/widget/GridComposite.java @@ -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 org.eclipse.jface.layout.GridLayoutFactory; @@ -17,11 +28,11 @@ public class GridComposite extends HasWidgetsWidgetManager { @Override protected Composite doCreateControl(SWTDocument document, Composite parent, JSONObject object) { - + MarginsBean extendedMargins = object.getBeanJSONFieldDefault("extendedMargins", MarginsBean.BINDING, new MarginsBean(0, 0, 0, 0)); - RGB.Integer background = object.getBeanJSONFieldDefault("background", RGB.Integer.BINDING, new RGB.Integer(255,0, 0)); + RGB.Integer background = object.getBeanJSONFieldDefault("background", RGB.Integer.BINDING, new RGB.Integer(255, 255, 255)); Integer numColumns = object.getJSONFieldDefault("numColumns", 1); - + Composite result = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults(). numColumns(numColumns). @@ -30,7 +41,7 @@ public class GridComposite extends HasWidgetsWidgetManager { applyTo(result); result.setBackground(document.getColor(background)); return result; - + } - + }