Improve theming.
authorMathieu Baudier <mbaudier@argeo.org>
Sun, 14 Feb 2021 14:20:53 +0000 (15:20 +0100)
committerMathieu Baudier <mbaudier@argeo.org>
Sun, 14 Feb 2021 14:20:53 +0000 (15:20 +0100)
core/org.argeo.entity.ui/src/org/argeo/entity/ui/forms/MultiTermsPart.java
core/org.argeo.entity.ui/src/org/argeo/entity/ui/forms/SingleTermPart.java
publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/AbstractDbkViewer.java

index 711596f22433cf7cfa77ccad0a63babea42d0bb5..af8df82b0184f574e1f0a74dc81e88377020f65c 100644 (file)
@@ -55,6 +55,7 @@ public class MultiTermsPart extends AbstractTermsPart {
                                String display = getTermLabel(value);
                                lbl.setText(display);
                                CmsUiUtils.style(lbl, style == null ? FormStyle.propertyText.style() : style);
+                               processTermListLabel(value, lbl);
                                if (isEditable())
                                        lbl.addMouseListener((MouseDoubleClick) (e) -> {
                                                startEditing();
index 4be4d0205741bc008421d1b714f6b205a24f582a..0b5948a1221f3ad3f89c1de5238a47895f496719 100644 (file)
@@ -101,6 +101,7 @@ public class SingleTermPart extends AbstractTermsPart {
                                String display = getTermLabel(currentValue);
                                lbl.setText(display);
                                CmsUiUtils.style(lbl, style == null ? FormStyle.propertyText.style() : style);
+                               processTermListLabel(currentValue, lbl);
                                if (isEditable()) {
                                        lbl.addMouseListener((MouseDoubleClick) (e) -> {
                                                startEditing();
index d886b143bde568b1bc31172023eb0c323a1a6ae5..044b675d3f0e530cd98cc4c73e9a7e36c0121e9d 100644 (file)
@@ -149,7 +149,7 @@ public abstract class AbstractDbkViewer extends AbstractPageViewer implements Ke
                        for (NodeIterator ni = section.getNode().getNodes(DbkType.section.get()); ni.hasNext();) {
                                Node child = ni.nextNode();
                                if (isDbk(child, DbkType.section)) {
-                                       TextSection newSection = new TextSection(section, SWT.NONE, child);
+                                       TextSection newSection = newTextSection(section, child);
                                        newSection.setLayoutData(CmsUiUtils.fillWidth());
                                        refresh(newSection);
                                }
@@ -161,6 +161,11 @@ public abstract class AbstractDbkViewer extends AbstractPageViewer implements Ke
                // section.layout(true, true);
        }
 
+       /** To be overridden in order to provide additional SectionPart types */
+       protected TextSection newTextSection(Section section, Node node) {
+               return new TextSection(section, SWT.NONE, node);
+       }
+
        /** To be overridden in order to provide additional SectionPart types */
        protected SectionPart newSectionPart(TextSection textSection, Node node) {
                return null;