Project

General

Profile

Revision 0c8bd397

ID0c8bd397b09695bb0c59a3dcb64d00449eb1ed9e
Parent d9054fe5
Child c03d27b9

Added by Katja Luther about 1 year ago

ref #8447: add man and pp to setPublish configurator wizard

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/PublishSubTreeConfiguratorWizardPage.java
45 45
    private Button btnIncludeAcceptedTaxa;
46 46
    private Button btnIncludeSynonyms;
47 47
    private Button btnIncludeSharedTaxa;
48
    private Button btnIncludeMisappliedNames;
49
    private Button btnIncludeProParteSynonyms;
50
    private Button btnIncludeHybrids;
48 51

  
49 52
    private Combo btnPublish;
50 53

  
......
96 99
      //  Composite control = toolkit.createComposite(composite);
97 100
        btnIncludeAcceptedTaxa = new Button(control, SWT.CHECK);
98 101
        btnIncludeAcceptedTaxa.setText(Messages.SetPublishConfiguration_IncludeAcceptedTaxa);
99
        btnIncludeAcceptedTaxa.setSelection(configurator.isIncludeAcceptedTaxa());
100
        btnIncludeAcceptedTaxa.addListener(SWT.Selection, new Listener() {
101
            @Override
102
         public void handleEvent(Event e) {
103
                Button b = (Button) e.widget;
104
                GridData data = (GridData)  btnIncludeAcceptedTaxa.getLayoutData();
105
                data.exclude = b.getSelection();
106

  
107
                btnIncludeSharedTaxa.setVisible(data.exclude);
108
                if (!btnIncludeSynonyms.getSelection() && !data.exclude){
109
                   setPageComplete(false);
110
                }else{
111
                   setPageComplete(true);
112
                }
113
            }
114
        });
102
//        btnIncludeAcceptedTaxa.setSelection(configurator.isIncludeAcceptedTaxa());
103
//        btnIncludeAcceptedTaxa.addListener(SWT.Selection, new Listener() {
104
//            @Override
105
//         public void handleEvent(Event e) {
106
//                Button b = (Button) e.widget;
107
//                GridData data = (GridData)  btnIncludeAcceptedTaxa.getLayoutData();
108
//                data.exclude = b.getSelection();
109
//
110
//                btnIncludeSharedTaxa.setVisible(data.exclude);
111
//                if (!btnIncludeSynonyms.getSelection() && !data.exclude && !btnIncludeHybrids.getSelection() && !btnIncludeMisappliedNames.getSelection() && !btnIncludeProParteSynonyms.getSelection()){
112
//                   setPageComplete(false);
113
//                }else{
114
//                   setPageComplete(true);
115
//                }
116
//            }
117
//        });
115 118

  
116 119

  
117 120
        btnIncludeSharedTaxa = new Button(control, SWT.CHECK);
......
121 124
        btnIncludeSharedTaxa.setText(Messages.SetPublishConfiguration_IncludeSharedtaxa);
122 125
        btnIncludeSharedTaxa.setSelection(configurator.isIncludeSharedTaxa());
123 126

  
127
        btnIncludeMisappliedNames = new Button(control, SWT.CHECK);
128
        btnIncludeMisappliedNames.setText(Messages.SetPublishConfiguration_IncludeMisappliedNames);
129
//        btnIncludeMisappliedNames.setSelection(configurator.isIncludeMisapplications());
130
//        btnIncludeMisappliedNames.addListener(SWT.Selection, new Listener() {
131
//            @Override
132
//         public void handleEvent(Event e) {
133
//                Button b = (Button) e.widget;
134
//                GridData data = (GridData)  btnIncludeMisappliedNames.getLayoutData();
135
//                data.exclude = b.getSelection();
136
//
137
//                if (!btnIncludeSynonyms.getSelection() && !data.exclude && !btnIncludeAcceptedTaxa.getSelection() && !btnIncludeProParteSynonyms.getSelection() && !btnIncludeHybrids.getSelection()){
138
//                   setPageComplete(false);
139
//                }else{
140
//                   setPageComplete(true);
141
//                }
142
//            }
143
//        });
144

  
145

  
146
        btnIncludeProParteSynonyms = new Button(control, SWT.CHECK);
147
        btnIncludeProParteSynonyms.setText(Messages.SetPublishConfiguration_IncludeProParteSynonyms);
148
//        btnIncludeProParteSynonyms.setSelection(configurator.isIncludeProParteSynonyms());
149
//        btnIncludeProParteSynonyms.addListener(SWT.Selection, new Listener() {
150
//            @Override
151
//         public void handleEvent(Event e) {
152
//                Button b = (Button) e.widget;
153
//                GridData data = (GridData)  btnIncludeProParteSynonyms.getLayoutData();
154
//                data.exclude = b.getSelection();
155
//
156
//                if (!btnIncludeSynonyms.getSelection() && !data.exclude && !btnIncludeAcceptedTaxa.getSelection() && !btnIncludeMisappliedNames.getSelection() && !btnIncludeHybrids.getSelection()){
157
//                   setPageComplete(false);
158
//                }else{
159
//                   setPageComplete(true);
160
//                }
161
//            }
162
//        });
163

  
164
        btnIncludeHybrids = new Button(control, SWT.CHECK);
165
        btnIncludeHybrids.setText(Messages.SetPublishConfiguration_IncludeHybrids);
166
//        btnIncludeHybrids.setSelection(configurator.isIncludeHybrids());
167
//        btnIncludeHybrids.addListener(SWT.Selection, new Listener() {
168
//            @Override
169
//         public void handleEvent(Event e) {
170
//                Button b = (Button) e.widget;
171
//                GridData data = (GridData)  btnIncludeHybrids.getLayoutData();
172
//                data.exclude = b.getSelection();
173
//
174
//                if (!btnIncludeSynonyms.getSelection() && !data.exclude && !btnIncludeAcceptedTaxa.getSelection() && !btnIncludeMisappliedNames.getSelection() && !btnIncludeProParteSynonyms.getSelection()){
175
//                   setPageComplete(false);
176
//                }else{
177
//                   setPageComplete(true);
178
//                }
179
//            }
180
//        });
181

  
124 182
        btnIncludeSynonyms = new Button(control, SWT.CHECK);
125 183
        btnIncludeSynonyms.setText(Messages.SetPublishConfiguration_IncludeSynonyms);
126
        btnIncludeSynonyms.setSelection(configurator.isIncludeSynonyms());
127
        btnIncludeSynonyms.addListener(SWT.Selection, new Listener() {
128
            @Override
129
         public void handleEvent(Event e) {
130
                Button b = (Button) e.widget;
131
                GridData data = (GridData)  btnIncludeSynonyms.getLayoutData();
132
                data.exclude = b.getSelection();
133

  
134
                if (!btnIncludeAcceptedTaxa.getSelection() && !data.exclude){
135
                   setPageComplete(false);
136
                }else{
137
                   setPageComplete(true);
138
                }
139

  
140
            }
141
        });
184
//        btnIncludeSynonyms.setSelection(configurator.isIncludeSynonyms());
185
//        btnIncludeSynonyms.addListener(SWT.Selection, new Listener() {
186
//            @Override
187
//         public void handleEvent(Event e) {
188
//                Button b = (Button) e.widget;
189
//                GridData data = (GridData)  btnIncludeSynonyms.getLayoutData();
190
//                data.exclude = b.getSelection();
191
//
192
//                if (!btnIncludeAcceptedTaxa.getSelection() && !data.exclude && !btnIncludeHybrids.getSelection() && !btnIncludeMisappliedNames.getSelection() && !btnIncludeProParteSynonyms.getSelection()){
193
//                   setPageComplete(false);
194
//                }else{
195
//                   setPageComplete(true);
196
//                }
197
//
198
//            }
199
//        });
142 200

  
143 201

  
144 202
        m_bindingContext = initDataBindings();
203

  
145 204
        setControl(composite);
146 205
    }
147 206

  
......
159 218

  
160 219
        IObservableValue observeSelectionBtnIncludeAcceptedTaxa = WidgetProperties.selection().observe(btnIncludeAcceptedTaxa);
161 220
        IObservableValue includeAcceptedTaxaConfiguratorObserveValue = PojoProperties.value("includeAcceptedTaxa").observe(configurator);
162
        bindingContext.bindValue(observeSelectionBtnIncludeAcceptedTaxa, includeAcceptedTaxaConfiguratorObserveValue, null, null);
221
        bindingContext.bindValue(observeSelectionBtnIncludeAcceptedTaxa, includeAcceptedTaxaConfiguratorObserveValue);
222

  
223
        IObservableValue observeSelectionBtnIncludeSharedTaxal = WidgetProperties.selection().observe(btnIncludeSharedTaxa);
224
        IObservableValue includeSharedTaxaConfiguratorObserveValue = PojoProperties.value("includeSharedTaxa").observe(configurator);
225
        bindingContext.bindValue(observeSelectionBtnIncludeSharedTaxal, includeSharedTaxaConfiguratorObserveValue);
226

  
227
        IObservableValue observeSelectionBtnIncludeMisappliedNames = WidgetProperties.selection().observe(btnIncludeMisappliedNames);
228
        IObservableValue includeMisappliedNamesConfiguratorObserveValue = PojoProperties.value("includeMisapplications").observe(configurator);
229
        bindingContext.bindValue(observeSelectionBtnIncludeMisappliedNames, includeMisappliedNamesConfiguratorObserveValue);
230

  
231
        IObservableValue observeSelectionBtnIncludeProParteSynonyms = WidgetProperties.selection().observe(btnIncludeProParteSynonyms);
232
        IObservableValue includeProParteSynonymsConfiguratorObserveValue = PojoProperties.value("includeProParteSynonyms").observe(configurator);
233
        bindingContext.bindValue(observeSelectionBtnIncludeProParteSynonyms, includeProParteSynonymsConfiguratorObserveValue);
234

  
235
        IObservableValue observeSelectionBtnIncludeHybrids = WidgetProperties.selection().observe(btnIncludeHybrids);
236
        IObservableValue includeHybridsConfiguratorObserveValue = PojoProperties.value("includeHybrids").observe(configurator);
237
        bindingContext.bindValue(observeSelectionBtnIncludeHybrids, includeHybridsConfiguratorObserveValue);
163 238

  
164 239
        IObservableValue observeSelectionBtnIncludeSynonyms = WidgetProperties.selection().observe(btnIncludeSynonyms);
165 240
        IObservableValue includeSynonymsConfiguratorObserveValue = PojoProperties.value("includeSynonyms").observe(configurator);
166
        bindingContext.bindValue(observeSelectionBtnIncludeSynonyms, includeSynonymsConfiguratorObserveValue, null, null);
241
        bindingContext.bindValue(observeSelectionBtnIncludeSynonyms, includeSynonymsConfiguratorObserveValue);
167 242

  
168 243

  
169
        IObservableValue observeSelectionBtnIncludeSharedTaxal = WidgetProperties.selection().observe(btnIncludeSharedTaxa);
170
        IObservableValue includeSharedTaxaConfiguratorObserveValue = PojoProperties.value("includeSharedTaxa").observe(configurator);
171
        bindingContext.bindValue(observeSelectionBtnIncludeSharedTaxal, includeSharedTaxaConfiguratorObserveValue, null, null);
172 244

  
173 245
//        IObservableValue observeSelectionBtnPublish = WidgetProperties.selection().observe(btnPublish);
174 246
//        IObservableValue publishConfiguratorObserveValue = PojoProperties.value("publish").observe(configurator);
......
177 249

  
178 250
    }
179 251

  
252
    public void updateContext(){
253
        m_bindingContext.updateTargets();
254
    }
255

  
180 256

  
181 257

  
182 258
    /* (non-Javadoc)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetPublishForSubtreeWizard.java
50 50
     */
51 51
    @Override
52 52
    public boolean performFinish() {
53
       page.updateContext();
53 54
       if (!(configurator.isIncludeAcceptedTaxa() || configurator.isIncludeSynonyms())){
54 55
           return false;
55 56
       }else{

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)