Make terms parts more configurable.
[gpl/argeo-suite.git] / core / org.argeo.entity.ui / src / org / argeo / entity / ui / forms / MultiTermsPart.java
index 436cc17b89457e9e99c62ccfd65fca6249873953..1084f4cb9bd6a78fb31138fb7ed84487727947ac 100644 (file)
@@ -41,7 +41,9 @@ public class MultiTermsPart extends AbstractTermsPart {
        @Override
        protected Control createControl(Composite box, String style) {
                Composite placeholder = new Composite(box, SWT.NONE);
-               RowLayout rl = new RowLayout(SWT.HORIZONTAL);
+
+               boolean vertical = SWT.VERTICAL == (getStyle() & SWT.VERTICAL);
+               RowLayout rl = new RowLayout(vertical ? SWT.VERTICAL : SWT.HORIZONTAL);
                rl.wrap = true;
                placeholder.setLayout(rl);
                List<Term> currentValue = getValue();