git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-4116 relegate the failed to promote warning to Console.debug so most users won...
[jalview.git]
/
src
/
jalview
/
fts
/
service
/
pdb
/
PDBFTSPanel.java
diff --git
a/src/jalview/fts/service/pdb/PDBFTSPanel.java
b/src/jalview/fts/service/pdb/PDBFTSPanel.java
index
687e83d
..
c9d7676
100644
(file)
--- a/
src/jalview/fts/service/pdb/PDBFTSPanel.java
+++ b/
src/jalview/fts/service/pdb/PDBFTSPanel.java
@@
-21,28
+21,34
@@
package jalview.fts.service.pdb;
package jalview.fts.service.pdb;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+
+import javax.help.HelpSetException;
+
import jalview.fts.api.FTSDataColumnI;
import jalview.fts.api.FTSRestClientI;
import jalview.fts.core.FTSRestRequest;
import jalview.fts.core.FTSRestResponse;
import jalview.fts.core.GFTSPanel;
import jalview.fts.api.FTSDataColumnI;
import jalview.fts.api.FTSRestClientI;
import jalview.fts.core.FTSRestRequest;
import jalview.fts.core.FTSRestResponse;
import jalview.fts.core.GFTSPanel;
+import jalview.gui.Help;
+import jalview.gui.Help.HelpId;
import jalview.gui.SequenceFetcher;
import jalview.util.MessageManager;
import jalview.gui.SequenceFetcher;
import jalview.util.MessageManager;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-
@SuppressWarnings("serial")
public class PDBFTSPanel extends GFTSPanel
{
private static String defaultFTSFrameTitle = MessageManager
.getString("label.pdb_sequence_fetcher");
@SuppressWarnings("serial")
public class PDBFTSPanel extends GFTSPanel
{
private static String defaultFTSFrameTitle = MessageManager
.getString("label.pdb_sequence_fetcher");
- private static Map<String, Integer> tempUserPrefs = new HashMap<String, Integer>();
+ private static Map<String, Integer> tempUserPrefs = new HashMap<>();
private static final String PDB_FTS_CACHE_KEY = "CACHE.PDB_FTS";
private static final String PDB_FTS_CACHE_KEY = "CACHE.PDB_FTS";
+ private static final String PDB_AUTOSEARCH = "FTS.PDB.AUTOSEARCH";
+
public PDBFTSPanel(SequenceFetcher fetcher)
{
super(fetcher);
public PDBFTSPanel(SequenceFetcher fetcher)
{
super(fetcher);
@@
-119,16
+125,15
@@
public class PDBFTSPanel extends GFTSPanel
if (isPaginationEnabled() && resultSetCount > 0)
{
if (isPaginationEnabled() && resultSetCount > 0)
{
+ String f1 = totalNumberformatter
+ .format(Integer.valueOf(offSet + 1));
+ String f2 = totalNumberformatter
+ .format(Integer.valueOf(offSet + resultSetCount));
+ String f3 = totalNumberformatter
+ .format(Integer.valueOf(totalResultSetCount));
updateSearchFrameTitle(defaultFTSFrameTitle + " - " + result
updateSearchFrameTitle(defaultFTSFrameTitle + " - " + result
- + " "
- + totalNumberformatter.format((Number) (offSet + 1))
- + " to "
- + totalNumberformatter
- .format((Number) (offSet + resultSetCount))
- + " of "
- + totalNumberformatter
- .format((Number) totalResultSetCount)
- + " " + " (" + (endTime - startTime) + " milli secs)");
+ + " " + f1 + " to " + f2 + " of " + f3 + " " + " ("
+ + (endTime - startTime) + " milli secs)");
}
else
{
}
else
{
@@
-188,7
+193,7
@@
public class PDBFTSPanel extends GFTSPanel
// mainFrame.dispose();
disableActionButtons();
StringBuilder selectedIds = new StringBuilder();
// mainFrame.dispose();
disableActionButtons();
StringBuilder selectedIds = new StringBuilder();
- HashSet<String> selectedIdsSet = new HashSet<String>();
+ HashSet<String> selectedIdsSet = new HashSet<>();
int primaryKeyColIndex = 0;
try
{
int primaryKeyColIndex = 0;
try
{
@@
-218,8
+223,7
@@
public class PDBFTSPanel extends GFTSPanel
}
String ids = selectedIds.toString();
}
String ids = selectedIds.toString();
- // System.out.println(">>>>>>>>>>>>>>>> selected Ids: " + ids);
- seqFetcher.getTextArea().setText(ids);
+ seqFetcher.setQuery(ids);
Thread worker = new Thread(seqFetcher);
worker.start();
delayAndEnableActionButtons();
Thread worker = new Thread(seqFetcher);
worker.start();
delayAndEnableActionButtons();
@@
-281,4
+285,26
@@
public class PDBFTSPanel extends GFTSPanel
return PDB_FTS_CACHE_KEY;
}
return PDB_FTS_CACHE_KEY;
}
-}
+ @Override
+ public String getAutosearchPreference()
+ {
+ return PDB_AUTOSEARCH;
+ }
+
+ @Override
+ protected void showHelp()
+ {
+ try
+ {
+ Help.showHelpWindow(HelpId.PdbFts);
+ } catch (HelpSetException e1)
+ {
+ e1.printStackTrace();
+ }
+ }
+
+ public String getDbName()
+ {
+ return "PDB";
+ }
+}
\ No newline at end of file