Project

General

Profile

Revision dc4aa464

IDdc4aa4641fcf2a41676c425e556ef02306f1e428
Parent 5eece89f
Child 0f09a07c

Added by Patrick Plitzner over 3 years ago

ref #5458 Layout for settings windows

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/DistributionSettingsConfigWindow.java
40 40
import eu.etaxonomy.cdm.vaadin.util.DistributionEditorUtil;
41 41

  
42 42
/**
43
 * 
43
 *
44 44
 * @author pplitzner
45 45
 *
46 46
 */
......
64 64
     *
65 65
     * The constructor will not be automatically regenerated by the
66 66
     * visual editor.
67
     * @param distributionTableView 
67
     * @param distributionTableView
68 68
     */
69 69
    public DistributionSettingsConfigWindow(DistributionTableView distributionTableView) {
70 70
        buildMainLayout();
......
75 75
    private void init() {
76 76
        Container distributionContainer = presenter.getDistributionContainer();
77 77
        TermVocabulary<NamedArea> chosenArea = presenter.getChosenArea();
78
        
78

  
79 79
        classificationBox.setItemCaptionPropertyId(TaxonNodeContainer.LABEL);
80 80
        classificationBox.setContainerDataSource(new TaxonNodeContainer(null));
81 81
		classificationBox.setImmediate(true);
......
90 90
        distAreaBox.setContainerDataSource(distributionContainer);
91 91
        distAreaBox.setValue(chosenArea);
92 92
        distAreaBox.addValueChangeListener(this);
93
        
93

  
94 94
        if(chosenArea!=null){
95 95
        	NamedAreaContainer container = new NamedAreaContainer(chosenArea);
96 96
        	namedAreaList.setContainerDataSource(container);
97 97
        }
98 98
        Object selectedAreas = VaadinSession.getCurrent().getAttribute(DistributionEditorUtil.SATTR_SELECTED_AREAS);
99 99
        namedAreaList.setValue(selectedAreas);
100
        
100

  
101 101
        okButton.addClickListener(this);
102 102
        cancelButton.addClickListener(this);
103 103
    }
......
122 122

  
123 123
        VerticalLayout leftContainer = new VerticalLayout();
124 124
        leftContainer.setImmediate(false);
125
        leftContainer.setSizeFull();
126 125
        leftContainer.setSpacing(true);
127 126

  
128 127
        VerticalLayout rightContainer = new VerticalLayout();
129 128
        rightContainer.setImmediate(false);
130
        rightContainer.setSizeFull();
131 129
        rightContainer.setSpacing(true);
132 130

  
133 131
        //classification and term
......
144 142
        namedAreaList = new ListSelect();
145 143
        namedAreaList.setCaption("Areas");
146 144
        namedAreaList.setWidth("100%");
145
        namedAreaList.setSizeFull();
147 146
        namedAreaList.setMultiSelect(true);
148 147

  
149 148
        //taxonomy
150 149
        taxonTree = new Tree("Taxonomy");
151 150
        taxonTree.setImmediate(false);
152
        
151

  
153 152
        //no classification selected label
154 153
        labelNoClassification = new Label(" - Please select a classification - ");
155 154

  
156 155
        leftContainer.addComponent(classificationBox);
156
        leftContainer.setExpandRatio(classificationBox, 0.1f);
157 157
        leftContainer.addComponent(distAreaBox);
158
        leftContainer.setExpandRatio(distAreaBox, 0.1f);
158 159
        leftContainer.addComponent(namedAreaList);
160
        leftContainer.setExpandRatio(namedAreaList, 0.8f);
159 161
        leftContainer.setSizeFull();
160
        
162

  
161 163
        rightContainer.addComponent(taxonTree);
162 164
        rightContainer.setExpandRatio(taxonTree, 1);
163 165
        rightContainer.addComponent(labelNoClassification);
src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/SettingsConfigWindow.java
51 51
     *
52 52
     * The constructor will not be automatically regenerated by the
53 53
     * visual editor.
54
     * @param distributionTableView 
54
     * @param distributionTableView
55 55
     */
56 56
    public SettingsConfigWindow(DistributionTableView distributionTableView) {
57 57
    	this.distributionTableView = distributionTableView;
......
89 89
        //distribution status
90 90
        distStatusSelect = new TwinColSelect("Distribution Status:");
91 91
        distStatusSelect.setImmediate(false);
92
        distStatusSelect.setSizeFull();
92 93
        distStatusSelect.setWidth("100%");
93
        
94

  
94 95
        //toggle abbreviated labels
95 96
        boxToggleAbbreviatedLabels = new CheckBox("Show abbreviated labels", DistributionEditorUtil.isAbbreviatedLabels());
96 97
        boxToggleAbbreviatedLabels.setImmediate(true);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)