Use released Argeo Maven plugin
[gpl/argeo-suite.git] / core / org.argeo.entity.ui / src / org / argeo / entity / ui / forms / MultiTermsPart.java
index 9c3618d8d262c981449480d82af77be14209513f..8d407638626ecc8885b08b2b78d53b47f86bc591 100644 (file)
@@ -44,18 +44,21 @@ public class MultiTermsPart extends AbstractTermsPart {
 
                boolean vertical = SWT.VERTICAL == (getStyle() & SWT.VERTICAL);
                RowLayout rl = new RowLayout(vertical ? SWT.VERTICAL : SWT.HORIZONTAL);
-               rl.wrap = true;
+               rl = CmsUiUtils.noMarginsRowLayout(rl);
+//             rl.wrap = true;
+//             rl.justify = true;
                placeholder.setLayout(rl);
                List<Term> currentValue = getValue();
-               if (currentValue != null && !currentValue.isEmpty())
+               if (currentValue != null && !currentValue.isEmpty()) {
                        for (Term value : currentValue) {
                                Composite block = new Composite(placeholder, SWT.NONE);
                                block.setLayout(CmsUiUtils.noSpaceGridLayout(3));
-                               Label lbl = new Label(block, SWT.SINGLE);
+                               Label lbl = new Label(block, SWT.NONE);
                                String display = getTermLabel(value);
                                lbl.setText(display);
                                CmsUiUtils.style(lbl, style == null ? FormStyle.propertyText.style() : style);
-                               if (editable)
+                               processTermListLabel(value, lbl);
+                               if (isEditable())
                                        lbl.addMouseListener((MouseDoubleClick) (e) -> {
                                                startEditing();
                                        });
@@ -78,8 +81,8 @@ public class MultiTermsPart extends AbstractTermsPart {
 
                                }
                        }
-               else {// empty
-                       if (editable && !isEditing()) {
+               else {// empty
+                       if (isEditable() && !isEditing()) {
                                ToolBar toolBar = new ToolBar(placeholder, SWT.HORIZONTAL);
                                ToolItem addItem = new ToolItem(toolBar, SWT.FLAT);
                                styleAdd(addItem);