]> git.argeo.org Git - gpl/argeo-suite.git/blob - publishing/org.argeo.publishing.ui/src/org/argeo/cms/text/CustomTextEditor.java
Make constants private.
[gpl/argeo-suite.git] / publishing / org.argeo.publishing.ui / src / org / argeo / cms / text / 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 public class CustomTextEditor extends AbstractTextViewer {
17 private static final long serialVersionUID = 5277789504209413500L;
18
19 public CustomTextEditor(Composite parent, int style, Node textNode,
20 CmsEditable cmsEditable) throws RepositoryException {
21 this(new Section(parent, style, textNode), style, cmsEditable);
22 }
23
24 public CustomTextEditor(Section mainSection, int style,
25 CmsEditable cmsEditable) throws RepositoryException {
26 super(mainSection, style, cmsEditable);
27 mainSection.setLayoutData(fillWidth());
28 }
29
30 @Override
31 public Section getMainSection() {
32 return super.getMainSection();
33 }
34 }