--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2017 EDIT
+* 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.
+*/
+package eu.etaxonomy.cdm.i10n;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author freimeier
+ * @date 27.11.2017
+ *
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "eu.etaxonomy.cdm.i10n.messages"; //$NON-NLS-1$
+ public static String AreaAndTaxonSettingsConfigWindow_AREAS;
+ public static String AreaAndTaxonSettingsConfigWindow_CLASSIFICATION;
+ public static String AreaAndTaxonSettingsConfigWindow_DISTRIBUTION_AREA;
+ public static String AreaAndTaxonSettingsConfigWindow_FILTER;
+ public static String AreaAndTaxonSettingsConfigWindow_FILTER_TAXA_BY_NAME;
+ public static String AreaAndTaxonSettingsConfigWindow_LOADING_COMPLETE;
+ public static String AreaAndTaxonSettingsConfigWindow_LOADING_TAXA;
+ public static String AreaAndTaxonSettingsConfigWindow_SELECT_CLASSIFICATION;
+ public static String AreaAndTaxonSettingsConfigWindow_SELECT_DISTRIBUTION_AREA;
+ public static String AreaAndTaxonSettingsConfigWindow_TAXONOMY;
+ public static String DetailWindow_NO_DESCRIPTIVE_DATA_FOUND;
+ public static String DistributionStatusSettingsConfigWindow_DISTRIBUTION_STATUS;
+ public static String DistributionStatusSettingsConfigWindow_SHOW_ABBREVIATED_LABELS;
+ public static String DistributionTablePresenter_ERROR_UPDATE_DISTRIBUTION_TERM;
+ public static String DistributionTableViewBean_AREAS_AND_TAXA;
+ public static String DistributionTableViewBean_SELECT_TAXON;
+ public static String DistributionTableViewBean_STATUS;
+ public static String DistributionTableViewBean_TAXON;
+ public static String DistributionTableViewBean_TAXON_DETAILS;
+ public static String DistributionTableViewBean_TOTAL_TAXA;
+ public static String DistributionToolbar_AREAS_AND_TAXA;
+ public static String DistributionToolbar_DETAIL;
+ public static String DistributionToolbar_EDIT;
+ public static String DistributionToolbar_LOGIN;
+ public static String DistributionToolbar_LOGOUT;
+ public static String DistributionToolbar_SAVE;
+ public static String DistributionToolbar_STATUS;
+ public static String SettingsDialogWindowBase_CANCEL;
+ public static String SettingsDialogWindowBase_OK;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
--- /dev/null
+AreaAndTaxonSettingsConfigWindow_AREAS=Areas
+AreaAndTaxonSettingsConfigWindow_TAXONOMY=Taxonomy
+AreaAndTaxonSettingsConfigWindow_LOADING_TAXA=Loading taxa...
+AreaAndTaxonSettingsConfigWindow_CLASSIFICATION=Classification
+AreaAndTaxonSettingsConfigWindow_LOADING_COMPLETE=Loading complete
+AreaAndTaxonSettingsConfigWindow_SELECT_CLASSIFICATION=Please select a classification...
+AreaAndTaxonSettingsConfigWindow_FILTER=Filter
+AreaAndTaxonSettingsConfigWindow_FILTER_TAXA_BY_NAME=Filter taxa by name...
+AreaAndTaxonSettingsConfigWindow_DISTRIBUTION_AREA=Distribution Area:
+AreaAndTaxonSettingsConfigWindow_SELECT_DISTRIBUTION_AREA=Please select a distribution area...
+DetailWindow_NO_DESCRIPTIVE_DATA_FOUND=No descriptive data found
+DistributionStatusSettingsConfigWindow_DISTRIBUTION_STATUS=Distribution Status:
+DistributionStatusSettingsConfigWindow_SHOW_ABBREVIATED_LABELS=Show abbreviated labels
+DistributionTablePresenter_ERROR_UPDATE_DISTRIBUTION_TERM=Error during update of distribution term\!
+DistributionTableViewBean_AREAS_AND_TAXA=Areas and Taxa
+DistributionTableViewBean_SELECT_TAXON=Please select a taxon
+DistributionTableViewBean_STATUS=Status
+DistributionTableViewBean_TAXON=Taxon
+DistributionTableViewBean_TAXON_DETAILS=Taxon Details
+DistributionTableViewBean_TOTAL_TAXA=Total amount of Taxa displayed: %s
+DistributionToolbar_AREAS_AND_TAXA=Areas and Taxa
+DistributionToolbar_DETAIL=Detail
+DistributionToolbar_EDIT=Edit
+DistributionToolbar_LOGIN=Login
+DistributionToolbar_LOGOUT=Logout
+DistributionToolbar_SAVE=Save
+DistributionToolbar_STATUS=Status
+SettingsDialogWindowBase_CANCEL=Cancel
+SettingsDialogWindowBase_OK=OK
--- /dev/null
+AreaAndTaxonSettingsConfigWindow_AREAS=Gebiete
+AreaAndTaxonSettingsConfigWindow_TAXONOMY=Taxonomie
+AreaAndTaxonSettingsConfigWindow_LOADING_TAXA=Lade Taxa...
+AreaAndTaxonSettingsConfigWindow_CLASSIFICATION=Klassifikation
+AreaAndTaxonSettingsConfigWindow_LOADING_COMPLETE=Ladevorgang abgeschlossen
+AreaAndTaxonSettingsConfigWindow_SELECT_CLASSIFICATION=Bitte wählen Sie eine Klassifikation aus...
+AreaAndTaxonSettingsConfigWindow_FILTER=Filter
+AreaAndTaxonSettingsConfigWindow_FILTER_TAXA_BY_NAME=Taxa nach Namen filtern...
+AreaAndTaxonSettingsConfigWindow_DISTRIBUTION_AREA=Verbreitungsgebiet:
+AreaAndTaxonSettingsConfigWindow_SELECT_DISTRIBUTION_AREA=Bitte wählen Sie ein Verbreitungsgebiet aus...
+DetailWindow_NO_DESCRIPTIVE_DATA_FOUND=Keine deskriptive Daten gefunden
+DistributionStatusSettingsConfigWindow_DISTRIBUTION_STATUS=Verbreitungsstatus:
+DistributionStatusSettingsConfigWindow_SHOW_ABBREVIATED_LABELS=Abkürzungen anzeigen
+DistributionTablePresenter_ERROR_UPDATE_DISTRIBUTION_TERM=Fehler beim Aktualisiren des Verbreitungs-Terms!
+DistributionTableViewBean_AREAS_AND_TAXA=Gebiete und Taxa
+DistributionTableViewBean_SELECT_TAXON=Bitte wählen Sie ein Taxon aus
+DistributionTableViewBean_STATUS=Status
+DistributionTableViewBean_TAXON=Taxon
+DistributionTableViewBean_TAXON_DETAILS=Taxon Details
+DistributionTableViewBean_TOTAL_TAXA=Anzahl angezeigter Taxa: %s
+DistributionToolbar_AREAS_AND_TAXA=Gebiete und Taxa
+DistributionToolbar_DETAIL=Detail
+DistributionToolbar_EDIT=Bearbeiten
+DistributionToolbar_LOGIN=Einloggen
+DistributionToolbar_LOGOUT=Ausloggen
+DistributionToolbar_SAVE=Speichern
+DistributionToolbar_STATUS=Status
+SettingsDialogWindowBase_CANCEL=Abbrechen
+SettingsDialogWindowBase_OK=OK
import com.vaadin.ui.Tree;
import com.vaadin.ui.Window;
+import eu.etaxonomy.cdm.i10n.Messages;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.common.Language;
import eu.etaxonomy.cdm.model.description.CategoricalData;
public Window createWindow(){
Window window = new Window();
window.setHeightUndefined();
- window.setHeight("600px");
- window.setWidth("400px");
+ window.setHeight("600px"); //$NON-NLS-1$
+ window.setWidth("400px"); //$NON-NLS-1$
window.setCaption(taxon.getName().getTitleCache());
window.setCloseShortcut(KeyCode.W, ModifierKey.CTRL);
if(listDescriptions.isEmpty()){
- window.setContent(new Label("No descriptive data found"));
+ window.setContent(new Label(Messages.DetailWindow_NO_DESCRIPTIVE_DATA_FOUND));
}
else{
window.setContent(constructDescriptionTree(taxon));
private Tree constructDescriptionTree(Taxon taxon){
Tree tree = new Tree();
tree.setSizeUndefined();
- String parent = "Descriptive Data";
+ String parent = "Descriptive Data"; //$NON-NLS-1$
tree.setValue(parent);
initDescriptionTree(tree, listDescriptions, parent);
return tree;
import com.vaadin.ui.HorizontalLayout;
import eu.etaxonomy.cdm.api.application.CdmRepository;
+import eu.etaxonomy.cdm.i10n.Messages;
import eu.etaxonomy.cdm.service.CdmUserHelper;
import eu.etaxonomy.cdm.vaadin.event.AuthenticationSuccessEvent;
import eu.etaxonomy.vaadin.ui.navigation.NavigationEvent;
@Autowired
private CdmUserHelper userHelper;
- private final Button loginButton = new Button("Login");
+ private final Button loginButton = new Button(Messages.DistributionToolbar_LOGIN);
- private final Button logoutButton = new Button("Logout");
+ private final Button logoutButton = new Button(Messages.DistributionToolbar_LOGOUT);
private final Button userButton = new Button(FontAwesome.USER);
- private final Button editButton = new Button("Edit");
+ private final Button editButton = new Button(Messages.DistributionToolbar_EDIT);
- private final Button saveButton = new Button("Save");
+ private final Button saveButton = new Button(Messages.DistributionToolbar_SAVE);
- private final Button detailButton = new Button("Detail");
+ private final Button detailButton = new Button(Messages.DistributionToolbar_DETAIL);
- private final Button distributionSettingsButton = new Button("Areas and Taxa");
+ private final Button distributionSettingsButton = new Button(Messages.DistributionToolbar_AREAS_AND_TAXA);
- private final Button settingsButton = new Button("Status");
+ private final Button settingsButton = new Button(Messages.DistributionToolbar_STATUS);
// private final Authentication authentication;
// private ExcelExporter exporter = new ExcelExporter();
public void init() {
setMargin(true);
setSpacing(true);
- setStyleName("toolbar");
- setWidth("100%");
- setHeight("75px");
+ setStyleName("toolbar"); //$NON-NLS-1$
+ setWidth("100%"); //$NON-NLS-1$
+ setHeight("75px"); //$NON-NLS-1$
// exporter.setCaption("Export");
// exporter.setIcon(new ThemeResource("icons/32/document-xsl.png"));
loginButton.addClickListener(e -> performLogin());
logoutButton.addClickListener(e -> performLogout());
- saveButton.setIcon(new ThemeResource("icons/32/document-save.png"));
- editButton.setIcon(new ThemeResource("icons/32/document-edit.png"));
- detailButton.setIcon(new ThemeResource("icons/32/document-txt.png"));
- settingsButton.setIcon(new ThemeResource("icons/32/settings_1.png"));
- distributionSettingsButton.setIcon(new ThemeResource("icons/32/settings_1.png"));
+ saveButton.setIcon(new ThemeResource("icons/32/document-save.png")); //$NON-NLS-1$
+ editButton.setIcon(new ThemeResource("icons/32/document-edit.png")); //$NON-NLS-1$
+ detailButton.setIcon(new ThemeResource("icons/32/document-txt.png")); //$NON-NLS-1$
+ settingsButton.setIcon(new ThemeResource("icons/32/settings_1.png")); //$NON-NLS-1$
+ distributionSettingsButton.setIcon(new ThemeResource("icons/32/settings_1.png")); //$NON-NLS-1$
HorizontalLayout leftLayout = new HorizontalLayout();
leftLayout.addComponent(detailButton);
* @return
*/
private void performLogin() {
- eventBus.publishEvent(new NavigationEvent("login", navigationManager.getCurrentViewName()));
+ eventBus.publishEvent(new NavigationEvent("login", navigationManager.getCurrentViewName())); //$NON-NLS-1$
}
import com.vaadin.ui.VerticalLayout;
import eu.etaxonomy.cdm.common.CdmUtils;
+import eu.etaxonomy.cdm.i10n.Messages;
import eu.etaxonomy.cdm.model.common.TermVocabulary;
import eu.etaxonomy.cdm.model.location.NamedArea;
import eu.etaxonomy.cdm.model.taxon.Classification;
//init classification
Classification classification = presenter.getChosenClassification();
try {
- CdmSQLContainer classificationContainer = new CdmSQLContainer(CdmQueryFactory.generateTableQuery("Classification"));
- classificationContainer.sort(new Object[] {"titleCache"}, new boolean[] {true});
+ CdmSQLContainer classificationContainer = new CdmSQLContainer(CdmQueryFactory.generateTableQuery("Classification")); //$NON-NLS-1$
+ classificationContainer.sort(new Object[] {"titleCache"}, new boolean[] {true}); //$NON-NLS-1$
classificationBox.setContainerDataSource(classificationContainer);
} catch (SQLException e) {
DistributionEditorUtil.showSqlError(e);
rightContainer.setSizeFull();
//classification
- classificationBox = new ComboBox("Classification");
+ classificationBox = new ComboBox(Messages.AreaAndTaxonSettingsConfigWindow_CLASSIFICATION);
classificationBox.setItemCaptionPropertyId(TaxonNodeContainer.LABEL);
- classificationBox.setInputPrompt("Please select a classification...");
+ classificationBox.setInputPrompt(Messages.AreaAndTaxonSettingsConfigWindow_SELECT_CLASSIFICATION);
classificationBox.setImmediate(true);
classificationBox.setNewItemsAllowed(false);
classificationBox.setNullSelectionAllowed(false);
classificationBox.setSizeFull();
- classificationBox.setWidth("100%");
+ classificationBox.setWidth("100%"); //$NON-NLS-1$
//taxonFilter
- taxonFilter = new TextField("Filter");
- taxonFilter.setInputPrompt("Filter taxa by name...");
+ taxonFilter = new TextField(Messages.AreaAndTaxonSettingsConfigWindow_FILTER);
+ taxonFilter.setInputPrompt(Messages.AreaAndTaxonSettingsConfigWindow_FILTER_TAXA_BY_NAME);
taxonFilter.setSizeFull();
taxonFilter.setImmediate(true);
//distribution area box
- distAreaBox = new ComboBox("Distribution Area:");
- distAreaBox.setInputPrompt("Please select a distribution area...");
+ distAreaBox = new ComboBox(Messages.AreaAndTaxonSettingsConfigWindow_DISTRIBUTION_AREA);
+ distAreaBox.setInputPrompt(Messages.AreaAndTaxonSettingsConfigWindow_SELECT_DISTRIBUTION_AREA);
distAreaBox.setImmediate(true);
distAreaBox.setNullSelectionAllowed(false);
distAreaBox.setNewItemsAllowed(false);
distAreaBox.setSizeFull();
- distAreaBox.setWidth("100%");
+ distAreaBox.setWidth("100%"); //$NON-NLS-1$
// named areas
namedAreaList = new ListSelect();
- namedAreaList.setCaption("Areas");
+ namedAreaList.setCaption(Messages.AreaAndTaxonSettingsConfigWindow_AREAS);
namedAreaList.setSizeFull();
namedAreaList.setMultiSelect(true);
//taxonomy
- taxonTree = new TreeTable("Taxonomy");
+ taxonTree = new TreeTable(Messages.AreaAndTaxonSettingsConfigWindow_TAXONOMY);
taxonTree.setSelectable(true);
taxonTree.setSizeFull();
taxonTree.setImmediate(true);
}
else if(property==taxonFilter){
String filterText = taxonFilter.getValue();
- Property<?> uuidProperty = classificationBox.getContainerProperty(classificationBox.getValue(),"uuid");
+ Property<?> uuidProperty = classificationBox.getContainerProperty(classificationBox.getValue(),"uuid"); //$NON-NLS-1$
if(uuidProperty==null){
- Notification.show("Please select a classification");
+ Notification.show(Messages.AreaAndTaxonSettingsConfigWindow_SELECT_CLASSIFICATION);
}
else{
if(CdmUtils.isNotBlank(filterText)){
container.addItem(taxon);
taxonTree.setChildrenAllowed(taxon, false);
}
- taxonTree.setVisibleColumns("titleCache");
+ taxonTree.setVisibleColumns("titleCache"); //$NON-NLS-1$
}
else{
UuidAndTitleCache<TaxonNode> parent = getUuidAndTitleCacheFromRowId(classificationBox.getValue());
if(source==okButton){
List<UUID> taxonNodes = new ArrayList<>();
TermVocabulary<NamedArea> areaVoc = null;
- String uuidString = (String) classificationBox.getContainerProperty(classificationBox.getValue(),"uuid").getValue();
+ String uuidString = (String) classificationBox.getContainerProperty(classificationBox.getValue(),"uuid").getValue(); //$NON-NLS-1$
UUID classificationUuid = UUID.fromString(uuidString);
Set<UuidAndTitleCache<TaxonNode>> treeSelection = (Set<UuidAndTitleCache<TaxonNode>>) taxonTree.getValue();
if(!treeSelection.isEmpty()){
UI.getCurrent().setPollInterval(500);
taxonTree.setEnabled(false);
taxonTree.removeAllItems();
- Notification.show("Loading taxa...");
+ Notification.show(Messages.AreaAndTaxonSettingsConfigWindow_LOADING_TAXA);
new TreeUpdater(children).start();
}
private UuidAndTitleCache<TaxonNode> getUuidAndTitleCacheFromRowId(Object classificationSelection) {
- String uuidString = (String) classificationBox.getContainerProperty(classificationSelection, "uuid").getValue();
+ String uuidString = (String) classificationBox.getContainerProperty(classificationSelection, "uuid").getValue(); //$NON-NLS-1$
Property<Integer> rootNodeContainerProperty = null;
Collection<?> ids = classificationBox.getContainerPropertyIds();
//use for loop here because the case of the root node id columns differs between some DBs
for (Object id : ids) {
- if(id instanceof String && ((String) id).toLowerCase().equals("rootnode_id")){
+ if(id instanceof String && ((String) id).toLowerCase().equals("rootnode_id")){ //$NON-NLS-1$
rootNodeContainerProperty = classificationBox.getContainerProperty(classificationSelection, id);
break;
}
}
int id = rootNodeContainerProperty.getValue();
- String titleCache = (String) classificationBox.getContainerProperty(classificationSelection, "titleCache").getValue();
+ String titleCache = (String) classificationBox.getContainerProperty(classificationSelection, "titleCache").getValue(); //$NON-NLS-1$
UUID uuid = UUID.fromString(uuidString);
UuidAndTitleCache<TaxonNode> parent = new UuidAndTitleCache<>(uuid, id, titleCache);
return parent;
public void run() {
taxonTree.setContainerDataSource(new TaxonNodeContainer(children));
- Notification notification = new Notification("Loading complete");
+ Notification notification = new Notification(Messages.AreaAndTaxonSettingsConfigWindow_LOADING_COMPLETE);
notification.setDelayMsec(500);
notification.show(Page.getCurrent());
taxonTree.setEnabled(true);
- taxonTree.setSortContainerPropertyId("titleCache");
+ taxonTree.setSortContainerPropertyId("titleCache"); //$NON-NLS-1$
taxonTree.sort();
//disable polling when all taxa are loaded
import com.vaadin.ui.ListSelect;
import com.vaadin.ui.VerticalLayout;
+import eu.etaxonomy.cdm.i10n.Messages;
import eu.etaxonomy.cdm.vaadin.util.DistributionEditorUtil;
import eu.etaxonomy.cdm.vaadin.view.distributionStatus.settings.DistributionStatusSettingsPresenter;
mainLayout.setSpacing(true);
//distribution status
- distStatusSelect = new ListSelect("Distribution Status:");
+ distStatusSelect = new ListSelect(Messages.DistributionStatusSettingsConfigWindow_DISTRIBUTION_STATUS);
distStatusSelect.setImmediate(false);
distStatusSelect.setMultiSelect(true);
distStatusSelect.setSizeFull();
- distStatusSelect.setWidth("100%");
+ distStatusSelect.setWidth("100%"); //$NON-NLS-1$
//toggle abbreviated labels
- boxToggleAbbreviatedLabels = new CheckBox("Show abbreviated labels", DistributionEditorUtil.isAbbreviatedLabels());
+ boxToggleAbbreviatedLabels = new CheckBox(Messages.DistributionStatusSettingsConfigWindow_SHOW_ABBREVIATED_LABELS, DistributionEditorUtil.isAbbreviatedLabels());
boxToggleAbbreviatedLabels.setImmediate(true);
mainLayout.addComponent(boxToggleAbbreviatedLabels);
import com.vaadin.ui.Notification;
import eu.etaxonomy.cdm.api.application.CdmRepository;
+import eu.etaxonomy.cdm.i10n.Messages;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
import eu.etaxonomy.cdm.model.common.Language;
}
}
if(namedArea==null){
- Notification.show("Error during update of distribution term!");
+ Notification.show(Messages.DistributionTablePresenter_ERROR_UPDATE_DISTRIBUTION_TERM);
repo.commitTransaction(tx);
return -1;
}
VaadinSession session = VaadinSession.getCurrent();
UUID vocUUID = (UUID) session.getAttribute(DistributionEditorUtil.SATTR_SELECTED_AREA_VOCABULARY_UUID);
// getConversationHolder().getSession();
- TermVocabulary<DefinedTermBase> voc = CdmSpringContextHelper.getVocabularyService().load(vocUUID, Arrays.asList("terms"));
+ TermVocabulary<DefinedTermBase> voc = CdmSpringContextHelper.getVocabularyService().load(vocUUID, Arrays.asList("terms")); //$NON-NLS-1$
// voc = CdmBase.deproxy(voc);
return voc.getTerms();
}
private List<NamedArea> getTermSet(){
VaadinSession session = VaadinSession.getCurrent();
UUID vocUUID = (UUID) session.getAttribute(DistributionEditorUtil.SATTR_SELECTED_AREA_VOCABULARY_UUID);
- TermVocabulary<NamedArea> vocabulary = CdmSpringContextHelper.getVocabularyService().load(vocUUID, Arrays.asList("terms"));
+ TermVocabulary<NamedArea> vocabulary = CdmSpringContextHelper.getVocabularyService().load(vocUUID, Arrays.asList("terms")); //$NON-NLS-1$
vocabulary = CdmBase.deproxy(vocabulary, TermVocabulary.class);
return vocabulary.getTermsOrderedByLabels(Language.DEFAULT()).stream().collect(Collectors.toCollection(ArrayList::new));
}
}
protected static final List<String> DESCRIPTION_INIT_STRATEGY = Arrays.asList(new String []{
- "$",
- "elements.*",
- "elements.sources.citation.authorship.$",
- "elements.sources.nameUsedInSource.originalNameString",
- "elements.area.level",
- "elements.modifyingText",
- "elements.states.*",
- "elements.media",
- "elements.multilanguageText",
- "multilanguageText",
- "stateData.$",
- "annotations",
- "markers",
- "sources.citation.authorship",
- "sources.nameUsedInSource",
- "multilanguageText",
- "media",
- "name.$",
- "name.rank",
- "name.status.type",
- "taxon2.name",
+ "$", //$NON-NLS-1$
+ "elements.*", //$NON-NLS-1$
+ "elements.sources.citation.authorship.$", //$NON-NLS-1$
+ "elements.sources.nameUsedInSource.originalNameString", //$NON-NLS-1$
+ "elements.area.level", //$NON-NLS-1$
+ "elements.modifyingText", //$NON-NLS-1$
+ "elements.states.*", //$NON-NLS-1$
+ "elements.media", //$NON-NLS-1$
+ "elements.multilanguageText", //$NON-NLS-1$
+ "multilanguageText", //$NON-NLS-1$
+ "stateData.$", //$NON-NLS-1$
+ "annotations", //$NON-NLS-1$
+ "markers", //$NON-NLS-1$
+ "sources.citation.authorship", //$NON-NLS-1$
+ "sources.nameUsedInSource", //$NON-NLS-1$
+ "multilanguageText", //$NON-NLS-1$
+ "media", //$NON-NLS-1$
+ "name.$", //$NON-NLS-1$
+ "name.rank", //$NON-NLS-1$
+ "name.status.type", //$NON-NLS-1$
+ "taxon2.name", //$NON-NLS-1$
});
/**Helper Methods*/
import com.vaadin.ui.UI;
import com.vaadin.ui.Window;
+import eu.etaxonomy.cdm.i10n.Messages;
import eu.etaxonomy.cdm.model.common.Language;
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
import eu.etaxonomy.cdm.model.location.NamedArea;
implements IDistributionTableView, AccessRestrictedView {
private static final long serialVersionUID = 1L;
- public static final String NAME = "distGrid";
+ public static final String NAME = "distGrid"; //$NON-NLS-1$
@Autowired
private DistributionToolbar toolbar;
private AbsoluteLayout initLayout() {
AbsoluteLayout mainLayout = new AbsoluteLayout();
mainLayout.setImmediate(false);
- mainLayout.setWidth("100%");
- mainLayout.setHeight("100%");
+ mainLayout.setWidth("100%"); //$NON-NLS-1$
+ mainLayout.setHeight("100%"); //$NON-NLS-1$
- setWidth("100.0%");
- setHeight("100.0%");
+ setWidth("100.0%"); //$NON-NLS-1$
+ setHeight("100.0%"); //$NON-NLS-1$
//Horizontal Toolbar
- mainLayout.addComponent(toolbar, "top:0.0px;right:0.0px;");
+ mainLayout.addComponent(toolbar, "top:0.0px;right:0.0px;"); //$NON-NLS-1$
// // table + formatting
// table = new Table(){
grid.setSizeFull();
grid.setEditorEnabled(true);
grid.setFooterVisible(true);
- mainLayout.addComponent(grid, "top:75px;right:10.0px;left:10.0px;");
+ mainLayout.addComponent(grid, "top:75px;right:10.0px;left:10.0px;"); //$NON-NLS-1$
return mainLayout;
}
uuidColumn.setHidden(true);
Column taxonColumn = grid.getColumn(DistributionStatusQuery.TAXON_COLUMN);
taxonColumn.setEditable(false);
- taxonColumn.setHeaderCaption("Taxon");
+ taxonColumn.setHeaderCaption(Messages.DistributionTableViewBean_TAXON);
taxonColumn.setLastFrozenColumn();
Converter<String, UUID> displayConverter = new PresenceAbsenceTermUuidTitleStringConverter();
termSelect.setSizeFull();
termSelect.setContainerDataSource(getPresenter().getPresenceAbsenceTermContainer());
termSelect.setItemCaptionMode(ItemCaptionMode.PROPERTY);
- termSelect.setItemCaptionPropertyId("titleCache");
+ termSelect.setItemCaptionPropertyId("titleCache"); //$NON-NLS-1$
termSelect.setConverter(editorConverter);
termSelect.setImmediate(true);
c.setEditorField(termSelect);
}else {
footerCell = footerRow.getCell(cells[0]);
}
- footerCell.setText("Total amount of Taxa displayed: " + gridcontainer.size());
+ footerCell.setText(String.format(Messages.DistributionTableViewBean_TOTAL_TAXA, gridcontainer.size()));
}
private void createEditClickListener(){
//details
Button detailButton = toolbar.getDetailButton();
- detailButton.setCaption("Taxon Details");
+ detailButton.setCaption(Messages.DistributionTableViewBean_TAXON_DETAILS);
detailButton.addClickListener(event -> {
// Object selectedItemId = DistributionTableViewBean.this.table.getValue();
Object selectedItemId = DistributionTableViewBean.this.grid.getSelectedRow();
getUI().addWindow(window);
}
else{
- Notification.show("Please select a taxon", Type.HUMANIZED_MESSAGE);
+ Notification.show(Messages.DistributionTableViewBean_SELECT_TAXON, Type.HUMANIZED_MESSAGE);
}
}
);
if(distributionStatusConfigWindow==null){
distributionStatusConfigWindow = new DistributionStatusSettingsConfigWindow(this);
}
- Window window = distributionStatusConfigWindow.createWindow("Status");
- window.setWidth("25%");
- window.setHeight("60%");
+ Window window = distributionStatusConfigWindow.createWindow(Messages.DistributionTableViewBean_STATUS);
+ window.setWidth("25%"); //$NON-NLS-1$
+ window.setHeight("60%"); //$NON-NLS-1$
UI.getCurrent().addWindow(window);
}
if(areaAndTaxonConfigWindow==null){
areaAndTaxonConfigWindow = new AreaAndTaxonSettingsConfigWindow(this);
}
- Window window = areaAndTaxonConfigWindow.createWindow("Areas and Taxa");
+ Window window = areaAndTaxonConfigWindow.createWindow(Messages.DistributionTableViewBean_AREAS_AND_TAXA);
UI.getCurrent().addWindow(window);
}
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Window;
+import eu.etaxonomy.cdm.i10n.Messages;
import eu.etaxonomy.cdm.vaadin.view.distributionStatus.settings.SettingsPresenterBase;
@SuppressWarnings("serial")
HorizontalLayout buttonToolBar = new HorizontalLayout();
// cancelButton
cancelButton = new Button();
- cancelButton.setCaption("Cancel");
+ cancelButton.setCaption(Messages.SettingsDialogWindowBase_CANCEL);
cancelButton.setImmediate(true);
- cancelButton.addStyleName("dialogButton");
+ cancelButton.addStyleName("dialogButton"); //$NON-NLS-1$
buttonToolBar.addComponent(cancelButton);
// okButton
okButton = new Button();
- okButton.setCaption("OK");
+ okButton.setCaption(Messages.SettingsDialogWindowBase_OK);
okButton.setImmediate(true);
- okButton.addStyleName("dialogButton");
+ okButton.addStyleName("dialogButton"); //$NON-NLS-1$
buttonToolBar.addComponent(okButton);
return buttonToolBar;
}
public Window createWindow(String caption) {
window = new Window();
window.setModal(true);
- window.setWidth("60%");
- window.setHeight("80%");
+ window.setWidth("60%"); //$NON-NLS-1$
+ window.setHeight("80%"); //$NON-NLS-1$
window.setCaption(caption);
window.setContent(mainLayout);
return window;