Project

General

Profile

« Previous | Next » 

Revision a174673d

Added by Katja Luther about 6 years ago

better handling of updating misapplied names

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/TaxonNameEditorE4.java
202 202
				.getColor(Resources.COLOR_COMPOSITE_BACKGROUND));
203 203
	}
204 204

  
205
	public void createOrUpdateNameComposites() {
206
		ContainerFactoryE4.createOrUpdateAcceptedTaxonsHomotypicGroup(this);
207
		ContainerFactoryE4.createOrUpdateHeterotypicSynonymyGroups(this);
208
		ContainerFactoryE4.createOrUpdateMisapplicationsGroup(this);
205
	public void createOrUpdateNameComposites(boolean accepted, boolean heterotypicGroups, boolean misappliedNames) {
206
	    if (accepted){
207
	        ContainerFactoryE4.createOrUpdateAcceptedTaxonsHomotypicGroup(this);
208
	    }
209
	    if (heterotypicGroups){
210
	        ContainerFactoryE4.createOrUpdateHeterotypicSynonymyGroups(this);
211
	    }
212
	    if (misappliedNames){
213
	        ContainerFactoryE4.createOrUpdateMisapplicationsGroup(this);
214
	    }
209 215

  
210 216

  
211 217
		// Redraw composite
......
270 276
	 * @return a boolean.
271 277
	 */
272 278
    public boolean redraw() {
273
		return redraw(true);
279
		return redraw(true, true, true, true);
274 280
	}
275 281

  
276 282
	/**
......
278 284
	 *
279 285
	 * Redraws the editor controls
280 286
	 */
281
    public boolean redraw(boolean focus) {
287
    public boolean redraw(boolean focus, boolean accepted, boolean heterotypic, boolean misappliedNames) {
282 288

  
283
		createOrUpdateNameComposites();
289
		createOrUpdateNameComposites(accepted, heterotypic, misappliedNames);
284 290

  
285 291
		if (focus) {
286 292
			setFocus();
......
294 300

  
295 301
		changed(objectAffectedByOperation);
296 302

  
297
		redraw(false);
303
		redraw(true, true,true, true);
304

  
298 305

  
299 306
		if (objectAffectedByOperation instanceof TaxonBase) {
300 307
			objectAffectedByLastOperation = (TaxonBase) objectAffectedByOperation;
......
402 409
		this.input = input;
403 410
		conversation = input.getConversationHolder();
404 411

  
405
        createOrUpdateNameComposites();
412
        createOrUpdateNameComposites(true, true, true);
406 413

  
407 414
        createDragSupport();
408 415

  
......
711 718
        if(refresh){
712 719
            this.redraw(false, false, false, true);
713 720

  
721

  
714 722
        }
715 723
    }
716 724

  

Also available in: Unified diff