Moving editor sources back into trunk
[taxeditor.git] / taxeditor-editor / src / main / java / eu / etaxonomy / taxeditor / propertysheet / EditorPropertySheetEntry.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9 package eu.etaxonomy.taxeditor.propertysheet;
10
11 import org.apache.log4j.Logger;
12 import org.eclipse.ui.views.properties.PropertySheetEntry;
13
14 import eu.etaxonomy.cdm.model.taxon.Taxon;
15 import eu.etaxonomy.taxeditor.editor.AbstractTaxonEditor;
16
17 /**
18 * Redraws editor / freetext area when a value in the property sheet changes.
19 * </p>
20 * @author p.ciardelli
21 * @created 16.05.2008
22 * @version 1.0
23 */
24 public class EditorPropertySheetEntry extends PropertySheetEntry {
25 private static final Logger logger = Logger
26 .getLogger(EditorPropertySheetEntry.class);
27
28 private AbstractTaxonEditor taxonEditor;
29
30 public EditorPropertySheetEntry(Taxon taxon, final AbstractTaxonEditor editor) {
31 super();
32
33 this.taxonEditor = editor;
34 }
35
36 protected void valueChanged(PropertySheetEntry child) {
37
38 super.valueChanged(child);
39
40 // If this is the top level of the property sheet, redraw the freetext area
41 if (getParent() == null) {
42 taxonEditor.postOperation(null);
43 }
44 }
45 }