]> git.argeo.org Git - gpl/argeo-suite.git/blob - publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/DocBookSectionTitle.java
[maven-release-plugin] prepare release argeo-suite-2.1.21
[gpl/argeo-suite.git] / publishing / org.argeo.publishing.ui / src / org / argeo / docbook / ui / DocBookSectionTitle.java
1 package org.argeo.docbook.ui;
2
3 import javax.jcr.Node;
4 import javax.jcr.RepositoryException;
5
6 import org.argeo.cms.text.TextSection;
7 import org.argeo.cms.ui.viewers.EditablePart;
8 import org.argeo.cms.ui.viewers.NodePart;
9 import org.argeo.cms.ui.widgets.EditableText;
10 import org.eclipse.swt.widgets.Composite;
11
12 /** The title of a section, based on an XML text node. */
13 public class DocBookSectionTitle extends EditableText implements EditablePart, NodePart {
14 private static final long serialVersionUID = -1787983154946583171L;
15
16 private final TextSection section;
17
18 public DocBookSectionTitle(Composite parent, int swtStyle, Node titleNode) throws RepositoryException {
19 super(parent, swtStyle, titleNode);
20 section = (TextSection) TextSection.findSection(this);
21 }
22
23 // @Override
24 public TextSection getSection() {
25 return section;
26 }
27
28 @Override
29 public Node getItem() throws RepositoryException {
30 return getNode();
31 }
32
33 // @Override
34 // public String getPartId() {
35 // return getNodeId();
36 // }
37
38 // @Override
39 // protected void setControlLayoutData(Control control) {
40 // super.setControlLayoutData(control);
41 // control.setLayoutData(new GridData(SWT.LEAD, SWT.CENTER, true, false));
42 // }
43 //
44 // @Override
45 // protected void setContainerLayoutData(Composite composite) {
46 // super.setContainerLayoutData(composite);
47 // composite.setLayoutData(new GridData(SWT.LEAD, SWT.BOTTOM, true, false));
48 // }
49
50 }