]> git.argeo.org Git - lgpl/argeo-commons.git/blob - SectionTitle.java
24861ee0650ea2289b2e9e86cca98ea87d19aea5
[lgpl/argeo-commons.git] / SectionTitle.java
1 package org.argeo.cms.ui.internal.text;
2
3 import javax.jcr.Property;
4 import javax.jcr.RepositoryException;
5
6 import org.argeo.cms.text.TextSection;
7 import org.argeo.cms.viewers.EditablePart;
8 import org.argeo.cms.viewers.PropertyPart;
9 import org.argeo.cms.widgets.EditableText;
10 import org.eclipse.swt.widgets.Composite;
11
12 /** The title of a section. */
13 public class SectionTitle extends EditableText implements EditablePart,
14 PropertyPart {
15 private static final long serialVersionUID = -1787983154946583171L;
16
17 private final TextSection section;
18
19 public SectionTitle(Composite parent, int swtStyle, Property title)
20 throws RepositoryException {
21 super(parent, swtStyle, title);
22 section = (TextSection) TextSection.findSection(this);
23 }
24
25 public TextSection getSection() {
26 return section;
27 }
28
29 // @Override
30 // public Property getProperty() throws RepositoryException {
31 // return getSection().getNode().getProperty(Property.JCR_TITLE);
32 // }
33
34 @Override
35 public Property getItem() throws RepositoryException {
36 return getProperty();
37 }
38
39 }