]> git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.cms/src/org/argeo/cms/SimpleStaticPage.java
1cb030028ce2becf31ca4273efab0d7278753dd8
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / SimpleStaticPage.java
1 package org.argeo.cms;
2
3 import javax.jcr.Node;
4 import javax.jcr.RepositoryException;
5
6 import org.eclipse.rap.rwt.RWT;
7 import org.eclipse.swt.SWT;
8 import org.eclipse.swt.widgets.Composite;
9 import org.eclipse.swt.widgets.Control;
10 import org.eclipse.swt.widgets.Label;
11
12 public class SimpleStaticPage implements CmsUiProvider {
13 private String text;
14
15 @Override
16 public Control createUi(Composite parent, Node context)
17 throws RepositoryException {
18 Label textC = new Label(parent, SWT.WRAP);
19 textC.setData(RWT.CUSTOM_VARIANT, CmsStyles.CMS_STATIC_TEXT);
20 textC.setData(RWT.MARKUP_ENABLED, Boolean.TRUE);
21 textC.setText(text);
22
23 return textC;
24 }
25
26 public void setText(String text) {
27 this.text = text;
28 }
29
30 }