// $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.
*/
*/
public class FeatureTreeSelectionDialog extends
AbstractFilteredCdmResourceSelectionDialog<FeatureTree> {
-
+
/**
* Creates a filtered selection dialog to select a named area.
*
"Choose a feature tree", false, featureTree);
return getSelectionFromDialog(dialog);
}
-
+
/**
* <p>Constructor for FilteredFeatureTreeSelectionDialog.</p>
*
FeatureTree cdmObject) {
super(shell, conversation, title, multi, FeatureTreeSelectionDialog.class.getCanonicalName(), cdmObject);
}
-
+
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
*/
@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);
}
}
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();
}
});
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)