Project

General

Profile

« Previous | Next » 

Revision e05624aa

Added by Patrick Plitzner over 10 years ago

  • added isPublished flag to DetailsView (fixes #3818)

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailElement.java
1 1
// $Id$
2 2
/**
3 3
 * Copyright (C) 2007 EDIT
4
 * European Distributed Institute of Taxonomy 
4
 * European Distributed Institute of Taxonomy
5 5
 * http://www.e-taxonomy.eu
6
 * 
6
 *
7 7
 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 8
 * See LICENSE.TXT at the top of this package for the full license terms.
9 9
 */
......
29 29
 * <p>
30 30
 * TaxonBaseDetailElement class.
31 31
 * </p>
32
 * 
32
 *
33 33
 * @author n.hoffmann
34 34
 * @created Feb 26, 2010
35 35
 * @version 1.0
......
48 48

  
49 49
	private CheckboxElement checkbox_unplaced;
50 50

  
51
	private CheckboxElement checkbox_published;
52

  
51 53
	/**
52 54
	 * <p>
53 55
	 * Constructor for TaxonBaseDetailElement.
54 56
	 * </p>
55
	 * 
57
	 *
56 58
	 * @param cdmFormFactory
57 59
	 *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
58 60
	 *            object.
......
80 82
				getConversationHolder(), formElement, "Secundum",
81 83
				entity.getSec(), EntitySelectionElement.ALL,
82 84
				style);
83
		
85

  
84 86
		text_appendedPhrase = formFactory.createTextWithLabelElement(
85 87
				formElement, "Appended Phrase", entity.getAppendedPhrase(),
86 88
				SWT.NULL);
87 89
		checkbox_useNameCache = formFactory.createCheckbox(formElement,
88 90
				"Exclude Authorship", entity.isUseNameCache(), style);
89
		
91

  
90 92
		if (entity instanceof Taxon) {
91 93
			checkbox_excluded = formFactory.createCheckbox(formElement,
92 94
					"Taxon is excluded", ((Taxon) entity).isExcluded(), style);
93 95
			checkbox_unplaced = formFactory.createCheckbox(formElement,
94 96
					"Taxon is unplaced", ((Taxon) entity).isUnplaced(), style);
95 97
		}
96
		
98
		checkbox_published = formFactory.createCheckbox(formElement,
99
		        "Taxon is published", ((Taxon) entity).isPublish(), style);
100

  
97 101
		checkbox_doubtful = formFactory.createCheckbox(formElement,
98 102
				entity.getClass().getSimpleName() + " is doubtful", entity.isDoubtful(), style);
99 103
	}
......
106 110
		setIrrelevant(toggleable_cache.getState(),
107 111
				Arrays.asList(new Object[] { toggleable_cache }));
108 112
	}
109
	
113

  
110 114
	@Override
111 115
	protected void handleTitleCacheRelevantChange(PropertyChangeEvent event) {
112 116
		String title = getEntity().generateTitle();
......
130 134
		} else if (eventSource == checkbox_excluded) {
131 135
			((Taxon) getEntity()).setExcluded(checkbox_excluded.getSelection());
132 136
		} else if (eventSource == checkbox_unplaced) {
133
			((Taxon) getEntity()).setUnplaced(checkbox_unplaced.getSelection());
137
		    ((Taxon) getEntity()).setUnplaced(checkbox_unplaced.getSelection());
138
		} else if (eventSource == checkbox_published) {
139
		    ((Taxon) getEntity()).setPublish(checkbox_published.getSelection());
134 140
		}
135 141
	}
136 142
}

Also available in: Unified diff