1 package org.argeo.support.freemarker.ui;
2
3 import javax.jcr.Node;
4 import javax.jcr.RepositoryException;
5
6 import org.eclipse.swt.widgets.Composite;
7 import org.eclipse.swt.widgets.Control;
8
9 public class Html {
10 private String template;
11 private Node context;
12
13 private Control control;
14
15 public Html(Composite parent, String template, Node context) throws RepositoryException {
16 this.template = template;
17 this.context = context;
18 this.control = new FmUiProvider(this.template).createUi(parent, context);
19 }
20
21 public Html(Composite parent, String template) throws RepositoryException {
22 this(parent, template, null);
23 }
24
25 public String getTemplate() {
26 return template;
27 }
28
29 public Node getContext() {
30 return context;
31 }
32
33 public Control getControl() {
34 return control;
35 }
36
37 }