Project

General

Profile

Revision 5e8b6361

ID5e8b6361568529b5c5a1a7604af15713ad636d21
Parent 24469549
Child 16c4d668

Added by Fabian Reimeier over 3 years ago

ref #7244 changed listselect to optiongroup

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/component/distributionStatus/AreaAndTaxonSettingsConfigWindow.java
29 29
import com.vaadin.ui.Button.ClickListener;
30 30
import com.vaadin.ui.ComboBox;
31 31
import com.vaadin.ui.HorizontalLayout;
32
import com.vaadin.ui.ListSelect;
33 32
import com.vaadin.ui.Notification;
33
import com.vaadin.ui.OptionGroup;
34
import com.vaadin.ui.Panel;
34 35
import com.vaadin.ui.Table.ColumnHeaderMode;
35 36
import com.vaadin.ui.TextField;
36 37
import com.vaadin.ui.Tree.ExpandEvent;
......
68 69
    private ComboBox classificationBox;
69 70
    private TextField taxonFilter;
70 71
    private ComboBox distAreaBox;
71
    private ListSelect namedAreaList;
72
    private OptionGroup namedAreaList;
72 73
    private TreeTable taxonTree;
73 74
    private IDistributionTableView distributionTableView;
74 75

  
......
184 185
        distAreaBox.setWidth("100%"); //$NON-NLS-1$
185 186

  
186 187
        // named areas
187
        namedAreaList = new ListSelect();
188
        namedAreaList.setCaption(Messages.getLocalizedString(Messages.AreaAndTaxonSettingsConfigWindow_AREAS));
189
        namedAreaList.setSizeFull();
188
        namedAreaList = new OptionGroup();
190 189
        namedAreaList.setMultiSelect(true);
190
        namedAreaList.setSizeFull();
191
        Panel namedAreaPanel = new Panel(Messages.getLocalizedString(Messages.AreaAndTaxonSettingsConfigWindow_AREAS));
192
        namedAreaPanel.setContent(new VerticalLayout(namedAreaList));
193
        namedAreaPanel.setSizeFull();
194

  
191 195

  
192 196
        //taxonomy
193 197
        taxonTree = new TreeTable(Messages.getLocalizedString(Messages.AreaAndTaxonSettingsConfigWindow_TAXONOMY));
......
199 203
        taxonTree.setMultiSelect(true);
200 204

  
201 205
        leftContainer.addComponent(distAreaBox);
202
        leftContainer.addComponent(namedAreaList);
206
        leftContainer.addComponent(namedAreaPanel);
203 207
        leftContainer.setExpandRatio(distAreaBox, 0.1f);
204
        leftContainer.setExpandRatio(namedAreaList, 0.9f);
208
        leftContainer.setExpandRatio(namedAreaPanel, 0.9f);
205 209
        leftContainer.setSizeFull();
206 210

  
207 211
        rightContainer.addComponent(classificationBox);
src/main/java/eu/etaxonomy/cdm/vaadin/component/distributionStatus/DistributionStatusSettingsConfigWindow.java
18 18
import com.vaadin.ui.Button.ClickListener;
19 19
import com.vaadin.ui.CheckBox;
20 20
import com.vaadin.ui.HorizontalLayout;
21
import com.vaadin.ui.ListSelect;
21
import com.vaadin.ui.OptionGroup;
22
import com.vaadin.ui.Panel;
22 23
import com.vaadin.ui.VerticalLayout;
23 24

  
24 25
import eu.etaxonomy.cdm.i18n.Messages;
......
36 37
            implements ValueChangeListener, ClickListener{
37 38

  
38 39
	private static final long serialVersionUID = -8220442386869594032L;
39
    private ListSelect distStatusSelect;
40
    private OptionGroup distStatusSelect;
40 41
    private CheckBox boxToggleAbbreviatedLabels;
41 42
    private IDistributionTableView distributionTableView;
42 43

  
......
75 76
        mainLayout.setSpacing(true);
76 77

  
77 78
        //distribution status
78
        distStatusSelect = new ListSelect(Messages.getLocalizedString(Messages.DistributionStatusSettingsConfigWindow_DISTRIBUTION_STATUS));
79
        distStatusSelect = new OptionGroup();
79 80
        distStatusSelect.setImmediate(false);
80 81
        distStatusSelect.setMultiSelect(true);
81 82
        distStatusSelect.setSizeFull();
82
        distStatusSelect.setWidth("100%"); //$NON-NLS-1$
83
        Panel distStatusPanel = new Panel(Messages.getLocalizedString(Messages.DistributionStatusSettingsConfigWindow_DISTRIBUTION_STATUS));
84
        distStatusPanel.setContent(new VerticalLayout(distStatusSelect));
85
        distStatusPanel.setSizeFull();
83 86

  
84 87
        //toggle abbreviated labels
85 88
        boxToggleAbbreviatedLabels = new CheckBox(Messages.getLocalizedString(Messages.DistributionStatusSettingsConfigWindow_SHOW_ABBREVIATED_LABELS), DistributionEditorUtil.isAbbreviatedLabels());
86 89
        boxToggleAbbreviatedLabels.setImmediate(true);
87 90

  
88 91
        mainLayout.addComponent(boxToggleAbbreviatedLabels);
89
        mainLayout.addComponent(distStatusSelect);
90
        mainLayout.setExpandRatio(distStatusSelect, 1);
92
        mainLayout.addComponent(distStatusPanel);
93
        mainLayout.setExpandRatio(distStatusPanel, 1);
91 94
        mainLayout.setSizeFull();
92 95

  
93 96
        //button toolbar

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)