]> git.argeo.org Git - gpl/argeo-suite.git/blob - CustomTextEditor.java
c7690c71e68636c0f64a391099d6c4f416e0e255
[gpl/argeo-suite.git] / CustomTextEditor.java
1 package org.argeo.cms.text;
2
3 import static org.argeo.cms.ui.util.CmsUiUtils.fillWidth;
4
5 import javax.jcr.Node;
6 import javax.jcr.RepositoryException;
7
8 import org.argeo.cms.ui.CmsEditable;
9 import org.argeo.cms.ui.viewers.Section;
10 import org.eclipse.swt.widgets.Composite;
11
12 /**
13 * Manages hardcoded sections as an arbitrary hierarchy under the main section,
14 * which contains no text and no title.
15 */
16 @Deprecated
17 public class CustomTextEditor extends AbstractTextViewer {
18 private static final long serialVersionUID = 5277789504209413500L;
19
20 public CustomTextEditor(Composite parent, int style, Node textNode,
21 CmsEditable cmsEditable) throws RepositoryException {
22 this(new Section(parent, style, textNode), style, cmsEditable);
23 }
24
25 public CustomTextEditor(Section mainSection, int style,
26 CmsEditable cmsEditable) throws RepositoryException {
27 super(mainSection, style, cmsEditable);
28 mainSection.setLayoutData(fillWidth());
29 }
30
31 @Override
32 public Section getMainSection() {
33 return super.getMainSection();
34 }
35 }