]> git.argeo.org Git - gpl/argeo-suite.git/blob - publishing/org.argeo.publishing.ui/src/org/argeo/cms/text/Paragraph.java
[maven-release-plugin] prepare release argeo-suite-2.1.17
[gpl/argeo-suite.git] / publishing / org.argeo.publishing.ui / src / org / argeo / cms / text / Paragraph.java
1 package org.argeo.cms.text;
2
3 import javax.jcr.Node;
4 import javax.jcr.RepositoryException;
5
6 import org.argeo.cms.ui.util.CmsUiUtils;
7 import org.argeo.cms.ui.viewers.Section;
8 import org.argeo.cms.ui.viewers.SectionPart;
9 import org.argeo.cms.ui.widgets.EditableText;
10 import org.argeo.cms.ui.widgets.TextStyles;
11
12 public class Paragraph extends EditableText implements SectionPart {
13 private static final long serialVersionUID = 3746457776229542887L;
14
15 private final TextSection section;
16
17 public Paragraph(TextSection section, int style, Node node)
18 throws RepositoryException {
19 super(section, style, node);
20 this.section = section;
21 CmsUiUtils.style(this, TextStyles.TEXT_PARAGRAPH);
22 }
23
24 public Section getSection() {
25 return section;
26 }
27
28 @Override
29 public String getPartId() {
30 return getNodeId();
31 }
32
33 @Override
34 public Node getItem() throws RepositoryException {
35 return getNode();
36 }
37
38 @Override
39 public String toString() {
40 return "Paragraph #" + getPartId();
41 }
42 }