From: tcofoegbu Date: Fri, 21 Aug 2015 09:18:15 +0000 (+0100) Subject: JAL-1780 changed 'Check All' to 'Select All' and externalised all message labels... X-Git-Tag: Release_2_10_0~529 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ce9a72893c0375c2d302d95cf5252a9d94f4bd48;p=jalview.git JAL-1780 changed 'Check All' to 'Select All' and externalised all message labels in export settings window --- diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index cf11670..86cf5ab 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -1247,4 +1247,10 @@ info.search_in_annotation_label = Search in {0} Label info.search_in_annotation_description = Search in {0} Description info.change_threshold_mode_to_enable = Change Threshold Mode to Enable label.couldnt_read_data = Couldn't read data -label.embbed_biojson = Embbed BioJSON to HTML export \ No newline at end of file +label.embbed_biojson = Embbed BioJSON to HTML export +action.export_groups = Export Groups +action.export_annotations = Export Annotations +action.export_hidden_columns = Export Hidden Columns +action.export_hidden_sequences = Export Hidden Sequences +action.export_features = Export Features +label.export_settings = Export Settings \ No newline at end of file diff --git a/src/jalview/gui/AlignExportSettings.java b/src/jalview/gui/AlignExportSettings.java index 49bb64a..02eea9f 100644 --- a/src/jalview/gui/AlignExportSettings.java +++ b/src/jalview/gui/AlignExportSettings.java @@ -3,19 +3,19 @@ package jalview.gui; import jalview.api.AlignExportSettingI; import jalview.bin.Jalview; import jalview.jbgui.GAlignExportSettings; +import jalview.util.MessageManager; import java.awt.event.ActionEvent; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; import javax.swing.JDialog; -import javax.swing.JInternalFrame; import javax.swing.JOptionPane; @SuppressWarnings("serial") public class AlignExportSettings extends GAlignExportSettings implements AlignExportSettingI { - protected JInternalFrame frame; - boolean cancelled = false; JDialog dialog; @@ -29,11 +29,20 @@ public class AlignExportSettings extends GAlignExportSettings implements JOptionPane pane = new JOptionPane(null, JOptionPane.DEFAULT_OPTION, JOptionPane.DEFAULT_OPTION, null, new Object[] { this }); - dialog = pane.createDialog(Desktop.desktop, "Export Settings"); + dialog = pane.createDialog(Desktop.desktop, + MessageManager.getString("label.export_settings")); + dialog.addWindowListener(new WindowAdapter() + { + public void windowClosing(WindowEvent e) + { + cancelled = true; + } + }); dialog.pack(); dialog.setVisible(true); dialog.setContentPane(this); dialog.validate(); + } } @@ -42,12 +51,14 @@ public class AlignExportSettings extends GAlignExportSettings implements { cancelled = false; dialog.setVisible(false); + dialog.dispose(); } public void cancel_actionPerformed(ActionEvent e) { cancelled = true; dialog.setVisible(false); + dialog.dispose(); } @Override diff --git a/src/jalview/jbgui/GAlignExportSettings.java b/src/jalview/jbgui/GAlignExportSettings.java index 15498c6..e3ac988 100644 --- a/src/jalview/jbgui/GAlignExportSettings.java +++ b/src/jalview/jbgui/GAlignExportSettings.java @@ -1,5 +1,7 @@ package jalview.jbgui; +import jalview.util.MessageManager; + import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -27,22 +29,21 @@ public abstract class GAlignExportSettings extends JPanel protected BorderLayout mainLayout = new BorderLayout(); - protected JCheckBox chkAll = new JCheckBox("Check All"); + protected JCheckBox chkAll = new JCheckBox(); - protected JCheckBox chkHiddenSeqs = new JCheckBox( - "Export Hidden Sequences"); + protected JCheckBox chkHiddenSeqs = new JCheckBox(); - protected JCheckBox chkHiddenCols = new JCheckBox("Export Hidden Columns"); + protected JCheckBox chkHiddenCols = new JCheckBox(); - protected JCheckBox chkExportAnnots = new JCheckBox("Export Annotations"); + protected JCheckBox chkExportAnnots = new JCheckBox(); - protected JCheckBox chkExportFeats = new JCheckBox("Export Features"); + protected JCheckBox chkExportFeats = new JCheckBox(); - protected JCheckBox chkExportGrps = new JCheckBox("Export Groups"); + protected JCheckBox chkExportGrps = new JCheckBox(); - JButton btnOk = new JButton("Ok"); + JButton btnOk = new JButton(); - JButton btnCancel = new JButton("Cancel"); + JButton btnCancel = new JButton(); private boolean hasHiddenSeq, hasHiddenCols, isComplexAlignFile, showDialog; @@ -72,6 +73,19 @@ public abstract class GAlignExportSettings extends JPanel public void init() { + chkHiddenSeqs.setText(MessageManager + .getString("action.export_hidden_sequences")); + chkHiddenCols.setText(MessageManager + .getString("action.export_hidden_columns")); + chkExportAnnots.setText(MessageManager + .getString("action.export_annotations")); + chkExportFeats.setText(MessageManager + .getString("action.export_features")); + chkExportGrps.setText(MessageManager.getString("action.export_groups")); + btnOk.setText(MessageManager.getString("action.ok")); + btnCancel.setText(MessageManager.getString("action.cancel")); + chkAll.setText(MessageManager.getString("action.select_all")); + hiddenRegionConfPanel.setLayout(hiddenRegionLayout); complexExportPanel.setLayout(complexExportLayout); setLayout(mainLayout);