1 package org.simantics.views.swt.loader;
3 import org.simantics.db.Resource;
4 import org.simantics.db.exception.DatabaseException;
5 import org.simantics.db.layer0.variable.Variable;
6 import org.simantics.scenegraph.ParentNode;
7 import org.simantics.scenegraph.loader.ScenegraphLoader;
8 import org.simantics.views.swt.client.base.ISWTViewNode;
9 import org.simantics.views.swt.client.impl.SWTScrolledComposite;
11 public class ScrolledCompositeLoader implements ScenegraphLoader {
13 final private Resource configuration;
15 public ScrolledCompositeLoader(Resource configuration) {
16 this.configuration = configuration;
20 public ISWTViewNode create(ParentNode<ISWTViewNode> parent, Variable context) throws DatabaseException {
22 SWTScrolledComposite node = parent.addNode(SWTScrolledComposite.class);
24 node.setLayoutData(LoaderUtils.getGridData(configuration));
25 node.setLayout(LoaderUtils.getLayout(configuration));
26 node.setStyle(LoaderUtils.getStyle(configuration));