\r
import java.beans.PropertyChangeEvent;\r
import java.beans.PropertyChangeListener;\r
+import java.util.Set;\r
import java.util.Vector;\r
\r
import org.apache.log4j.Logger;\r
import eu.etaxonomy.cdm.model.name.ZoologicalName;\r
import eu.etaxonomy.cdm.model.reference.ReferenceBase;\r
import eu.etaxonomy.cdm.model.taxon.TaxonBase;\r
-import eu.etaxonomy.taxeditor.controller.GlobalController;\r
import eu.etaxonomy.taxeditor.propertysheet.reference.IReferenceSearch;\r
import eu.etaxonomy.taxeditor.propertysheet.reference.ReferencePropertySource;\r
import eu.etaxonomy.taxeditor.propertysheet.reference.ReferenceSearchDescriptor;\r
+import eu.etaxonomy.taxeditor.propertysheet.type.TypeCollectionPropertySource;\r
+import eu.etaxonomy.taxeditor.propertysheet.type.TypePropertyDescriptor;\r
\r
/**\r
* @author p.ciardelli\r
// Property unique keys\r
public static final String P_ID_TAXONNAME = "P_ID_TAXONNAME";\r
public static final String P_ID_TAXONSEC = "P_ID_TAXONSEC";\r
+ public static final String P_ID_TYPES = "P_ID_TYPES";\r
\r
// Property display keys\r
- public static final String P_TAXONNAME = "00:Misapplied Name";\r
- public static final String P_TAXONSEC = "01:Sec";\r
+ public String P_TAXONNAME;\r
+ public static final String P_TAXONSEC = "01:Secundum";\r
+ public static final String P_TYPES = "02:Name Types";\r
\r
- public TaxonBasePropertySource(TaxonBase taxon) {\r
+ \r
+ public TaxonBasePropertySource(TaxonBase taxon, String nameTitle) {\r
this.taxon = taxon;\r
\r
+ this.P_TAXONNAME = "00:" + nameTitle;\r
+ \r
addDescriptor(P_ID_TAXONNAME);\r
addDescriptor(P_ID_TAXONSEC);\r
+ addDescriptor(P_ID_TYPES); \r
}\r
\r
protected Vector<PropertyDescriptor> descriptors = new Vector<PropertyDescriptor>();\r
}\r
});\r
}\r
+ if (id.equals(P_ID_TYPES)) {\r
+ descriptors.addElement(\r
+ new TypePropertyDescriptor(P_ID_TYPES, P_TYPES, taxon.getName()) {\r
+ protected void saveTypes(Set set) {\r
+ setPropertyValue(P_ID_TYPES, set);\r
+ }\r
+ }\r
+ );\r
+ };\r
}\r
\r
/* (non-Javadoc)\r
return secPropertySource;\r
}\r
\r
+ if (id.equals(P_ID_TYPES)) {\r
+ if (taxon.getName() != null) {\r
+ return new TypeCollectionPropertySource(taxon.getName(), taxon.getName().getSpecimenTypeDesignations());\r
+ }\r
+ }\r
+ \r
return null;\r
}\r
\r