From f0a072ffadf67e7475bffda67dd4d8e09032f710 Mon Sep 17 00:00:00 2001 From: Patric Plitzner Date: Wed, 9 Oct 2013 07:47:56 +0000 Subject: [PATCH] - aligned linkt text for creation of new elements via pop-up dialog --- .../selection/AgentSelectionDialog.java | 25 ++++++++++--------- .../selection/CollectionSelectionDialog.java | 2 +- .../selection/DerivedUnitSelectionDialog.java | 20 +++++++-------- .../selection/FeatureTreeSelectionDialog.java | 25 ++++++++++--------- .../FieldObservationSelectionDialog.java | 20 +++++++-------- .../GrantedAuthoritySelectionDialog.java | 20 +++++++-------- .../selection/GroupSelectionDialog.java | 16 ++++++------ .../selection/InstitutionSelectionDialog.java | 2 +- .../dialog/selection/NameSelectionDialog.java | 10 ++++---- ...omenclaturalAuthorTeamSelectionDialog.java | 10 ++++---- .../selection/PersonSelectionDialog.java | 12 ++++----- .../selection/ReferenceSelectionDialog.java | 2 +- .../dialog/selection/TeamSelectionDialog.java | 10 ++++---- .../dialog/selection/UserSelectionDialog.java | 18 ++++++------- 14 files changed, 97 insertions(+), 95 deletions(-) diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AgentSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AgentSelectionDialog.java index 54dbf489d..4bf7c09a5 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AgentSelectionDialog.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AgentSelectionDialog.java @@ -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. */ @@ -35,13 +35,13 @@ import eu.etaxonomy.taxeditor.store.CdmStore; */ public class AgentSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog { - + /** - * + * */ private static final String PERSON = "Person"; /** - * + * */ private static final String TEAM = "Team"; @@ -58,7 +58,7 @@ public class AgentSelectionDialog extends "Choose Agent", false, AgentSelectionDialog.class.getCanonicalName(), entity); return getSelectionFromDialog(dialog); } - + /** *

Constructor for FilteredAgentSelectionDialog.

* @@ -72,8 +72,8 @@ public class AgentSelectionDialog extends protected AgentSelectionDialog(Shell shell, ConversationHolder conversation, String title, boolean multi, String settings, AgentBase agent) { super(shell, conversation, title, multi, settings, agent); } - - + + /** * @author p.ciardelli * @created 18.09.2009 @@ -83,12 +83,13 @@ public class AgentSelectionDialog extends /* (non-Javadoc) * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object) */ - public String getText(Object element) { + @Override + public String getText(Object element) { AgentBase agent = getCdmObjectByUuid(((UuidAndTitleCache) element).getUuid()); if (agent instanceof INomenclaturalAuthor) { - return "Nomenclatural title: '" + ((INomenclaturalAuthor) agent).getNomenclaturalTitle() + "'"; + return "Nomenclatural title: '" + ((INomenclaturalAuthor) agent).getNomenclaturalTitle() + "'"; } else { - return "'" + agent.getTitleCache() + "' is not a nomenclatural author."; + return "'" + agent.getTitleCache() + "' is not a nomenclatural author."; } } } @@ -121,7 +122,7 @@ public class AgentSelectionDialog extends protected String getNewWizardLinkText() { return String.format("Create a new %1s or %2s", TEAM, PERSON); } - + /* (non-Javadoc) * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewWizardLinkSelectionListener() */ diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CollectionSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CollectionSelectionDialog.java index 15f0798b2..6f084b1f1 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CollectionSelectionDialog.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CollectionSelectionDialog.java @@ -85,7 +85,7 @@ public class CollectionSelectionDialog extends /** {@inheritDoc} */ @Override protected String getNewWizardLinkText() { - return String.format("Click link to create a new %1s", "Collection "); + return String.format("Create a new %1s", "Collection "); } /* (non-Javadoc) diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/DerivedUnitSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/DerivedUnitSelectionDialog.java index 70976a68b..5c5648939 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/DerivedUnitSelectionDialog.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/DerivedUnitSelectionDialog.java @@ -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. */ @@ -47,7 +47,7 @@ public class DerivedUnitSelectionDialog extends "Choose Unit", false, DerivedUnitSelectionDialog.class.getCanonicalName(), unit); return getSelectionFromDialog(dialog); } - + /** *

Constructor for FilteredDerivedUnitSelectionDialog.

* @@ -62,19 +62,19 @@ public class DerivedUnitSelectionDialog extends boolean multi, String settings, DerivedUnit cdmObject) { super(shell, conversation, title, multi, settings, cdmObject); } - + /** {@inheritDoc} */ @Override protected DerivedUnit getPersistentObject(UUID uuid) { Object object = CdmStore.getService(IOccurrenceService.class).load(uuid); - + SpecimenOrObservationBase specimenObservationBase = (SpecimenOrObservationBase) HibernateProxyHelper.deproxy(object); - - if(specimenObservationBase instanceof DerivedUnit){ - return (DerivedUnit) specimenObservationBase; + + if(specimenObservationBase instanceof DerivedUnit){ + return (DerivedUnit) specimenObservationBase; } StoreUtil.error(this.getClass(), "Selected unit is not a derived unit", null); - return null; + return null; } /** {@inheritDoc} */ @@ -92,6 +92,6 @@ public class DerivedUnitSelectionDialog extends /** {@inheritDoc} */ @Override protected String getNewWizardLinkText() { - return "Click link to create a new Unit."; + return String.format("Create a new %1s", "Unit "); } } diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java index f8a410932..813bf0a3d 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java @@ -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 { - + /** * 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); } - + /** *

Constructor for FilteredFeatureTreeSelectionDialog.

* @@ -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 featureTrees = CdmStore.getService(IFeatureTreeService.class).list(FeatureTree.class, null, null, null, null); - + if(model == null){ model = new ArrayList>(); } model.clear(); for(FeatureTree featureTree : featureTrees){ - UuidAndTitleCache element = new UuidAndTitleCache(FeatureTree.class, featureTree.getUuid(), featureTree.getTitleCache()); + UuidAndTitleCache element = new UuidAndTitleCache(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 here to create or edit a feature tree."; + return String.format("Create a new %1s" , "Feature tree "); } /* (non-Javadoc) diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FieldObservationSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FieldObservationSelectionDialog.java index c7bbf2813..a3bf4c29c 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FieldObservationSelectionDialog.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FieldObservationSelectionDialog.java @@ -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. */ @@ -33,7 +33,7 @@ import eu.etaxonomy.taxeditor.store.StoreUtil; */ public class FieldObservationSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog { - + /** *

select

* @@ -58,12 +58,12 @@ public class FieldObservationSelectionDialog extends * @param settings a {@link java.lang.String} object. * @param cdmObject a {@link eu.etaxonomy.cdm.model.occurrence.FieldObservation} object. */ - protected FieldObservationSelectionDialog(Shell shell, ConversationHolder conversation, + protected FieldObservationSelectionDialog(Shell shell, ConversationHolder conversation, String title, boolean multi, String settings, FieldUnit cdmObject) { super(shell, conversation, title, multi, settings, cdmObject); } - + /* (non-Javadoc) * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID) */ @@ -71,11 +71,11 @@ public class FieldObservationSelectionDialog extends @Override protected FieldUnit getPersistentObject(UUID uuid) { Object object = CdmStore.getService(IOccurrenceService.class).load(uuid); - + SpecimenOrObservationBase specimenObservationBase = (SpecimenOrObservationBase) HibernateProxyHelper.deproxy(object); - - if(specimenObservationBase instanceof FieldUnit){ - return (FieldUnit) specimenObservationBase; + + if(specimenObservationBase instanceof FieldUnit){ + return (FieldUnit) specimenObservationBase; } StoreUtil.error(this.getClass(), "Selected object is not a field observation", null); return null; @@ -99,6 +99,6 @@ public class FieldObservationSelectionDialog extends /** {@inheritDoc} */ @Override protected String getNewWizardLinkText() { - return "Click link to create a new Field Observation."; + return String.format("Create a new %1s", "Field Observation "); } } diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GrantedAuthoritySelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GrantedAuthoritySelectionDialog.java index 7f4ba7e51..24374e698 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GrantedAuthoritySelectionDialog.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GrantedAuthoritySelectionDialog.java @@ -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. */ @@ -33,13 +33,13 @@ import eu.etaxonomy.taxeditor.store.CdmStore; public class GrantedAuthoritySelectionDialog extends AbstractFilteredCdmResourceSelectionDialog { public static GrantedAuthority select(Shell shell, ConversationHolder conversation, GrantedAuthorityImpl authority){ - + GrantedAuthoritySelectionDialog dialog = new GrantedAuthoritySelectionDialog(shell, conversation, "Choose Granted Authority", false, GrantedAuthoritySelectionDialog.class.getCanonicalName(), authority); - + return getSelectionFromDialog(dialog); } - + /** * @param shell * @param conversation @@ -60,12 +60,12 @@ public class GrantedAuthoritySelectionDialog extends AbstractFilteredCdmResource @Override protected void initModel() { List authorities = CdmStore.getService(IGrantedAuthorityService.class).list(GrantedAuthorityImpl.class, null, null, null, null); - + model = new ArrayList>(); - + for(GrantedAuthorityImpl authority : authorities){ model.add(new UuidAndTitleCache(GrantedAuthorityImpl.class, authority.getUuid(),String.format("%s", authority.getAuthority()))); - } + } } /* (non-Javadoc) @@ -73,7 +73,7 @@ public class GrantedAuthoritySelectionDialog extends AbstractFilteredCdmResource */ @Override protected String getNewWizardLinkText() { - return "Create a new GrantedAuthority."; + return String.format("Create a new %1s", "GrantedAuthority "); } /* (non-Javadoc) @@ -91,7 +91,7 @@ public class GrantedAuthoritySelectionDialog extends AbstractFilteredCdmResource protected GrantedAuthorityImpl getPersistentObject(UUID uuid) { return CdmStore.getService(IGrantedAuthorityService.class).load(uuid); } - + @Override protected String getTitle(GrantedAuthorityImpl authority) { return authority != null ? authority.getAuthority() : ""; diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GroupSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GroupSelectionDialog.java index a480daadf..45c9980fc 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GroupSelectionDialog.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GroupSelectionDialog.java @@ -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. */ @@ -37,7 +37,7 @@ public class GroupSelectionDialog extends "Choose Group", false, GroupSelectionDialog.class.getCanonicalName(), group); return getSelectionFromDialog(dialog); } - + /** * @param shell * @param conversation @@ -58,12 +58,12 @@ public class GroupSelectionDialog extends @Override protected void initModel() { List groups = CdmStore.getService(IGroupService.class).list(Group.class, null, null, null, null); - + model = new ArrayList>(); - + for(Group group : groups){ model.add(new UuidAndTitleCache(Group.class, group.getUuid(),String.format("%s", group.getName()))); - } + } } /* (non-Javadoc) @@ -71,7 +71,7 @@ public class GroupSelectionDialog extends */ @Override protected String getNewWizardLinkText() { - return "Create a new Group."; + return String.format("Create a new %1s", "Group "); } /* (non-Javadoc) @@ -89,7 +89,7 @@ public class GroupSelectionDialog extends protected Group getPersistentObject(UUID uuid) { return CdmStore.getService(IGroupService.class).load(uuid); } - + @Override protected String getTitle(Group group) { return group != null ? group.getName() : ""; diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/InstitutionSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/InstitutionSelectionDialog.java index 9312db0b6..cd60c3301 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/InstitutionSelectionDialog.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/InstitutionSelectionDialog.java @@ -76,7 +76,7 @@ public class InstitutionSelectionDialog extends */ @Override protected String getNewWizardLinkText() { - return "Create a new Institution."; + return String.format("Create a new %1s", "Institution "); } /* (non-Javadoc) diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NameSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NameSelectionDialog.java index c9effb37d..18555cafa 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NameSelectionDialog.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NameSelectionDialog.java @@ -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. */ @@ -45,7 +45,7 @@ public class NameSelectionDialog extends AbstractFilteredCdmResourceSelectionDia "Choose a name", false, name); return getSelectionFromDialog(dialog); } - + /** *

Constructor for FilteredNameSelectionDialog.

* @@ -74,7 +74,7 @@ public class NameSelectionDialog extends AbstractFilteredCdmResourceSelectionDia /** {@inheritDoc} */ @Override protected void initModel() { - model = CdmStore.getService(INameService.class).getUuidAndTitleCache(); + model = CdmStore.getService(INameService.class).getUuidAndTitleCache(); } /** {@inheritDoc} */ @@ -86,6 +86,6 @@ public class NameSelectionDialog extends AbstractFilteredCdmResourceSelectionDia /** {@inheritDoc} */ @Override protected String getNewWizardLinkText() { - return "Click here to create a new name."; + return String.format("Create a new %1s", "Name "); } } diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalAuthorTeamSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalAuthorTeamSelectionDialog.java index 2615d3319..f43399142 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalAuthorTeamSelectionDialog.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalAuthorTeamSelectionDialog.java @@ -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. */ @@ -44,7 +44,7 @@ public class NomenclaturalAuthorTeamSelectionDialog extends "Choose Author Team", false, NomenclaturalAuthorTeamSelectionDialog.class.getCanonicalName(), team); return getSelectionFromDialog(dialog); } - + /** *

Constructor for FilteredNomenclaturalAuthorTeamSelectionDialog.

* @@ -59,7 +59,7 @@ public class NomenclaturalAuthorTeamSelectionDialog extends boolean multi, String settings, Team agent) { super(shell, conversation, title, multi, settings, agent); } - + /** {@inheritDoc} */ @Override protected AbstractNewEntityWizard getNewEntityWizard(String parameter) { @@ -69,7 +69,7 @@ public class NomenclaturalAuthorTeamSelectionDialog extends /** {@inheritDoc} */ @Override protected String getNewWizardLinkText() { - return "Click link to create a new Team."; + return String.format("Create a new %1s", "Team "); } /** {@inheritDoc} */ diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PersonSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PersonSelectionDialog.java index 5b59d029e..15bb0bdbf 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PersonSelectionDialog.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PersonSelectionDialog.java @@ -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. */ @@ -30,7 +30,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore; */ public class PersonSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog { - + /** *

select

* @@ -42,9 +42,9 @@ public class PersonSelectionDialog extends public static Person select(Shell shell, ConversationHolder conversation, Person person){ PersonSelectionDialog dialog = new PersonSelectionDialog(shell, conversation, "Choose a person", false, PersonSelectionDialog.class.getCanonicalName(), person); - return getSelectionFromDialog(dialog); + return getSelectionFromDialog(dialog); } - + /** *

Constructor for FilteredPersonSelectionDialog.

* @@ -89,6 +89,6 @@ public class PersonSelectionDialog extends /** {@inheritDoc} */ @Override protected String getNewWizardLinkText() { - return "Click link to create a new Person."; + return String.format("Create a new %1s", "Person "); } } diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ReferenceSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ReferenceSelectionDialog.java index d2858ccdd..db37406d4 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ReferenceSelectionDialog.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ReferenceSelectionDialog.java @@ -100,7 +100,7 @@ public class ReferenceSelectionDialog extends AbstractFilteredCdmResourceSelecti /** {@inheritDoc} */ @Override protected String getNewWizardLinkText() { - return "Click here to create a new reference."; + return String.format("Create a new %1s", "Reference "); } } diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TeamSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TeamSelectionDialog.java index 954e0aec8..ec2e3fb76 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TeamSelectionDialog.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TeamSelectionDialog.java @@ -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. */ @@ -30,7 +30,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore; */ public class TeamSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog { - + /** *

select

* @@ -44,7 +44,7 @@ public class TeamSelectionDialog extends "Choose Team", false, TeamSelectionDialog.class.getCanonicalName(), team); return getSelectionFromDialog(dialog); } - + /** *

Constructor for FilteredTeamSelectionDialog.

* @@ -79,7 +79,7 @@ public class TeamSelectionDialog extends /** {@inheritDoc} */ @Override protected String getNewWizardLinkText() { - return "Click link to create a new Team."; + return String.format("Create a new %1s", "Team "); } /** {@inheritDoc} */ diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/UserSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/UserSelectionDialog.java index d15e45163..a73d9443d 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/UserSelectionDialog.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/UserSelectionDialog.java @@ -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. */ @@ -33,7 +33,7 @@ public class UserSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog { /** - * + * * @param shell * @param conversation * @param user @@ -44,7 +44,7 @@ public class UserSelectionDialog extends "Choose User", false, UserSelectionDialog.class.getCanonicalName(), user); return getSelectionFromDialog(dialog); } - + /** * @param shell * @param conversation @@ -64,12 +64,12 @@ public class UserSelectionDialog extends @Override protected void initModel() { List users = CdmStore.getService(IUserService.class).list(User.class, null, null, null, null); - + model = new ArrayList>(); - + for(User user : users){ model.add(new UuidAndTitleCache(User.class, user.getUuid(),String.format("%s, %s", user.getUsername(), user.getPerson()))); - } + } } /* (non-Javadoc) @@ -77,7 +77,7 @@ public class UserSelectionDialog extends */ @Override protected String getNewWizardLinkText() { - return "Create a new User."; + return String.format("Create a new %1s", "User "); } /* (non-Javadoc) @@ -100,5 +100,5 @@ public class UserSelectionDialog extends protected String getTitle(User user) { return user != null ? user.getUsername() : ""; } - + } -- 2.34.1