X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=publishing%2Forg.argeo.publishing.ui%2Fsrc%2Forg%2Fargeo%2Fcms%2Ftext%2FSectionTitle.java;fp=publishing%2Forg.argeo.publishing.ui%2Fsrc%2Forg%2Fargeo%2Fcms%2Ftext%2FSectionTitle.java;h=8bd68c4a1434121f79cb45ec7ee0eac82f383183;hb=147ada7da5bf6292569f17a53a77fca04c97f707;hp=0000000000000000000000000000000000000000;hpb=5431f941fd6161e89f495a330c2ecddaf4f6bfb1;p=gpl%2Fargeo-suite.git diff --git a/publishing/org.argeo.publishing.ui/src/org/argeo/cms/text/SectionTitle.java b/publishing/org.argeo.publishing.ui/src/org/argeo/cms/text/SectionTitle.java new file mode 100644 index 0000000..8bd68c4 --- /dev/null +++ b/publishing/org.argeo.publishing.ui/src/org/argeo/cms/text/SectionTitle.java @@ -0,0 +1,38 @@ +package org.argeo.cms.text; + +import javax.jcr.Property; +import javax.jcr.RepositoryException; + +import org.argeo.cms.ui.viewers.EditablePart; +import org.argeo.cms.ui.viewers.PropertyPart; +import org.argeo.cms.ui.widgets.EditableText; +import org.eclipse.swt.widgets.Composite; + +/** The title of a section. */ +public class SectionTitle extends EditableText implements EditablePart, + PropertyPart { + private static final long serialVersionUID = -1787983154946583171L; + + private final TextSection section; + + public SectionTitle(Composite parent, int swtStyle, Property title) + throws RepositoryException { + super(parent, swtStyle, title); + section = (TextSection) TextSection.findSection(this); + } + + public TextSection getSection() { + return section; + } + + // @Override + // public Property getProperty() throws RepositoryException { + // return getSection().getNode().getProperty(Property.JCR_TITLE); + // } + + @Override + public Property getItem() throws RepositoryException { + return getProperty(); + } + +}