ref #7809: adapt namerelationship wizard
authorKatja Luther <k.luther@bgbm.org>
Mon, 15 Oct 2018 14:41:38 +0000 (16:41 +0200)
committerKatja Luther <k.luther@bgbm.org>
Mon, 15 Oct 2018 14:41:38 +0000 (16:41 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/Messages.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/NameRelationshipTypeCombo.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameRelationshipWizardPage.java

index f3aad545e27d3d0c6705039a5bed920d26af4a6f..4c6fe3d22d33b80241cb52fa625756abe039aa4f 100644 (file)
@@ -340,6 +340,9 @@ public class Messages extends NLS {
     public static String NameDetailsViewConfiguration_useLocalSettings;
 
 
+    public static String NameRelationshipWizardPage_description;
+
+
     public static String SetPublishConfiguration_Publish;
     public static String SetPublishConfiguration_Publish_tooltip;
     public static String SetPublishConfiguration_Description_Configurator;
index 5e95db938a5356aba44275d5eb51520c58d3d663..169e2fb4c5f529ea4078b9296a58fd5735f8c42b 100644 (file)
@@ -332,6 +332,7 @@ NomenclaturalCodePreferences_available_codes=Available Codes
 NomenclaturalCodePreferences_description=Configure the default settings for the nomenclatural code, this is used for new created taxa.
 
 NameDetailsViewConfiguration_description=Configure the simple name details view. The selected parts are displayed, others are not visible in a simple name details view.
+NameRelationshipWizardPage_description=Choose namerelationship type and related name
 
 DateDetail_parseText_tooltip=This field is for quick data entry. The content is parsed and the atomised fields will be filled, the content of this field will not be saved.
 
index b9df7a1442bfbe5b5b390fcf808538cd5e6a5516..1058d44cd5f603bcae7b61a1c7d9f93f34fc84f5 100644 (file)
@@ -330,6 +330,8 @@ PublishFlagPreference_set=Publish Flag setzen
 NomenclaturalCodePreferences_available_codes=Verfügbare Codes
 NomenclaturalCodePreferences_description=Konfiguration des verwendeten Nomenklatorischen Codes beim Erstellen eines neuen Taxons
 
+NameRelationshipWizardPage_description=Auswahl des Relationstyps und des in Beziehung stehenden Namens 
+
 NameDetailsViewConfiguration_description=Konfiguration eines vereinfachten Namensdetailsviews. \nDie ausgewählten Parts werden angezeigt, die anderen sind nicht sichtbar.
 
 DateDetail_parseText_tooltip=Dieses Feld ist für die schnelle Dateneingabe. Der Inhalt des Feldes wird geparsed und in die atomisierten Felder geschrieben. Der Inhalt des Feldes selber wird nicht gespeichert.
index 31aead0ed0b7ade1e80553cdcd5a61fac3995ccd..f6558cd7fb8981b47470c4d46f3273a9f01171e0 100755 (executable)
@@ -12,7 +12,9 @@ import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.List;
 
+import org.eclipse.jface.resource.FontDescriptor;
 import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionEvent;
 
 import eu.etaxonomy.cdm.model.common.TermType;
@@ -57,6 +59,11 @@ public class NameRelationshipTypeCombo<T extends InverseTermWrapper> extends Abs
      terms = getTermManager().getPreferredTerms(TermType.NameRelationshipType);
      this.useAbbrevLabel = useAbbrevLabel;
      populateTerms();
+     label.setText(labelString);
+     FontDescriptor descriptor = FontDescriptor.createFrom(label.getFont());
+  // setStyle method returns a new font descriptor for the given style
+     descriptor = descriptor.setStyle(SWT.ITALIC);
+     label.setFont(descriptor.createFont(label.getDisplay()));
 
      combo.addSelectionListener(this);
      combo.addDisposeListener(this);
index b90587e76d50a134e2d2ef01811df1bf821a6088..899b835a6be0110735a5dddb59a891bf0305925c 100644 (file)
@@ -17,6 +17,7 @@ import org.eclipse.swt.widgets.Composite;
 import eu.etaxonomy.cdm.model.name.NameRelationship;
 import eu.etaxonomy.cdm.model.name.NameRelationshipType;
 import eu.etaxonomy.cdm.model.name.TaxonName;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.ui.AbstractEntityCollectionElementWizardPage;
 import eu.etaxonomy.taxeditor.ui.combo.NameRelationshipTypeCombo;
 import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
@@ -56,9 +57,10 @@ public class NameRelationshipWizardPage extends AbstractEntityCollectionElementW
         */
        protected NameRelationshipWizardPage(
                        NameRelationshipDetailSection callingSection) {
-               super("NameRelationshipWizardPage");
-               setTitle("New Name Relationship");
-               setDescription(callingSection.getEntity().getTitleCache());
+               super("NameRelationshipWizardPage"); //$NON-NLS-1$
+               setTitle("New Name Relationship"); //$NON-NLS-1$
+               //setDescription(callingSection.getEntity().getTitleCache());
+               setDescription(Messages.NameRelationshipWizardPage_description);
                this.entity = callingSection.getEntity();
                this.formFactory = callingSection.getFormFactory();
 
@@ -78,14 +80,14 @@ public class NameRelationshipWizardPage extends AbstractEntityCollectionElementW
            super.createControl(parent);
 
                combo_relationshipType = formFactory.createNameRelationshipTypeCombo(rootElement,
-                   "Type", SWT.NULL, false,null);
+                   entity.getNameCache(), SWT.NULL, false,null);
 
 
                selection_relatedTo = formFactory
                                .createSelectionElement(TaxonName.class,
                                                ((NameRelationshipWizard) getWizard())
                                                                .getConversationHolder(), rootElement,
-                                               "Related to",this.entity, EntitySelectionElement.ALL,
+                                               "",this.entity, EntitySelectionElement.ALL,
                                                SWT.NULL, true);
 
        }