X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FStructureChooser.java;h=510ce782e83017a02a2f2ab6a74c768c57e339e4;hb=02af7d241e684c2712110004fac44e3588f59d9c;hp=9a5f87b47533c3a2ab18fb9877a8cef18a201753;hpb=2fc1013d3c126983a8d7d932671168e11cfab63d;p=jalview.git diff --git a/src/jalview/gui/StructureChooser.java b/src/jalview/gui/StructureChooser.java index 9a5f87b..510ce78 100644 --- a/src/jalview/gui/StructureChooser.java +++ b/src/jalview/gui/StructureChooser.java @@ -180,12 +180,14 @@ public class StructureChooser extends GStructureChooser discoveredStructuresSet)); structuresDiscovered = true; noOfStructuresFound = discoveredStructuresSet.size(); - mainFrame.setTitle("Structure Chooser - " + noOfStructuresFound - + " Found (" + totalTime + ")"); + mainFrame.setTitle(MessageManager.formatMessage( + "label.structure_chooser_no_of_structures", + noOfStructuresFound, totalTime)); } else { - mainFrame.setTitle("Structure Chooser - Manual association"); + mainFrame.setTitle(MessageManager + .getString("label.structure_chooser_manual_association")); if (errors.size() > 0) { StringBuilder errorMsg = new StringBuilder(); @@ -194,7 +196,8 @@ public class StructureChooser extends GStructureChooser errorMsg.append(error).append("\n"); } JOptionPane.showMessageDialog(this, errorMsg.toString(), - "PDB Web-service Error", JOptionPane.ERROR_MESSAGE); + MessageManager.getString("label.pdb_web-service_error"), + JOptionPane.ERROR_MESSAGE); } } } @@ -386,14 +389,15 @@ public class StructureChooser extends GStructureChooser // Update table selection model here tbl_summary.addRowSelectionInterval(0, filterResponseCount - 1); - - mainFrame.setTitle("Structure Chooser - Filter time (" - + totalTime + ")"); + mainFrame.setTitle(MessageManager.formatMessage( + "label.structure_chooser_filter_time", + totalTime)); } else { - mainFrame.setTitle("Structure Chooser - Filter time (" - + totalTime + ")"); + mainFrame.setTitle(MessageManager.formatMessage( + "label.structure_chooser_filter_time", + totalTime)); if (errors.size() > 0) { StringBuilder errorMsg = new StringBuilder(); @@ -402,7 +406,8 @@ public class StructureChooser extends GStructureChooser errorMsg.append(error).append("\n"); } JOptionPane.showMessageDialog(null, errorMsg.toString(), - "PDB Web-service Error", JOptionPane.ERROR_MESSAGE); + MessageManager.getString("label.pdb_web-service_error"), + JOptionPane.ERROR_MESSAGE); } } @@ -423,11 +428,11 @@ public class StructureChooser extends GStructureChooser jalview.bin.Cache.getProperty("LAST_DIRECTORY")); chooser.setFileView(new jalview.io.JalviewFileView()); chooser.setDialogTitle(MessageManager.formatMessage( - "label.select_pdb_file_for", new String[] - { selectedSequence.getDisplayId(false) })); + "label.select_pdb_file_for", + selectedSequence.getDisplayId(false))); chooser.setToolTipText(MessageManager.formatMessage( - "label.load_pdb_file_associate_with_sequence", new String[] - { selectedSequence.getDisplayId(false) })); + "label.load_pdb_file_associate_with_sequence", + selectedSequence.getDisplayId(false))); int value = chooser.showOpenDialog(null); if (value == jalview.io.JalviewFileChooser.APPROVE_OPTION) @@ -488,7 +493,8 @@ public class StructureChooser extends GStructureChooser else if (selectedFilterOpt.getView() == VIEWS_ENTER_ID || selectedFilterOpt.getView() == VIEWS_FROM_FILE) { - mainFrame.setTitle(filterTitle); + mainFrame.setTitle(MessageManager + .getString("label.structure_chooser_manual_association")); idInputAssSeqPanel.loadCmbAssSeq(); fileChooserAssSeqPanel.loadCmbAssSeq(); } @@ -541,8 +547,9 @@ public class StructureChooser extends GStructureChooser if (txt_search.getText().length() > 0) { lbl_pdbManualFetchStatus.setToolTipText(JvSwingUtils.wrapTooltip( - true, "No PDB entry found for \'" + txt_search.getText() - + "\'")); + true, MessageManager.formatMessage( + "info.no_pdb_entry_found_for", + txt_search.getText()))); } if (errorWarning.length() > 0) @@ -809,6 +816,10 @@ public class StructureChooser extends GStructureChooser @Override protected void txt_search_ActionPerformed() { + new Thread() + { + public void run() + { errorWarning.setLength(0); isValidPBDEntry = false; if (txt_search.getText().length() > 0) @@ -842,6 +853,8 @@ public class StructureChooser extends GStructureChooser } } validateSelections(); + } + }.start(); } @Override