+/*******************************************************************************
+ * 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;
@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).
applyTo(result);
result.setBackground(document.getColor(background));
return result;
-
+
}
-
+
}