diff --git a/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/ModelHandlerImpl.java b/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/ModelHandlerImpl.java index 88b7b65..72f8c5d 100644 --- a/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/ModelHandlerImpl.java +++ b/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/ModelHandlerImpl.java @@ -36,6 +36,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; +import org.hmx.scitos.ais.core.i18n.AisMessage; import org.hmx.scitos.ais.domain.IDetailCategoryProvider; import org.hmx.scitos.ais.domain.model.AisProject; import org.hmx.scitos.ais.domain.model.DetailCategory; @@ -43,7 +44,6 @@ import org.hmx.scitos.ais.domain.model.TextToken; import org.hmx.scitos.core.AbstractModelHandler; import org.hmx.scitos.core.HmxException; -import org.hmx.scitos.core.i18n.Message; import org.hmx.scitos.domain.util.ComparisonUtil; /** @@ -444,14 +444,14 @@ private void checkValidityOfIntersectedCategoryAssignments(final List && (!trailingConflicts.containsKey(conflictingDetail) || trailingConflicts.get(conflictingDetail).get() > conflictCount); if (requiredDetailStartNotMet || requiredDetailEndNotMet) { // the intersected detail category cannot be resolved - throw new HmxException(Message.ERROR_AIS_SELECTION_INVALID); + throw new HmxException(AisMessage.ERROR_AIS_SELECTION_INVALID); } } if (enclosedOrphan != null && (!leadingConflicts.containsKey(enclosedOrphan) || !trailingConflicts.containsKey(enclosedOrphan) || leadingConflicts.get(enclosedOrphan).get() < 1 || trailingConflicts.get(enclosedOrphan).get() > -1)) { // the enclosed detail category could not be resolved - throw new HmxException(Message.ERROR_AIS_SELECTION_INVALID); + throw new HmxException(AisMessage.ERROR_AIS_SELECTION_INVALID); } } diff --git a/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/ModelParseServiceImpl.java b/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/ModelParseServiceImpl.java index 099d833..a3be7e0 100644 --- a/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/ModelParseServiceImpl.java +++ b/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/ModelParseServiceImpl.java @@ -37,6 +37,7 @@ import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; +import org.hmx.scitos.ais.core.i18n.AisMessage; import org.hmx.scitos.ais.domain.IDetailCategoryProvider; import org.hmx.scitos.ais.domain.model.AisProject; import org.hmx.scitos.ais.domain.model.DetailCategory; @@ -60,7 +61,7 @@ public class ModelParseServiceImpl implements IModelParseService { /** The embedded/export stylesheet for the conversion to a html page. */ - private static final ExportOption HTML_EXPORT = new ExportOption(Message.AIS_PROJECT_EXPORT_HTML, ExportOption.TargetFileType.HTML, + private static final ExportOption HTML_EXPORT = new ExportOption(AisMessage.PROJECT_EXPORT_HTML, ExportOption.TargetFileType.HTML, "/org/hmx/scitos/ais/stylesheet.xsl"); /* * Collection of the XML tags and attributes for representing an AIS module's project in its persisted form. diff --git a/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/i18n/AisMessage.java b/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/i18n/AisMessage.java new file mode 100644 index 0000000..4fc75df --- /dev/null +++ b/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/i18n/AisMessage.java @@ -0,0 +1,115 @@ +/* + Copyright (C) 2015 HermeneutiX.org + + This file is part of SciToS. + + SciToS is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + SciToS is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with SciToS. If not, see . + */ + +package org.hmx.scitos.ais.core.i18n; + +import java.util.Locale; + +import org.hmx.scitos.core.i18n.ILocalizableMessage; +import org.hmx.scitos.core.i18n.Translator; + +/** + * Utility class for internationalization of the components on the AIS module's graphical user interface. + */ +public enum AisMessage implements ILocalizableMessage { + // general project actions + PROJECT_NEW("Ais.Project.New"), + PROJECT_EXPORT_HTML("Ais.Project.Export.Html"), + PROJECT_CHANGE_CATEGORIES("Ais.Project.ChangeDetailCategories"), + // the matching dialog for detail category changes on an active project + PROJECT_CHANGE_CATEGORIES_MATCHING("Ais.Project.ChangeDetailCategories.MatchOldToNew"), + PROJECT_CHANGE_CATEGORIES_MATCHING_DESCRIPTION("Ais.Project.ChangeDetailCategories.MatchOldToNew.Description"), + PROJECT_CHANGE_CATEGORIES_AFFECTED_TOKENS("Ais.Project.ChangeDetailCategories.AffectedTokens"), + PROJECT_CHANGE_CATEGORIES_OLD("Ais.Project.ChangeDetailCategories.OldCategory"), + PROJECT_CHANGE_CATEGORIES_NEW("Ais.Project.ChangeDetailCategories.ReplacingCategory"), + // creating, modifying (participant, order), and deleting an interview + INTERVIEW_NEW("Ais.Interview.New"), + INTERVIEW_NEW_PARTICIPANTID("Ais.Interview.New.ParticipantId"), + INTERVIEW_CHANGE_PARTICIPANTID("Ais.Interview.Modify.ParticipantId"), + INTERVIEW_CHANGE_PARTICIPANTID_DESCRIPTION("Ais.Interview.Modify.ParticipantId.Description"), + INTERVIEW_CHANGE_PARTICIPANTID_ALREADY_EXISTS("Ais.Interview.Modify.ParticipantId.AlreadyExists"), + INTERVIEW_CHANGE_ORDER("Ais.Interview.Modify.Order"), + INTERVIEW_DELETE("Ais.Interview.Delete"), + INTERVIEW_DELETE_WARNING("Ais.Interview.Delete.Warning"), + // hints and buttons for the actual usage (inserting and scoring an interview) + INTERVIEW_TEXTINPUT_HINT("Ais.Interview.InputHint"), + INTERVIEW_START_SCORING("Ais.Interview.StartScoring"), + SCORE_REMOVE("Ais.Interview.Score.Remove"), + SCORE_REMOVE_TOOLTIP("Ais.Interview.Score.RemoveToolTip"), + ERROR_AIS_SELECTION_INVALID("Ais.Interview.Score.SelectionInvalid"), + // the pattern analysis (i.e. summary) on the project's main tab + ANALYSIS_SUMMARY("Ais.Analysis.Summary"), + ANALYSIS_SEQUENCE("Ais.Analysis.Sequence"), + ANALYSIS_PATTERN("Ais.Analysis.Pattern"), + ANALYSIS_TABLE_HEADER_INTERVIEW("Ais.Analysis.TableHeader.Interview"), + ANALYSIS_TABLE_HEADER_TOKENCOUNT("Ais.Analysis.TableHeader.TokenCount"), + ANALYSIS_NOT_SCORED("Ais.Analysis.TableContent.NoDetailsScored"), + ANALYSIS_EXPORT("Ais.Analysis.ExportToSpreadsheet"), + ERROR_EXPORT_FAILED("Ais.Analysis.ExportToSpreadSheet.Failure"), + // modification of a detail category model + DETAIL_CATEGORIES_INVALID("Ais.DetailCategories.Invalid"), + DETAIL_CATEGORY_ADD_ROOT("Ais.DetailCategory.AddRootCategory"), + DETAIL_CATEGORY_ADD_CHILD("Ais.DetailCategory.AddChildCategory"), + DETAIL_CATEGORY_CODE("Ais.DetailCategory.Code"), + DETAIL_CATEGORY_CODE_DUPLICATE("Ais.DetailCategory.Code.NotUnique"), + DETAIL_CATEGORY_COLOR("Ais.DetailCategory.Color"), + DETAIL_CATEGORY_DELETE("Ais.DetailCategory.Delete"), + DETAIL_CATEGORY_NAME("Ais.DetailCategory.Name"), + DETAIL_CATEGORY_SHORTCUT("Ais.DetailCategory.ShortCut"), + DETAIL_CATEGORIES_AS_DEFAULT("Ais.DetailCategories.SetAsDefault"), + // application preferences entry + PREFERENCES("Ais.Client.Preferences.NodeLabel"), + PREFERENCES_DETAIL_CATEGORIES("Ais.Client.Preferences.DetailCategories.Default"); + + /** The static translator instance to use for all messages of this type. */ + private static final Translator TRANSLATOR = new Translator(AisMessage.class); + + /** The attribute's key as it can be found in the actual language files. */ + final String key; + + /** + * Main constructor. + * + * @param messageKey + * actual key in the language file + */ + private AisMessage(final String messageKey) { + this.key = messageKey; + } + + @Override + public String getKey() { + return this.key; + } + + @Override + public String get() { + return this.get(Locale.getDefault()); + } + + @Override + public String get(final Locale locale) { + return AisMessage.TRANSLATOR.getLocalizedMessage(this, locale); + } + + @Override + public String toString() { + return this.get(); + } +} diff --git a/scitos.ais/scitos.ais.core/src/main/resources/lang/aismessages.xml b/scitos.ais/scitos.ais.core/src/main/resources/lang/aismessages.xml new file mode 100644 index 0000000..02267e9 --- /dev/null +++ b/scitos.ais/scitos.ais.core/src/main/resources/lang/aismessages.xml @@ -0,0 +1,74 @@ + + + + + Export to Spreadsheet + Scoring Summary + Detail Sequence + Detail Pattern + Interview + Token Count + no scored interviews yet + Default Detail Categories for new Projects/Files + AIS + The defined Detail Category structure is invalid. + +Each Category needs to have a unique Code label, +with at least one and up to five characters/symbols. + Use as Default for new Projects/Files + Add Child Category + Add Root Category + Code + The Code for the inserted Detail Category is invalid. + +Please insert an unique Code label, +with at least one and up to five characters/symbols. + Color + Delete Category + Name + Short Cut + Delete Interview + The selected Interview is going to be deleted. + +This is irreversible and cannot be undone. + Type or paste in the transcribed Interview. + Change order of Participant's Interviews + Change assigned Participant ID + Insert Participant ID to assign: + Add new Interview + Participant ID: + Start Scoring + Invalid interrupted selection: + +All intersected Detail Categories need to be fully contained between the first and last selected Token. + Remove + Clear assigned Detail Categories from selection. + Modify Detail Categories + Replace old Detail Category with new one + You are making structural changes that are affecting already used Detail Categories. + +Please select which (new) Category should replace which (old) Category. +Category assignments without a selected replacement are being discarded. + Old Detail Category + Number of Affected Tokens + Replaced With New Category + HTML file + Where to save the new AIS Project? + \ No newline at end of file diff --git a/scitos.ais/scitos.ais.core/src/main/resources/lang/aismessages_de.xml b/scitos.ais/scitos.ais.core/src/main/resources/lang/aismessages_de.xml new file mode 100644 index 0000000..052c643 --- /dev/null +++ b/scitos.ais/scitos.ais.core/src/main/resources/lang/aismessages_de.xml @@ -0,0 +1,77 @@ + + + + + Tabellen Exportieren + Ergebnisse + Sequenzen + Muster + Interview + Tokenanzahl + noch keine analysierten Interviews + Standard Kategorien für neue Projekte/Dateien + AIS + Das definierte Kategorie-Modell ist ungültig. + +Jeder Kategorie muss ein eindeutiger Name, +mit einer Länge von ein bis fünf Zeichen, +zugeordnet sein. + Als Standard für neue Projekte/Dateien verwenden + Unterkategorie hinzufügen + Oberkategorie hinzufügen + Name + Der eingegebene Name ist ungültig. + +Bitte wähle einen eindeutigen Namen, +mit einer Länge von ein bis fünf Zeichen. + Farbe + Kategorie entfernen + Beschreibung + Tastenkombination + Interview löschen + Das ausgewählte Interview wird gelöscht. + +Dieser Schritt kann nicht rückgängig gemacht werden. + Reihenfolge der Interviews eines Studienteilnehmers bearbeiten + Studienteilnehmer umbenennen + Neuen Bezeichner für Studienteilnehmer eingeben: + Neues Interview anlegen + Bezeichner für Studienteilnehmer: + Transkribierten Text des Interviews eingeben oder hineinkopieren. + Beginne Scoring + Ungültige unterbrochene Auswahl: + +Eingeschlossene Kategorien müssen abgeschlossen sein. +Sie müssen im ausgewählten/eingeschlossenen Bereich beginnen und enden. + Entfernen + Zugewiesene Kategorien von ausgewählten Token entfernen. + Kategoriemodell bearbeiten + Anzahl zugeordneter Token + Alte Kategorien durch neue ersetzen + +Du bist dabei strukturelle Veränderungen vorzunehmen, die sich auf bereits zugewiesene Kategorien auswirken. + +Bitte wähle aus, welche (neue) Kategorie an Stelle welcher (alten) Kategorie zugewiesen werden soll. +Zugeordnete Kategorien ohne Entsprechung im neuen Modell werden verworfen! + Alte Kategorie + Ersetzt durch neue Kategorie + HTML-Datei + Wo soll das neue AIS Projekt gespeichert werden? + diff --git a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/ProjectViewServiceImpl.java b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/ProjectViewServiceImpl.java index 54218a2..b57e076 100644 --- a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/ProjectViewServiceImpl.java +++ b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/ProjectViewServiceImpl.java @@ -30,12 +30,12 @@ import org.hmx.scitos.ais.core.AisOption; import org.hmx.scitos.ais.core.ModelHandlerImpl; +import org.hmx.scitos.ais.core.i18n.AisMessage; import org.hmx.scitos.ais.domain.model.AisProject; import org.hmx.scitos.ais.domain.model.Interview; import org.hmx.scitos.ais.view.swing.components.InterviewView; import org.hmx.scitos.ais.view.swing.components.ParticipantInterviewGroupView; import org.hmx.scitos.ais.view.swing.components.ProjectOverView; -import org.hmx.scitos.core.i18n.Message; import org.hmx.scitos.domain.IModel; import org.hmx.scitos.view.FileType; import org.hmx.scitos.view.IViewProject; @@ -70,7 +70,7 @@ public ProjectViewServiceImpl(final ScitosClient client, final AisOption options @Override public AisViewProject createEmptyProject() { - final File path = this.client.getSaveDestination(FileType.AIS.getFileExtension(), Message.AIS_PROJECT_NEW.get()); + final File path = this.client.getSaveDestination(FileType.AIS.getFileExtension(), AisMessage.PROJECT_NEW.get()); if (path != null) { final AisProject mainModel = new AisProject("", this.options.provide()); final AisViewProject project = new AisViewProject(this.client, new ModelHandlerImpl(mainModel), path); @@ -92,21 +92,21 @@ public JPopupMenu createContextMenu(final IViewProject project, final Object return null; } final JPopupMenu menu = new JPopupMenu(project.getLabel(element)); - menu.add(new JMenuItem(Message.AIS_INTERVIEW_CHANGE_PARTICIPANTID.get())).addActionListener(new ActionListener() { + menu.add(new JMenuItem(AisMessage.INTERVIEW_CHANGE_PARTICIPANTID.get())).addActionListener(new ActionListener() { @Override public void actionPerformed(final ActionEvent event) { ProjectViewServiceImpl.this.renameParticipant((AisViewProject) project, element); } }); - menu.addSeparator(); if (element instanceof Interview) { - menu.add(new JMenuItem(Message.AIS_INTERVIEW_DELETE.get())).addActionListener(new ActionListener() { + menu.addSeparator(); + menu.add(new JMenuItem(AisMessage.INTERVIEW_DELETE.get())).addActionListener(new ActionListener() { @Override public void actionPerformed(final ActionEvent event) { - if (MessageHandler.Choice.YES == MessageHandler.showConfirmDialog(Message.AIS_INTERVIEW_DELETE_WARNING.get(), - Message.AIS_INTERVIEW_DELETE.get() + " - " + project.getLabel(element))) { + if (MessageHandler.Choice.YES == MessageHandler.showConfirmDialog(AisMessage.INTERVIEW_DELETE_WARNING.get(), + AisMessage.INTERVIEW_DELETE.get() + " - " + project.getLabel(element))) { ((AisViewProject) project).getModelHandler().deleteInterview((Interview) element); } } @@ -131,8 +131,8 @@ void renameParticipant(final AisViewProject project, final Object element) { currentParticipantId = element.toString(); } final String modifiedParticipantId = - MessageHandler.showInputDialog(Message.AIS_INTERVIEW_CHANGE_PARTICIPANTID_DESCRIPTION, Message.AIS_INTERVIEW_CHANGE_PARTICIPANTID - + " - " + project.getLabel(element), currentParticipantId); + MessageHandler.showInputDialog(AisMessage.INTERVIEW_CHANGE_PARTICIPANTID_DESCRIPTION.get(), + AisMessage.INTERVIEW_CHANGE_PARTICIPANTID.get() + " - " + project.getLabel(element), currentParticipantId); if (modifiedParticipantId == null || modifiedParticipantId.trim().isEmpty() || currentParticipantId.equals(modifiedParticipantId)) { return; } diff --git a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/AbstractAisProjectView.java b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/AbstractAisProjectView.java index 58b4807..95f8fca 100644 --- a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/AbstractAisProjectView.java +++ b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/AbstractAisProjectView.java @@ -31,10 +31,10 @@ import org.hmx.scitos.ais.core.AisOption; import org.hmx.scitos.ais.core.IModelHandler; +import org.hmx.scitos.ais.core.i18n.AisMessage; import org.hmx.scitos.ais.domain.model.AisProject; import org.hmx.scitos.ais.domain.model.Interview; import org.hmx.scitos.ais.view.swing.AisViewProject; -import org.hmx.scitos.core.i18n.Message; import org.hmx.scitos.view.ScitosIcon; import org.hmx.scitos.view.swing.AbstractProjectView; import org.hmx.scitos.view.swing.MessageHandler; @@ -72,7 +72,7 @@ protected AbstractAisProjectView(final AisViewProject project, final M model, fi @Override public List createEditMenuItems() { final List editMenuItems = new LinkedList(); - final JMenuItem changeCategoryModelItem = new JMenuItem(Message.AIS_PROJECT_CHANGE_CATEGORIES.get(), ScitosIcon.CONFIG.create()); + final JMenuItem changeCategoryModelItem = new JMenuItem(AisMessage.PROJECT_CHANGE_CATEGORIES.get(), ScitosIcon.CONFIG.create()); changeCategoryModelItem.addActionListener(new ActionListener() { @Override @@ -90,7 +90,7 @@ public void actionPerformed(final ActionEvent event) { public List createToolBarItems() { final List toolBarItems = new LinkedList(); final JButton addInterviewButton = new JButton(ScitosIcon.MODEL_ELEMENT_ADD.create()); - addInterviewButton.setToolTipText(Message.AIS_INTERVIEW_NEW.get()); + addInterviewButton.setToolTipText(AisMessage.INTERVIEW_NEW.get()); addInterviewButton.addActionListener(new ActionListener() { @Override @@ -114,7 +114,7 @@ protected void createInterview() { preset = ""; } final String participantId = - MessageHandler.showInputDialog(Message.AIS_INTERVIEW_NEW_PARTICIPANTID, Message.AIS_INTERVIEW_NEW.get(), preset); + MessageHandler.showInputDialog(AisMessage.INTERVIEW_NEW_PARTICIPANTID.get(), AisMessage.INTERVIEW_NEW.get(), preset); if (participantId != null && !participantId.trim().isEmpty()) { this.getProject().getModelHandler().createInterview(participantId.trim()); } diff --git a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/CategoryModelChangeDialog.java b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/CategoryModelChangeDialog.java index 7d3fc91..45cf312 100644 --- a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/CategoryModelChangeDialog.java +++ b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/CategoryModelChangeDialog.java @@ -46,6 +46,7 @@ import org.hmx.scitos.ais.core.AisOption; import org.hmx.scitos.ais.core.IModelHandler; +import org.hmx.scitos.ais.core.i18n.AisMessage; import org.hmx.scitos.ais.domain.model.DetailCategory; import org.hmx.scitos.ais.domain.model.Interview; import org.hmx.scitos.ais.domain.model.MutableDetailCategoryModel; @@ -72,7 +73,7 @@ public final class CategoryModelChangeDialog extends JDialog { * the handler instance to set the default for new projects on */ public CategoryModelChangeDialog(final IModelHandler modelHandler, final AisOption options) { - super(ScitosApp.getClient().getFrame(), Message.AIS_PROJECT_CHANGE_CATEGORIES.get(), true); + super(ScitosApp.getClient().getFrame(), AisMessage.PROJECT_CHANGE_CATEGORIES.get(), true); this.modelHandler = modelHandler; this.options = options; final JPanel contentPane = new JPanel(new BorderLayout()); @@ -207,10 +208,10 @@ private class CategoryModelMatchSubDialog extends JDialog { */ CategoryModelMatchSubDialog(final Map oldDetailOccurences, final MutableDetailCategoryModel newModel, final Map preset) { - super(CategoryModelChangeDialog.this, Message.AIS_PROJECT_CHANGE_CATEGORIES_MATCHING.get(), true); + super(CategoryModelChangeDialog.this, AisMessage.PROJECT_CHANGE_CATEGORIES_MATCHING.get(), true); final JPanel contentPane = new JPanel(new GridBagLayout()); final JLabel descriptionLabel = - new JLabel("" + Message.AIS_PROJECT_CHANGE_CATEGORIES_MATCHING_DESCRIPTION.get().replaceAll("[\n]", "
")); + new JLabel("" + AisMessage.PROJECT_CHANGE_CATEGORIES_MATCHING_DESCRIPTION.get().replaceAll("[\n]", "
")); descriptionLabel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); final GridBagConstraints constraints = new GridBagConstraints(); constraints.fill = GridBagConstraints.BOTH; @@ -221,7 +222,7 @@ private class CategoryModelMatchSubDialog extends JDialog { final Border headerBorder = BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(2, 10, 1, 10), BorderFactory.createMatteBorder(0, 0, 1, 0, Color.BLACK)); - final JLabel leftColumnHeader = new JLabel(Message.AIS_PROJECT_CHANGE_CATEGORIES_OLD.get(), SwingConstants.CENTER); + final JLabel leftColumnHeader = new JLabel(AisMessage.PROJECT_CHANGE_CATEGORIES_OLD.get(), SwingConstants.CENTER); leftColumnHeader.setOpaque(true); leftColumnHeader.setBackground(Color.WHITE); leftColumnHeader.setBorder(headerBorder); @@ -229,13 +230,13 @@ private class CategoryModelMatchSubDialog extends JDialog { constraints.gridwidth = 1; constraints.weightx = 1; contentPane.add(leftColumnHeader, constraints); - final JLabel midColumnHeader = new JLabel(Message.AIS_PROJECT_CHANGE_CATEGORIES_AFFECTED_TOKENS.get(), SwingConstants.CENTER); + final JLabel midColumnHeader = new JLabel(AisMessage.PROJECT_CHANGE_CATEGORIES_AFFECTED_TOKENS.get(), SwingConstants.CENTER); midColumnHeader.setOpaque(true); midColumnHeader.setBackground(Color.WHITE); midColumnHeader.setBorder(headerBorder); constraints.gridx = 1; contentPane.add(midColumnHeader, constraints); - final JLabel rightColumnHeader = new JLabel(Message.AIS_PROJECT_CHANGE_CATEGORIES_NEW.get(), SwingConstants.CENTER); + final JLabel rightColumnHeader = new JLabel(AisMessage.PROJECT_CHANGE_CATEGORIES_NEW.get(), SwingConstants.CENTER); rightColumnHeader.setOpaque(true); rightColumnHeader.setBackground(Color.WHITE); rightColumnHeader.setBorder(headerBorder); diff --git a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/DetailCategoryTreeModel.java b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/DetailCategoryTreeModel.java index 445ce0d..382388c 100644 --- a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/DetailCategoryTreeModel.java +++ b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/DetailCategoryTreeModel.java @@ -33,10 +33,10 @@ import javax.swing.KeyStroke; import javax.swing.tree.TreePath; +import org.hmx.scitos.ais.core.i18n.AisMessage; import org.hmx.scitos.ais.domain.IDetailCategoryProvider; import org.hmx.scitos.ais.domain.model.DetailCategory; import org.hmx.scitos.ais.domain.model.MutableDetailCategoryModel; -import org.hmx.scitos.core.i18n.Message; import org.hmx.scitos.domain.util.ComparisonUtil; import org.jdesktop.swingx.treetable.AbstractTreeTableModel; @@ -212,15 +212,13 @@ public int getColumnCount() { public String getColumnName(final int columnIndex) { switch (columnIndex) { case 0: - return Message.AIS_PREFERENCES_DETAIL_CATEGORIES_CODE.get(); + return AisMessage.DETAIL_CATEGORY_CODE.get(); case 1: - return Message.AIS_PREFERENCES_DETAIL_CATEGORIES_NAME.get(); + return AisMessage.DETAIL_CATEGORY_NAME.get(); case 2: - return Message.AIS_PREFERENCES_DETAIL_CATEGORIES_COLOR.get(); + return AisMessage.DETAIL_CATEGORY_COLOR.get(); case 3: - return Message.AIS_PREFERENCES_DETAIL_CATEGORIES_SHORTCUT.get(); - case 6: - return Message.AIS_PREFERENCES_DETAIL_CATEGORIES_MATCH.get(); + return AisMessage.DETAIL_CATEGORY_SHORTCUT.get(); default: // no column header for the buttons return ""; @@ -265,11 +263,11 @@ public Object getValueAt(final Object node, final int column) { case 3: return row.shortCut; case 4: - return Message.AIS_PREFERENCES_DETAIL_CATEGORY_ADD_CHILD.get(); + return AisMessage.DETAIL_CATEGORY_ADD_CHILD.get(); case 5: - return Message.AIS_PREFERENCES_DETAIL_CATEGORY_DELETE.get(); + return AisMessage.DETAIL_CATEGORY_DELETE.get(); default: - return row.oldCategory; + throw new IllegalArgumentException(); } } return null; diff --git a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/DetailCategoryTreeTable.java b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/DetailCategoryTreeTable.java index 8f0c92c..9ca2063 100644 --- a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/DetailCategoryTreeTable.java +++ b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/DetailCategoryTreeTable.java @@ -62,10 +62,10 @@ import javax.swing.tree.ExpandVetoException; import javax.swing.tree.TreePath; +import org.hmx.scitos.ais.core.i18n.AisMessage; import org.hmx.scitos.ais.domain.IDetailCategoryProvider; import org.hmx.scitos.ais.domain.model.DetailCategory; import org.hmx.scitos.ais.domain.model.MutableDetailCategoryModel; -import org.hmx.scitos.core.i18n.Message; import org.hmx.scitos.view.ScitosIcon; import org.hmx.scitos.view.swing.MessageHandler; import org.hmx.scitos.view.swing.MessageHandler.MessageType; @@ -168,7 +168,7 @@ public void treeWillCollapse(final TreeExpansionEvent event) throws ExpandVetoEx this.add(scrollableTreeTable); final JPanel buttonWrapper = new JPanel(new GridBagLayout()); buttonWrapper.setBorder(BorderFactory.createEmptyBorder(2, 10, 2, 10)); - this.setAsDefaultCheckBox = new JCheckBox(Message.AIS_PREFERENCES_DETAIL_CATEGORIES_AS_DEFAULT.get()); + this.setAsDefaultCheckBox = new JCheckBox(AisMessage.DETAIL_CATEGORIES_AS_DEFAULT.get()); this.setAsDefaultCheckBox.setSelected(!showSetAsDefaultCheckBox); this.setAsDefaultCheckBox.setVisible(showSetAsDefaultCheckBox); final GridBagConstraints constraints = new GridBagConstraints(); @@ -180,7 +180,7 @@ public void treeWillCollapse(final TreeExpansionEvent event) throws ExpandVetoEx constraints.weightx = 1; constraints.gridx = 1; buttonWrapper.add(spacing, constraints); - final JButton addRootCategoryButton = new JButton(Message.AIS_PREFERENCES_DETAIL_CATEGORY_ADD_ROOT.get(), ScitosIcon.ADD.create()); + final JButton addRootCategoryButton = new JButton(AisMessage.DETAIL_CATEGORY_ADD_ROOT.get(), ScitosIcon.ADD.create()); addRootCategoryButton.addActionListener(new ActionListener() { @Override @@ -282,7 +282,7 @@ boolean containsValidModel() { if (this.treeModel.isValid()) { return true; } - MessageHandler.showMessage(Message.AIS_PREFERENCES_DETAIL_CATEGORIES_INVALID.get(), "", MessageType.WARN); + MessageHandler.showMessage(AisMessage.DETAIL_CATEGORIES_INVALID.get(), "", MessageType.WARN); return false; } @@ -365,7 +365,7 @@ public boolean stopCellEditing() { if ((this.wasCancelled == null || !this.wasCancelled) && (editingValue.isEmpty() || this.isCodeAlreadyDefined(editingValue))) { this.input.setBorder(BorderFactory.createLineBorder(Color.RED)); this.input.selectAll(); - MessageHandler.showMessage(Message.AIS_PREFERENCES_DETAIL_CATEGORIES_CODE_DUPLICATE.get(), "", MessageType.ERROR); + MessageHandler.showMessage(AisMessage.DETAIL_CATEGORY_CODE_DUPLICATE.get(), "", MessageType.ERROR); this.input.requestFocusInWindow(); return false; } diff --git a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewInputPanel.java b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewInputPanel.java index 689a07a..d20a64f 100644 --- a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewInputPanel.java +++ b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewInputPanel.java @@ -35,8 +35,8 @@ import javax.swing.text.StyledDocument; import javax.swing.undo.UndoManager; +import org.hmx.scitos.ais.core.i18n.AisMessage; import org.hmx.scitos.ais.domain.model.TextToken; -import org.hmx.scitos.core.i18n.Message; import org.hmx.scitos.view.swing.IUndoManagedView; import org.hmx.scitos.view.swing.components.ScaledLabel; import org.hmx.scitos.view.swing.components.ScaledTextPane; @@ -64,15 +64,15 @@ public InterviewInputPanel(final InterviewView parentView) { super(new GridBagLayout()); this.parentView = parentView; // insert a hint label on the top of the input view - final ScaledLabel hintLabel = new ScaledLabel(Message.AIS_INTERVIEW_TEXTINPUT_HINT.get()); - hintLabel.setToolTipText(Message.AIS_INTERVIEW_TEXTINPUT_HINT.get()); + final ScaledLabel hintLabel = new ScaledLabel(AisMessage.INTERVIEW_TEXTINPUT_HINT.get()); + hintLabel.setToolTipText(AisMessage.INTERVIEW_TEXTINPUT_HINT.get()); hintLabel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); final GridBagConstraints constraints = new GridBagConstraints(); constraints.anchor = GridBagConstraints.BASELINE_LEADING; constraints.weightx = 1; this.add(hintLabel, constraints); // insert the button for starting the actual scoring (i.e. replacing this input panel with the scoring panel) - final JButton button = new JButton(Message.AIS_INTERVIEW_START_SCORING.get()); + final JButton button = new JButton(AisMessage.INTERVIEW_START_SCORING.get()); button.addActionListener(new ActionListener() { @Override diff --git a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewView.java b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewView.java index ebc8c67..0079786 100644 --- a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewView.java +++ b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewView.java @@ -29,11 +29,11 @@ import javax.swing.JButton; import org.hmx.scitos.ais.core.AisOption; +import org.hmx.scitos.ais.core.i18n.AisMessage; import org.hmx.scitos.ais.domain.model.DetailCategory; import org.hmx.scitos.ais.domain.model.Interview; import org.hmx.scitos.ais.domain.model.TextToken; import org.hmx.scitos.ais.view.swing.AisViewProject; -import org.hmx.scitos.core.i18n.Message; import org.hmx.scitos.view.swing.IUndoManagedView; import org.hmx.scitos.view.swing.MainView; @@ -154,8 +154,8 @@ public List createToolBarItems() { * @return create button for the main tool bar */ private JButton createCategoryToolBarItem(final DetailCategory category) { - final JButton button = new JButton(category == null ? Message.AIS_SCORE_REMOVE.get() : category.getCode()); - button.setToolTipText(category == null ? Message.AIS_SCORE_REMOVE_TOOLTIP.get() : category.getName()); + final JButton button = new JButton(category == null ? AisMessage.SCORE_REMOVE.get() : category.getCode()); + button.setToolTipText(category == null ? AisMessage.SCORE_REMOVE_TOOLTIP.get() : category.getName()); button.addActionListener(new ActionListener() { @Override diff --git a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/OptionPanel.java b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/OptionPanel.java index 3b3432e..9099011 100644 --- a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/OptionPanel.java +++ b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/OptionPanel.java @@ -28,7 +28,7 @@ import javax.swing.JPanel; import org.hmx.scitos.ais.core.AisOption; -import org.hmx.scitos.core.i18n.Message; +import org.hmx.scitos.ais.core.i18n.AisMessage; import org.hmx.scitos.view.service.IOptionPanelService; import org.hmx.scitos.view.swing.option.AbstractOptionPanel; @@ -52,12 +52,12 @@ public final class OptionPanel extends AbstractOptionPanel { * the actual AIS module's option handler, being represented by this panel */ public OptionPanel(final AisOption options) { - super(new GridBagLayout(), Message.AIS_PREFERENCES); + super(new GridBagLayout(), AisMessage.PREFERENCES); this.options = options; final Box contentBox = new Box(BoxLayout.PAGE_AXIS); // since the purpose of this component is to set the default for new projects, we don't need the associated check box this.treeTable = new DetailCategoryTreeTable(this.options, false); - this.treeTable.setBorder(BorderFactory.createTitledBorder(Message.AIS_PREFERENCES_DETAIL_CATEGORIES.get())); + this.treeTable.setBorder(BorderFactory.createTitledBorder(AisMessage.PREFERENCES_DETAIL_CATEGORIES.get())); contentBox.add(this.treeTable); contentBox.revalidate(); this.add(contentBox, AbstractOptionPanel.HORIZONTAL_SPAN); diff --git a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/ParticipantInterviewGroupView.java b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/ParticipantInterviewGroupView.java index d34202f..12d53c9 100644 --- a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/ParticipantInterviewGroupView.java +++ b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/ParticipantInterviewGroupView.java @@ -42,9 +42,9 @@ import javax.swing.undo.CannotUndoException; import org.hmx.scitos.ais.core.AisOption; +import org.hmx.scitos.ais.core.i18n.AisMessage; import org.hmx.scitos.ais.domain.model.Interview; import org.hmx.scitos.ais.view.swing.AisViewProject; -import org.hmx.scitos.core.i18n.Message; import org.hmx.scitos.domain.IProvider; import org.hmx.scitos.view.ScitosIcon; import org.hmx.scitos.view.swing.ScitosClient; @@ -84,7 +84,7 @@ public final class ParticipantInterviewGroupView extends AbstractAisProjectView< public ParticipantInterviewGroupView(final ScitosClient client, final AisViewProject project, final String participantId, final AisOption options) { super(project, participantId, options, new BorderLayout()); - final ScaledLabel topicLabel = new ScaledLabel(Message.AIS_INTERVIEW_CHANGE_ORDER.get()); + final ScaledLabel topicLabel = new ScaledLabel(AisMessage.INTERVIEW_CHANGE_ORDER.get()); topicLabel.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10)); this.add(topicLabel, BorderLayout.NORTH); this.contentArea = new JPanel(new GridBagLayout()); diff --git a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/PatternAnalysisPanel.java b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/PatternAnalysisPanel.java index d4c6f54..69d6bb7 100644 --- a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/PatternAnalysisPanel.java +++ b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/PatternAnalysisPanel.java @@ -53,12 +53,12 @@ import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.TableModel; +import org.hmx.scitos.ais.core.i18n.AisMessage; import org.hmx.scitos.ais.domain.model.DetailCategory; import org.hmx.scitos.ais.domain.model.Interview; import org.hmx.scitos.ais.view.swing.AisViewProject; import org.hmx.scitos.core.ExportOption.TargetFileType; import org.hmx.scitos.core.HmxException; -import org.hmx.scitos.core.i18n.Message; import org.hmx.scitos.view.ScitosIcon; import org.hmx.scitos.view.swing.MessageHandler; import org.hmx.scitos.view.swing.ScitosApp; @@ -97,11 +97,11 @@ public PatternAnalysisPanel(final ScitosClient client, final AisViewProject proj this.setBorder(null); final JTabbedPane tabStack = new JTabbedPane(SwingConstants.TOP, JTabbedPane.WRAP_TAB_LAYOUT); this.summaryTableModel = new SummaryTableModel(); - tabStack.add(Message.AIS_ANALYSIS_SUMMARY.get(), this.createTableFromModel(this.summaryTableModel)); + tabStack.add(AisMessage.ANALYSIS_SUMMARY.get(), this.createTableFromModel(this.summaryTableModel)); this.sequenceTableModel = new SequenceTableModel(); - tabStack.add(Message.AIS_ANALYSIS_SEQUENCE.get(), this.createTableFromModel(this.sequenceTableModel)); + tabStack.add(AisMessage.ANALYSIS_SEQUENCE.get(), this.createTableFromModel(this.sequenceTableModel)); this.patternTableModel = new PatternTableModel(); - tabStack.add(Message.AIS_ANALYSIS_PATTERN.get(), this.createTableFromModel(this.patternTableModel)); + tabStack.add(AisMessage.ANALYSIS_PATTERN.get(), this.createTableFromModel(this.patternTableModel)); this.add(tabStack); this.addHierarchyListener(new HierarchyListener() { @@ -120,25 +120,25 @@ public void run() { } }); - final JButton exportButton = new JButton(Message.AIS_ANALYSIS_EXPORT.get(), ScitosIcon.FILE_ODS.create()); + final JButton exportButton = new JButton(AisMessage.ANALYSIS_EXPORT.get(), ScitosIcon.FILE_ODS.create()); exportButton.addActionListener(new ActionListener() { @Override public void actionPerformed(final ActionEvent event) { - final File target = client.getSaveDestination(TargetFileType.ODS.getExtension(), Message.AIS_ANALYSIS_EXPORT.get()); + final File target = client.getSaveDestination(TargetFileType.ODS.getExtension(), AisMessage.ANALYSIS_EXPORT.get()); if (target == null) { // user aborted selection of save target return; } final SpreadSheet document = SpreadSheet.createEmpty(PatternAnalysisPanel.this.summaryTableModel, OOXML.getLast(XMLVersion.OD).getFormatVersion()); - document.getFirstSheet().setName(Message.AIS_ANALYSIS_SUMMARY.get()); - document.addSheet(Message.AIS_ANALYSIS_SEQUENCE.get()).merge(PatternAnalysisPanel.this.sequenceTableModel, 0, 0, true); - document.addSheet(Message.AIS_ANALYSIS_PATTERN.get()).merge(PatternAnalysisPanel.this.patternTableModel, 0, 0, true); + document.getFirstSheet().setName(AisMessage.ANALYSIS_SUMMARY.get()); + document.addSheet(AisMessage.ANALYSIS_SEQUENCE.get()).merge(PatternAnalysisPanel.this.sequenceTableModel, 0, 0, true); + document.addSheet(AisMessage.ANALYSIS_PATTERN.get()).merge(PatternAnalysisPanel.this.patternTableModel, 0, 0, true); try { document.saveAs(target); } catch (final IOException ioex) { - MessageHandler.showException(new HmxException(Message.ERROR_EXPORT_FAILED, ioex)); + MessageHandler.showException(new HmxException(AisMessage.ERROR_EXPORT_FAILED, ioex)); } } }); @@ -259,9 +259,9 @@ public int getColumnCount() { public String getColumnName(final int columnIndex) { final String columnName; if (columnIndex == 0) { - columnName = Message.AIS_ANALYSIS_TABLE_HEADER_INTERVIEW.get(); + columnName = AisMessage.ANALYSIS_TABLE_HEADER_INTERVIEW.get(); } else if (columnIndex == 1) { - columnName = Message.AIS_ANALYSIS_TABLE_HEADER_TOKENCOUNT.get(); + columnName = AisMessage.ANALYSIS_TABLE_HEADER_TOKENCOUNT.get(); } else { columnName = this.columns.get(columnIndex - 2).getCode(); } @@ -323,7 +323,7 @@ public Object getValueAt(final int rowIndex, final int columnIndex) { cellValue = ""; } } else if (columnIndex == 0) { - cellValue = Message.AIS_ANALYSIS_NOT_SCORED.get(); + cellValue = AisMessage.ANALYSIS_NOT_SCORED.get(); } else { cellValue = ""; } @@ -417,7 +417,7 @@ public Object getValueAt(final int rowIndex, final int columnIndex) { } } } else if (columnIndex == 0) { - cellValue = Message.AIS_ANALYSIS_NOT_SCORED.get(); + cellValue = AisMessage.ANALYSIS_NOT_SCORED.get(); } else { cellValue = ""; } @@ -440,7 +440,7 @@ public String getColumnName(final int columnIndex) { if (this.rows.isEmpty()) { header = ""; } else if (columnIndex == 0) { - header = Message.AIS_ANALYSIS_PATTERN.get(); + header = AisMessage.ANALYSIS_PATTERN.get(); } else { header = PatternAnalysisPanel.this.project.getLabel(this.columns.get(columnIndex - 1)); } diff --git a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/ProjectOverView.java b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/ProjectOverView.java index 7e2fce1..ff31aca 100644 --- a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/ProjectOverView.java +++ b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/ProjectOverView.java @@ -28,8 +28,8 @@ import javax.swing.undo.CannotUndoException; import org.hmx.scitos.ais.core.AisOption; +import org.hmx.scitos.ais.core.i18n.AisMessage; import org.hmx.scitos.ais.view.swing.AisViewProject; -import org.hmx.scitos.core.i18n.Message; import org.hmx.scitos.view.ScitosIcon; import org.hmx.scitos.view.swing.ScitosClient; @@ -55,7 +55,7 @@ public ProjectOverView(final ScitosClient client, final AisViewProject project, super(project, project, options, new BorderLayout()); this.analysisPanel = new PatternAnalysisPanel(client, project); this.add(this.analysisPanel); - final JButton addInterviewButton = new JButton(Message.AIS_INTERVIEW_NEW.get(), ScitosIcon.MODEL_ELEMENT_ADD.create()); + final JButton addInterviewButton = new JButton(AisMessage.INTERVIEW_NEW.get(), ScitosIcon.MODEL_ELEMENT_ADD.create()); addInterviewButton.addActionListener(new ActionListener() { @Override @@ -66,7 +66,7 @@ public void actionPerformed(final ActionEvent event) { this.add(addInterviewButton, BorderLayout.SOUTH); this.refresh(); } - + @Override public void refresh() { this.analysisPanel.refresh(); diff --git a/scitos.core/src/main/java/org/hmx/scitos/core/ExportOption.java b/scitos.core/src/main/java/org/hmx/scitos/core/ExportOption.java index 4c54de0..c1f4078 100644 --- a/scitos.core/src/main/java/org/hmx/scitos/core/ExportOption.java +++ b/scitos.core/src/main/java/org/hmx/scitos/core/ExportOption.java @@ -1,6 +1,6 @@ package org.hmx.scitos.core; -import org.hmx.scitos.core.i18n.Message; +import org.hmx.scitos.core.i18n.ILocalizableMessage; /** Descriptor for an available export option. */ public class ExportOption { @@ -36,7 +36,7 @@ public String getExtension() { } /** The text of the export menu entry. */ - private final Message menuEntry; + private final ILocalizableMessage menuEntry; /** The exported file's type. */ private final TargetFileType targetFileType; /** The location of the XSLT stylesheet on the classpath. */ @@ -52,7 +52,7 @@ public String getExtension() { * @param stylesheetPath * the location of the XSLT stylesheet on the classpath */ - public ExportOption(final Message menuEntry, final TargetFileType targetFileType, final String stylesheetPath) { + public ExportOption(final ILocalizableMessage menuEntry, final TargetFileType targetFileType, final String stylesheetPath) { super(); this.menuEntry = menuEntry; this.targetFileType = targetFileType; @@ -64,7 +64,7 @@ public ExportOption(final Message menuEntry, final TargetFileType targetFileType * * @return the text of the export menu entry */ - public Message getMenuEntry() { + public ILocalizableMessage getMenuEntry() { return this.menuEntry; } diff --git a/scitos.core/src/main/java/org/hmx/scitos/core/HmxException.java b/scitos.core/src/main/java/org/hmx/scitos/core/HmxException.java index f8fe630..c8e7d83 100644 --- a/scitos.core/src/main/java/org/hmx/scitos/core/HmxException.java +++ b/scitos.core/src/main/java/org/hmx/scitos/core/HmxException.java @@ -21,6 +21,7 @@ import java.util.Locale; +import org.hmx.scitos.core.i18n.ILocalizableMessage; import org.hmx.scitos.core.i18n.Message; /** @@ -33,7 +34,7 @@ public class HmxException extends Exception { /** The associated error message. */ - private final Message message; + private final ILocalizableMessage message; /** * Constructor: setting its contained error message by referring to an entry in the language file. @@ -41,7 +42,7 @@ public class HmxException extends Exception { * @param message * message file entry to set */ - public HmxException(final Message message) { + public HmxException(final ILocalizableMessage message) { this.message = message; } @@ -54,7 +55,7 @@ public HmxException(final Message message) { * @param cause * wrapped reason for this exception */ - public HmxException(final Message message, final Throwable cause) { + public HmxException(final ILocalizableMessage message, final Throwable cause) { super(cause); this.message = message; } diff --git a/scitos.core/src/main/java/org/hmx/scitos/core/i18n/ILocalizableMessage.java b/scitos.core/src/main/java/org/hmx/scitos/core/i18n/ILocalizableMessage.java index 8154cd3..2d46fcf 100644 --- a/scitos.core/src/main/java/org/hmx/scitos/core/i18n/ILocalizableMessage.java +++ b/scitos.core/src/main/java/org/hmx/scitos/core/i18n/ILocalizableMessage.java @@ -24,7 +24,7 @@ /** * Identifier interface for a type of message that can be handled by a {@link Translator}. */ -interface ILocalizableMessage { +public interface ILocalizableMessage { /** * Getter for the actual language file key. diff --git a/scitos.core/src/main/java/org/hmx/scitos/core/i18n/Message.java b/scitos.core/src/main/java/org/hmx/scitos/core/i18n/Message.java index 17a571d..77b67f2 100644 --- a/scitos.core/src/main/java/org/hmx/scitos/core/i18n/Message.java +++ b/scitos.core/src/main/java/org/hmx/scitos/core/i18n/Message.java @@ -19,7 +19,6 @@ package org.hmx.scitos.core.i18n; -import java.util.Arrays; import java.util.Locale; /** @@ -39,7 +38,6 @@ public enum Message implements ILocalizableMessage { MENUBAR_FILE("Client.MenuBar.File"), MENUBAR_FILE_EXPORT("Client.MenuBar.File.Export"), MENUBAR_FILE_NEW("Client.MenuBar.File.New"), - ERROR_FILE_NEW_PROJECTNAME_INVALID("Client.MenuBar.File.New.ProjectNameInvalid"), MENUBAR_FILE_OPEN("Client.MenuBar.File.Open"), ERROR_FILE_INVALID("Client.MenuBar.File.Open.InvalidXmlDocument"), ERROR_FILE_TYPE_NOT_RECOGNIZED("Client.MenuBar.File.Open.FileTypeNotRecognized"), @@ -70,53 +68,10 @@ public enum Message implements ILocalizableMessage { TAB_WELCOME_TEXT("Client.Tab.Welcome.Text"), // the dialog for confirming the closing of a project PROJECT_CLOSE("Client.Project.Close"), - PROJECT_CLOSE_QUESTION("Client.Project.Close.SaveChangesBeforeClosingQuestion"), - // AIS specific texts - AIS_PROJECT_NEW("Ais.Project.New"), - AIS_PROJECT_CHANGE_CATEGORIES("Ais.Project.ChangeDetailCategories"), - AIS_PROJECT_CHANGE_CATEGORIES_MATCHING("Ais.Project.ChangeDetailCategories.MatchOldToNew"), - AIS_PROJECT_CHANGE_CATEGORIES_MATCHING_DESCRIPTION("Ais.Project.ChangeDetailCategories.MatchOldToNew.Description"), - AIS_PROJECT_CHANGE_CATEGORIES_AFFECTED_TOKENS("Ais.Project.ChangeDetailCategories.AffectedTokens"), - AIS_PROJECT_CHANGE_CATEGORIES_OLD("Ais.Project.ChangeDetailCategories.OldCategory"), - AIS_PROJECT_CHANGE_CATEGORIES_NEW("Ais.Project.ChangeDetailCategories.ReplacingCategory"), - AIS_PROJECT_EXPORT_HTML("Ais.Project.Export.Html"), - AIS_INTERVIEW_NEW("Ais.Interview.New"), - AIS_INTERVIEW_NEW_PARTICIPANTID("Ais.Interview.New.ParticipantId"), - AIS_INTERVIEW_CHANGE_PARTICIPANTID("Ais.Interview.Modify.ParticipantId"), - AIS_INTERVIEW_CHANGE_PARTICIPANTID_DESCRIPTION("Ais.Interview.Modify.ParticipantId.Description"), - AIS_INTERVIEW_CHANGE_PARTICIPANTID_ALREADY_EXISTS("Ais.Interview.Modify.ParticipantId.AlreadyExists"), - AIS_INTERVIEW_CHANGE_ORDER("Ais.Interview.Modify.Order"), - AIS_INTERVIEW_DELETE("Ais.Interview.Delete"), - AIS_INTERVIEW_DELETE_WARNING("Ais.Interview.Delete.Warning"), - AIS_INTERVIEW_TEXTINPUT_HINT("Ais.Interview.InputHint"), - AIS_INTERVIEW_START_SCORING("Ais.Interview.StartScoring"), - AIS_SCORE_REMOVE("Ais.Interview.Score.Remove"), - AIS_SCORE_REMOVE_TOOLTIP("Ais.Interview.Score.RemoveToolTip"), - ERROR_AIS_SELECTION_INVALID("Ais.Interview.Score.SelectionInvalid"), - AIS_ANALYSIS_SUMMARY("Ais.Analysis.Summary"), - AIS_ANALYSIS_SEQUENCE("Ais.Analysis.Sequence"), - AIS_ANALYSIS_PATTERN("Ais.Analysis.Pattern"), - AIS_ANALYSIS_TABLE_HEADER_INTERVIEW("Ais.Analysis.TableHeader.Interview"), - AIS_ANALYSIS_TABLE_HEADER_TOKENCOUNT("Ais.Analysis.TableHeader.TokenCount"), - AIS_ANALYSIS_NOT_SCORED("Ais.Analysis.TableContent.NoDetailsScored"), - AIS_ANALYSIS_EXPORT("Ais.Analysis.ExportToSpreadsheet"), - ERROR_EXPORT_FAILED("Ais.Analysis.ExportToSpreadSheet.Failure"), - AIS_PREFERENCES("Ais.Client.Preferences.NodeLabel"), - AIS_PREFERENCES_DETAIL_CATEGORIES("Ais.Client.Preferences.DetailCategories.Default"), - AIS_PREFERENCES_DETAIL_CATEGORIES_INVALID("Ais.Client.Preferences.DetailCategories.Invalid"), - AIS_PREFERENCES_DETAIL_CATEGORIES_CODE("Ais.Client.Preferences.DetailCategories.Code"), - AIS_PREFERENCES_DETAIL_CATEGORIES_CODE_DUPLICATE("Ais.Client.Preferences.DetailCategories.Code.NotUnique"), - AIS_PREFERENCES_DETAIL_CATEGORIES_NAME("Ais.Client.Preferences.DetailCategories.Name"), - AIS_PREFERENCES_DETAIL_CATEGORIES_COLOR("Ais.Client.Preferences.DetailCategories.Color"), - AIS_PREFERENCES_DETAIL_CATEGORIES_SHORTCUT("Ais.Client.Preferences.DetailCategories.ShortCut"), - AIS_PREFERENCES_DETAIL_CATEGORIES_MATCH("Ais.Client.Preferences.DetailCategories.MatchOldCategory"), - AIS_PREFERENCES_DETAIL_CATEGORY_ADD_ROOT("Ais.Client.Preferences.DetailCategories.AddRootCategory"), - AIS_PREFERENCES_DETAIL_CATEGORY_ADD_CHILD("Ais.Client.Preferences.DetailCategories.AddChildCategory"), - AIS_PREFERENCES_DETAIL_CATEGORY_DELETE("Ais.Client.Preferences.DetailCategories.DeleteCategory"), - AIS_PREFERENCES_DETAIL_CATEGORIES_AS_DEFAULT("Ais.Client.Preferences.DetailCategories.SetAsDefault"); + PROJECT_CLOSE_QUESTION("Client.Project.Close.SaveChangesBeforeClosingQuestion"); /** The static translator instance to use for all messages of this type. */ - private static final Translator TRANSLATOR = new Translator(Arrays.asList(Message.values())); + private static final Translator TRANSLATOR = new Translator(Message.class); /** The attribute's key as it can be found in the actual language files. */ final String key; diff --git a/scitos.core/src/main/java/org/hmx/scitos/core/i18n/Translator.java b/scitos.core/src/main/java/org/hmx/scitos/core/i18n/Translator.java index 4567b4a..9c6718a 100644 --- a/scitos.core/src/main/java/org/hmx/scitos/core/i18n/Translator.java +++ b/scitos.core/src/main/java/org/hmx/scitos/core/i18n/Translator.java @@ -19,23 +19,11 @@ package org.hmx.scitos.core.i18n; -import java.io.IOException; -import java.io.InputStream; -import java.text.MessageFormat; -import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Locale; import java.util.Map; - -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; +import java.util.ResourceBundle; /** * Central handler of the language files. @@ -43,35 +31,21 @@ * @param * type of handled messages */ -final class Translator & ILocalizableMessage> { - - /** The xml tag representing a single language entry. */ - private static final String TAG_ENTRY = "entry"; - /** The attribute name holding the unique language file key for the respective entry in the language file. */ - private static final String ATTRIBUTE_KEY = "key"; +public final class Translator { - /** The pattern for locating the individual (localized) language files. */ - private final String filePathPattern; - /** Cached translations: default values. */ - private final Map defaultTranslations = new HashMap(); - /** Cached translations: localized values. */ - private final Map> localizedTranslations = Collections.synchronizedMap(new HashMap>(1)); + /** The resource bundle's (qualified) base name for the individual language files. */ + private final String baseName; + /** Resource bundles containing localized values. */ + private final Map localizedTranslations = Collections.synchronizedMap(new HashMap(1)); /** * Main constructor. - * - * @param messages - * all messages to be translated + * + * @param messageType + * message type (to deduce the resource bundle's base name from) */ - Translator(final Collection messages) { - final String baseFileName = messages.iterator().next().getClass().getSimpleName().toLowerCase() + 's'; - final String defaultFilePath = "/lang/" + baseFileName + ".xml"; - // load the default language values first (to fall back on if the specific language file is incomplete) - final Map translations = this.loadTranslations(messages, defaultFilePath); - if (translations != null) { - this.defaultTranslations.putAll(translations); - } - this.filePathPattern = "/lang/" + baseFileName + "_{0}.xml"; + public Translator(final Class messageType) { + this.baseName = "lang." + messageType.getSimpleName().toLowerCase(Locale.ENGLISH) + 's'; } /** @@ -83,79 +57,14 @@ final class Translator & ILocaliza * specific {@link Locale} to find the translation for * @return message translation */ - String getLocalizedMessage(final M message, final Locale locale) { - synchronized (this.localizedTranslations) { - if (!this.localizedTranslations.containsKey(locale)) { - final String languageFilePath = MessageFormat.format(this.filePathPattern, Locale.getDefault().getLanguage()); - final Map translations = this.loadTranslations(this.defaultTranslations.keySet(), languageFilePath); - this.localizedTranslations.put(locale, translations); - } - final Map translations = this.localizedTranslations.get(locale); - final String value = translations.get(message); - if (value == null) { - translations.put(message, message.getKey()); - } - return value; - } - } - - /** - * Collects all translations associated with the language file at the given path and fills out potential gaps with the default translations. - * - * @param messages - * all expected messages - * @param targetPath - * where to find the targeted language file - * @return collection of all translations from the given language file (or the default translations if no such file existed) - */ - private Map loadTranslations(final Collection messages, final String targetPath) { - final InputStream targetStream = Translator.class.getResourceAsStream(targetPath); - if (targetStream == null) { - // avoid multiple lookups by referencing default - return this.defaultTranslations; - } - try { - final Document xml = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(targetStream); - final NodeList entries = xml.getDocumentElement().getElementsByTagName(Translator.TAG_ENTRY); - final int entryCount = entries.getLength(); - final Map languageFileEntries = new HashMap(entryCount); - for (int i = 0; i < entryCount; i++) { - final Node singleEntry = entries.item(i); - languageFileEntries.put(((Element) singleEntry).getAttribute(Translator.ATTRIBUTE_KEY), singleEntry.getTextContent()); - } - final Map translations; - if (this.defaultTranslations == null) { - translations = new HashMap(languageFileEntries.size()); - } else { - // set default texts as starting point - translations = new HashMap(this.defaultTranslations); - } - // override defaults with given translations - for (final M singleMessage : messages) { - if (languageFileEntries.containsKey(singleMessage.getKey())) { - translations.put(singleMessage, languageFileEntries.get(singleMessage.getKey())); - } - } - return translations; - } catch (final IOException ioex) { - // error while parse the file at the given path - ioex.printStackTrace(); - } catch (final SAXException saxex) { - // error while parse the file at the given path - saxex.printStackTrace(); - } catch (final ParserConfigurationException pce) { - // error while initializing a DocumentBuilder instance - pce.printStackTrace(); - } finally { - if (targetStream != null) { - try { - targetStream.close(); - } catch (final IOException ioex) { - // at least we tried - } - } + public String getLocalizedMessage(final M message, final Locale locale) { + final ResourceBundle bundle; + if (!this.localizedTranslations.containsKey(locale)) { + bundle = ResourceBundle.getBundle(this.baseName, locale, new XMLResourceBundleControl()); + this.localizedTranslations.put(locale, bundle); + } else { + bundle = this.localizedTranslations.get(locale); } - // avoid multiple lookups by referencing default - return this.defaultTranslations; + return bundle.getString(message.getKey()); } } diff --git a/scitos.core/src/main/java/org/hmx/scitos/core/i18n/XMLResourceBundleControl.java b/scitos.core/src/main/java/org/hmx/scitos/core/i18n/XMLResourceBundleControl.java new file mode 100644 index 0000000..25e37e3 --- /dev/null +++ b/scitos.core/src/main/java/org/hmx/scitos/core/i18n/XMLResourceBundleControl.java @@ -0,0 +1,86 @@ +package org.hmx.scitos.core.i18n; + +import java.io.BufferedInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.net.URLConnection; +import java.util.Collections; +import java.util.Enumeration; +import java.util.List; +import java.util.Locale; +import java.util.Properties; +import java.util.ResourceBundle; + +/** Resource bundle handler, that only handles property files in XML form. */ +class XMLResourceBundleControl extends ResourceBundle.Control { + + @Override + public List getFormats(final String baseName) { + return Collections.singletonList("xml"); + } + + @Override + public ResourceBundle newBundle(final String baseName, final Locale locale, final String format, final ClassLoader loader, final boolean reload) + throws IllegalAccessException, InstantiationException, IOException { + if (baseName == null || locale == null || format == null || loader == null) { + throw new NullPointerException(); + } + final String bundleName = toBundleName(baseName, locale); + final String resourceName = toResourceName(bundleName, "xml"); + final ResourceBundle bundle; + final URL url = loader.getResource(resourceName); + if (url == null) { + bundle = null; + } else { + final URLConnection connection = url.openConnection(); + if (connection == null) { + bundle = null; + } else { + connection.setUseCaches(!reload); + final InputStream stream = connection.getInputStream(); + if (stream == null) { + bundle = null; + } else { + final BufferedInputStream bis = new BufferedInputStream(stream); + try { + bundle = new XMLResourceBundle(bis); + } finally { + bis.close(); + } + } + } + } + return bundle; + } + + /** Resource bundle backed by a properties file in XML form. */ + private static class XMLResourceBundle extends ResourceBundle { + + /** The properties file capable of reading the XML form. */ + private Properties xmlProperties; + + /** + * Constructor: assuming an XML structured properties file in the given stream. + * + * @param stream + * input to load the resource bundle from + * @throws IOException + * error while reading the given stream + */ + XMLResourceBundle(final InputStream stream) throws IOException { + this.xmlProperties = new Properties(); + this.xmlProperties.loadFromXML(stream); + } + + @Override + protected Object handleGetObject(String key) { + return this.xmlProperties.getProperty(key); + } + + @Override + public Enumeration getKeys() { + return Collections.enumeration(this.xmlProperties.stringPropertyNames()); + } + } +} \ No newline at end of file diff --git a/scitos.core/src/main/java/org/hmx/scitos/core/option/Option.java b/scitos.core/src/main/java/org/hmx/scitos/core/option/Option.java index eb25de5..3c1e12b 100644 --- a/scitos.core/src/main/java/org/hmx/scitos/core/option/Option.java +++ b/scitos.core/src/main/java/org/hmx/scitos/core/option/Option.java @@ -19,10 +19,13 @@ package org.hmx.scitos.core.option; +import java.util.Locale; + /** * Collection of user preferences. */ public enum Option implements IOptionSetting { + LANGUAGE("Language", Locale.getDefault().getLanguage()), /** User setting: the gui (swing) look-and-feel. */ LOOK_AND_FEEL("SwingLookAndFeel", null), /** User setting: the number of undo-able steps per open project. */ diff --git a/scitos.core/src/main/resources/lang/messages.xml b/scitos.core/src/main/resources/lang/messages.xml index 77747ed..b6cab34 100644 --- a/scitos.core/src/main/resources/lang/messages.xml +++ b/scitos.core/src/main/resources/lang/messages.xml @@ -1,4 +1,5 @@ + - Export to Spreadsheet - Scoring Summary - Detail Sequence - Detail Pattern - Interview - Token Count - no scored interviews yet - AIS - Code - Color - The Code for the inserted Detail Category is invalid. - -Please insert an unique Code label, -with at least one and up to five characters/symbols. - Default Detail Categories for new Projects/Files - The defined Detail Category structure is invalid. - -Each Category needs to have a unique Code label, -with at least one and up to five characters/symbols. - Name - Use as Default for new Projects/Files - Short Cut - Add Child Category - Add Root Category - Delete Category - Delete Interview - The selected Interview is going to be deleted. - -This is irreversible and cannot be undone. - Change order of Participant's Interviews - Change assigned Participant ID - Insert Participant ID to assign: - Add new Interview - Participant ID: - Type or paste in the transcribed autobiographical Interview... - Start Scoring - Invalid interrupted selection: - -All intersected Detail Categories need to be fully contained between the first and last selected Token. - Remove - Clear assigned Detail Categories from selection. - Where to save the new AIS Project? - Modify Detail Categories - Replace old Detail Category with new one - You are making structural changes that are affecting already used Detail Categories. - -Please select which (new) Category should replace which (old) Category. -Category assignments without a selected replacement are being discarded. - Old Detail Category - Number of Affected Tokens - Replaced With New Category - HTML file Cancel About Edit @@ -79,6 +28,7 @@ Category assignments without a selected replacement are being discarded. Export To... New Open + The selected File is already open. The selected File does not contain a valid SciToS Project. The selected File is of a type not recognized in this version of SciToS. diff --git a/scitos.core/src/main/resources/lang/messages_de.xml b/scitos.core/src/main/resources/lang/messages_de.xml index 565bfc4..f5357a9 100644 --- a/scitos.core/src/main/resources/lang/messages_de.xml +++ b/scitos.core/src/main/resources/lang/messages_de.xml @@ -1,4 +1,5 @@ + - Tabellen Exportieren - Ergebnisse - Sequenzen - Muster - Interview - Tokenanzahl - noch keine analysierten Interviews - AIS - Name - Farbe - Der eingegebene Name ist ungültig. - -Bitte wähle einen eindeutigen Namen, -mit einer Länge von ein bis fünf Zeichen. - Standard Kategorien für neue Projekte/Dateien - Das definierte Kategorie-Modell ist ungültig. - -Jeder Kategorie muss ein eindeutiger Name, -mit einer Länge von ein bis fünf Zeichen, -zugeordnet sein. - Beschreibung - Als Standard für neue Projekte/Dateien verwenden - Tastenkombination - Unterkategorie hinzufügen - Oberkategorie hinzufügen - Kategorie entfernen - Interview löschen - Das ausgewählte Interview wird gelöscht. - -Dieser Schritt kann nicht rückgängig gemacht werden. - Reihenfolge der Interviews eines Studienteilnehmers bearbeiten - Studienteilnehmer umbenennen - Neuen Bezeichner für Studienteilnehmer eingeben: - Neues Interview anlegen - Bezeichner für Studienteilnehmer: - Transkribierten Text des autobiographischen Interview eingeben oder hineinkopieren... - Beginne Scoring - Ungültige unterbrochene Auswahl: - -Eingeschlossene Kategorien müssen abgeschlossen sein. -Sie müssen im ausgewählten/eingeschlossenen Bereich beginnen und enden. - Entfernen - Zugewiesene Kategorien von ausgewählten Token entfernen. - WO soll das neue AIS Projekt gespeichert werden? - Kategoriemodell bearbeiten - Alte Kategorien durch neue ersetzen - -Du bist dabei strukturelle Veränderungen vorzunehmen, die sich auf bereits zugewiesene Kategorien auswirken. - -Bitte wähle aus, welche (neue) Kategorie an Stelle welcher (alten) Kategorie zugewiesen werden soll. -Zugeordnete Kategorien ohne Entsprechung im neuen Modell werden verworfen! - Alte Kategorie - Anzahl zugeordneter Token - Ersetzt durch neue Kategorie - HTML-Datei Abbruch Info Bearbeiten @@ -82,6 +28,7 @@ Zugeordnete Kategorien ohne Entsprechung im neuen Modell werden verworfen!Exportieren als... Neu Öffnen + Die ausgewählte Datei ist bereits geöffnet. Die ausgewählte Datei enthält kein gültiges SciToS Projekt. Die ausgewählte Datei ist einem Typ zugeordnet, der in deiner Version von SciToS nicht unterstützt wird. diff --git a/scitos.view/src/main/java/org/hmx/scitos/view/swing/MessageHandler.java b/scitos.view/src/main/java/org/hmx/scitos/view/swing/MessageHandler.java index b6afe2e..e408441 100644 --- a/scitos.view/src/main/java/org/hmx/scitos/view/swing/MessageHandler.java +++ b/scitos.view/src/main/java/org/hmx/scitos/view/swing/MessageHandler.java @@ -214,8 +214,8 @@ public static int showOptionDialog(final String message, final String messageTit * value to preset when displaying the dialog * @return inserted answer */ - public static String showInputDialog(final Message question, final String messageTitle, final String initialValue) { - return (String) JOptionPane.showInputDialog(ScitosApp.getClient().getFrame(), MessageHandler.prepareMessage(question.get()), messageTitle, + public static String showInputDialog(final String question, final String messageTitle, final String initialValue) { + return (String) JOptionPane.showInputDialog(ScitosApp.getClient().getFrame(), MessageHandler.prepareMessage(question), messageTitle, JOptionPane.QUESTION_MESSAGE, MessageType.INFO.getIcon(), null, initialValue); } diff --git a/scitos.view/src/main/java/org/hmx/scitos/view/swing/option/AbstractOptionPanel.java b/scitos.view/src/main/java/org/hmx/scitos/view/swing/option/AbstractOptionPanel.java index e7dcf60..5c0b313 100644 --- a/scitos.view/src/main/java/org/hmx/scitos/view/swing/option/AbstractOptionPanel.java +++ b/scitos.view/src/main/java/org/hmx/scitos/view/swing/option/AbstractOptionPanel.java @@ -25,7 +25,7 @@ import javax.swing.JPanel; -import org.hmx.scitos.core.i18n.Message; +import org.hmx.scitos.core.i18n.ILocalizableMessage; /** Abstract panel in the application's preferences dialog. */ public abstract class AbstractOptionPanel extends JPanel { @@ -42,7 +42,7 @@ public abstract class AbstractOptionPanel extends JPanel { } /** The node label in the tree of the application's preferences dialog. */ - private final Message title; + private final ILocalizableMessage title; /** * Main constructor. @@ -52,7 +52,7 @@ public abstract class AbstractOptionPanel extends JPanel { * @param title * the node label in the tree of the application's preferences dialog */ - protected AbstractOptionPanel(final LayoutManager layout, final Message title) { + protected AbstractOptionPanel(final LayoutManager layout, final ILocalizableMessage title) { super(layout); this.title = title; this.setBorder(null);