return displayName;\r
}\r
\r
- protected void valueChanged(PropertySheetEntry child) {\r
- \r
- super.valueChanged(child);\r
+// protected void valueChanged(PropertySheetEntry child) {\r
+// \r
+// super.valueChanged(child);\r
+// \r
+// // If this is the top level of the property sheet, redraw the freetext area\r
+// if (getParent() == null) {\r
+// EditorController.redraw(taxon); // causing infinite loops?\r
+// }\r
+// }\r
+ \r
+ protected void refreshFromRoot() {\r
+ super.refreshFromRoot();\r
\r
// If this is the top level of the property sheet, redraw the freetext area\r
if (getParent() == null) {\r
* IPropertySource is now saved in the field editorValue for comparison.\r
*/\r
descriptors.addElement(\r
- new TextPropertyDescriptor(item, itemDisplayName) {\r
- public CellEditor createPropertyEditor(Composite parent) {\r
- CellEditor editor = new TextCellEditor(parent) {\r
- Object editorValue;\r
- protected void doSetValue(Object value) {\r
- if (value instanceof String) {\r
- super.doSetValue(value);\r
- } else {\r
- editorValue = value;\r
- super.doSetValue(value.toString());\r
- } \r
- }\r
- protected Object doGetValue() {\r
- \r
-// if (editorValue instanceof TypeCollectionPropertySource) {\r
-// String cache = \r
-// }\r
-// \r
-// if (super.doGetValue().equals())\r
-// return editorValue;\r
- return super.doGetValue();\r
- }\r
- };\r
- if (getValidator() != null) {\r
- editor.setValidator(getValidator());\r
- }\r
- return editor;\r
- }\r
- });\r
+ new TextPropertyDescriptor(item, itemDisplayName));\r
+// new TextPropertyDescriptor(item, itemDisplayName) {\r
+// public CellEditor createPropertyEditor(Composite parent) {\r
+// CellEditor editor = new TextCellEditor(parent) {\r
+// Object editorValue;\r
+// protected void doSetValue(Object value) {\r
+// if (value instanceof String) {\r
+// super.doSetValue(value);\r
+// } else {\r
+// editorValue = value;\r
+// super.doSetValue(value.toString());\r
+// } \r
+// }\r
+//// protected Object doGetValue() {\r
+//// return super.doGetValue();\r
+//// }\r
+// };\r
+// if (getValidator() != null) {\r
+// editor.setValidator(getValidator());\r
+// }\r
+// return editor;\r
+// }\r
+// });\r
}\r
}\r
\r
\r
@Override\r
public Object getEditableValue() {\r
- return this;\r
+ if (typeDesignation instanceof SpecimenTypeDesignation) {\r
+ return ((SpecimenTypeDesignation) typeDesignation).getTypeSpecimen().getTitleCache();\r
+ }\r
+ \r
+ if (typeDesignation instanceof NameTypeDesignation) {\r
+ if (((NameTypeDesignation) typeDesignation).getTypeName() != null) {\r
+ return ((NameTypeDesignation) typeDesignation).getTypeName().getTitleCache();\r
+ }\r
+ }\r
+ \r
+ return null;\r
}\r
\r
@Override\r
public void setPropertyValue(Object id, Object value) {\r
}\r
\r
- public String toString() {\r
- if (typeDesignation instanceof SpecimenTypeDesignation) {\r
- return ((SpecimenTypeDesignation) typeDesignation).getTypeSpecimen().getTitleCache();\r
- }\r
- \r
- if (typeDesignation instanceof NameTypeDesignation) {\r
- if (((NameTypeDesignation) typeDesignation).getTypeName() != null) {\r
- return ((NameTypeDesignation) typeDesignation).getTypeName().getTitleCache();\r
- }\r
- }\r
- \r
- return null;\r
- }\r
+// public String toString() {\r
+// if (typeDesignation instanceof SpecimenTypeDesignation) {\r
+// return ((SpecimenTypeDesignation) typeDesignation).getTypeSpecimen().getTitleCache();\r
+// }\r
+// \r
+// if (typeDesignation instanceof NameTypeDesignation) {\r
+// if (((NameTypeDesignation) typeDesignation).getTypeName() != null) {\r
+// return ((NameTypeDesignation) typeDesignation).getTypeName().getTitleCache();\r
+// }\r
+// }\r
+// \r
+// return null;\r
+// }\r
\r
public boolean equals(Object object) {\r
if (object == null) {\r