- aligned linkt text for creation of new elements via pop-up dialog
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / dialog / selection / FeatureTreeSelectionDialog.java
index f8a41093209fd07f005269c5a1229d18510b87e5..813bf0a3d7f77b8dda9230f2a30f71b5b1224a3e 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -41,7 +41,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class FeatureTreeSelectionDialog extends
                AbstractFilteredCdmResourceSelectionDialog<FeatureTree> {
-       
+
        /**
         * Creates a filtered selection dialog to select a named area.
         *
@@ -56,7 +56,7 @@ public class FeatureTreeSelectionDialog extends
                                "Choose a feature tree", false, featureTree);
                return getSelectionFromDialog(dialog);
        }
-       
+
        /**
         * <p>Constructor for FilteredFeatureTreeSelectionDialog.</p>
         *
@@ -71,7 +71,7 @@ public class FeatureTreeSelectionDialog extends
                        FeatureTree cdmObject) {
                super(shell, conversation, title, multi, FeatureTreeSelectionDialog.class.getCanonicalName(), cdmObject);
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
         */
@@ -88,13 +88,13 @@ public class FeatureTreeSelectionDialog extends
        @Override
        protected void initModel() {
                List<FeatureTree> featureTrees = CdmStore.getService(IFeatureTreeService.class).list(FeatureTree.class, null, null, null, null);
-               
+
                if(model == null){
                        model = new ArrayList<UuidAndTitleCache<FeatureTree>>();
                }
                model.clear();
                for(FeatureTree featureTree : featureTrees){
-                       UuidAndTitleCache<FeatureTree> element = new UuidAndTitleCache<FeatureTree>(FeatureTree.class, featureTree.getUuid(), featureTree.getTitleCache()); 
+                       UuidAndTitleCache<FeatureTree> element = new UuidAndTitleCache<FeatureTree>(FeatureTree.class, featureTree.getUuid(), featureTree.getTitleCache());
                        model.add(element);
                }
        }
@@ -108,12 +108,13 @@ public class FeatureTreeSelectionDialog extends
                Link link = new Link(parent, SWT.NONE);
                link.setText(getNewWizardLinkText());
                link.addListener (SWT.Selection, new Listener () {
-                       public void handleEvent(Event event) {
-                               
+                       @Override
+            public void handleEvent(Event event) {
+
                                FeatureTreeEditorWizard wizard = new FeatureTreeEditorWizard();
                                WizardDialog dialog = new WizardDialog(getShell(), wizard);
                                int status = dialog.open();
-                               
+
                                if (status == IStatus.OK) {
                                        refresh();
                                }
@@ -121,14 +122,14 @@ public class FeatureTreeSelectionDialog extends
                });
                return link;
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewWizardLinkText()
         */
        /** {@inheritDoc} */
        @Override
        protected String getNewWizardLinkText() {
-               return "Click <A>here</A> to create or edit a feature tree.";
+               return String.format("Create a new <a>%1s</a>" , "Feature tree ");
        }
 
        /* (non-Javadoc)