X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.app.ui%2Fsrc%2Forg%2Fargeo%2Fapp%2Fui%2Fdocbook%2FDocumentTextEditor.java;fp=org.argeo.app.ui%2Fsrc%2Forg%2Fargeo%2Fapp%2Fui%2Fdocbook%2FDocumentTextEditor.java;h=0000000000000000000000000000000000000000;hb=d917d2b10162a29cddaf8c81c362efa37abcaab9;hp=7d41117a29fb3ce26beafb750383270fcadf6958;hpb=f1b87af2e0de38f1f49ab8fe68f9988018914811;p=gpl%2Fargeo-suite.git diff --git a/org.argeo.app.ui/src/org/argeo/app/ui/docbook/DocumentTextEditor.java b/org.argeo.app.ui/src/org/argeo/app/ui/docbook/DocumentTextEditor.java deleted file mode 100644 index 7d41117..0000000 --- a/org.argeo.app.ui/src/org/argeo/app/ui/docbook/DocumentTextEditor.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.argeo.app.ui.docbook; - -import javax.jcr.Node; -import javax.jcr.RepositoryException; - -import org.argeo.api.cms.ux.CmsEditable; -import org.argeo.app.docbook.DbkType; -import org.argeo.app.docbook.DbkUtils; -import org.argeo.cms.swt.CmsSwtUtils; -import org.eclipse.swt.widgets.Composite; - -/** Text editor where sections and subsections can be managed by the user. */ -public class DocumentTextEditor extends AbstractDbkViewer { - private static final long serialVersionUID = 6049661610883342325L; - - public DocumentTextEditor(Composite parent, int style, Node textNode, CmsEditable cmsEditable) { - super(new TextSection(parent, style, textNode), style, cmsEditable); -// refresh(); - getMainSection().setLayoutData(CmsSwtUtils.fillWidth()); - } - - @Override - protected void initModel(Node textNode) throws RepositoryException { - if (isFlat()) { - DbkUtils.addParagraph(textNode, ""); - } -// else -// textNode.setProperty(DocBookNames.DBK_TITLE, textNode.getName()); - } - - @Override - protected Boolean isModelInitialized(Node textNode) throws RepositoryException { - return textNode.hasNode(DbkType.title.get()) || textNode.hasNode(DbkType.para.get()) - || (!isFlat() && textNode.hasNode(DbkType.section.get())); - } - -}