X-Git-Url: https://git.argeo.org/?p=gpl%2Fargeo-suite.git;a=blobdiff_plain;f=publishing%2Forg.argeo.publishing.ui%2Fsrc%2Forg%2Fargeo%2Fcms%2Ftext%2FStandardTextEditor.java;fp=publishing%2Forg.argeo.publishing.ui%2Fsrc%2Forg%2Fargeo%2Fcms%2Ftext%2FStandardTextEditor.java;h=0000000000000000000000000000000000000000;hp=3c3d16b0fab123fc43ca938bf8be3b32648c74ee;hb=2824e4dce1c2239500f865efaac23f2880b12277;hpb=2c7baf5cc1437770abc7df32e29e3c9ca29b7132 diff --git a/publishing/org.argeo.publishing.ui/src/org/argeo/cms/text/StandardTextEditor.java b/publishing/org.argeo.publishing.ui/src/org/argeo/cms/text/StandardTextEditor.java deleted file mode 100644 index 3c3d16b..0000000 --- a/publishing/org.argeo.publishing.ui/src/org/argeo/cms/text/StandardTextEditor.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.argeo.cms.text; - -import static javax.jcr.Property.JCR_TITLE; - -import javax.jcr.Node; -import javax.jcr.Property; -import javax.jcr.RepositoryException; - -import org.argeo.cms.ui.CmsEditable; -import org.argeo.cms.ui.util.CmsUiUtils; -import org.argeo.cms.ui.viewers.Section; -import org.eclipse.swt.widgets.Composite; - -/** Text editor where sections and subsections can be managed by the user. */ -@Deprecated -public class StandardTextEditor extends AbstractTextViewer { - private static final long serialVersionUID = 6049661610883342325L; - - public StandardTextEditor(Composite parent, int style, Node textNode, - CmsEditable cmsEditable) throws RepositoryException { - super(new TextSection(parent, style, textNode), style, cmsEditable); - refresh(); - getMainSection().setLayoutData(CmsUiUtils.fillWidth()); - } - - @Override - protected void initModel(Node textNode) throws RepositoryException { - if (isFlat()) - textNode.addNode(CMS_P).addMixin(CmsTypes.CMS_STYLED); - else - textNode.setProperty(JCR_TITLE, textNode.getName()); - } - - @Override - protected Boolean isModelInitialized(Node textNode) - throws RepositoryException { - return textNode.hasProperty(Property.JCR_TITLE) - || textNode.hasNode(CMS_P) - || (!isFlat() && textNode.hasNode(CMS_H)); - } - - @Override - public Section getMainSection() { - // TODO Auto-generated method stub - return super.getMainSection(); - } -}