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
TreePanel takes viewport
[jalview.git]
/
src
/
jalview
/
gui
/
Finder.java
diff --git
a/src/jalview/gui/Finder.java
b/src/jalview/gui/Finder.java
index
1aceb80
..
e5c94bd
100755
(executable)
--- a/
src/jalview/gui/Finder.java
+++ b/
src/jalview/gui/Finder.java
@@
-87,15
+87,6
@@
public class Finder extends GFinder
});
\r
}
\r
\r
});
\r
}
\r
\r
- /**
\r
- * DOCUMENT ME!
\r
- *
\r
- * @param e DOCUMENT ME!
\r
- */
\r
- public void textfield_actionPerformed(ActionEvent e)
\r
- {
\r
- doSearch(false);
\r
- }
\r
\r
/**
\r
* DOCUMENT ME!
\r
\r
/**
\r
* DOCUMENT ME!
\r
@@
-189,7
+180,7
@@
public class Finder extends GFinder
{
\r
createNewGroup.setEnabled(false);
\r
\r
{
\r
createNewGroup.setEnabled(false);
\r
\r
- String searchString = textfield.getText().toUpperCase();
\r
+ String searchString = textfield.getText().toUpperCase().trim();
\r
\r
com.stevesoft.pat.Regex regex = new com.stevesoft.pat.Regex(searchString);
\r
\r
\r
com.stevesoft.pat.Regex regex = new com.stevesoft.pat.Regex(searchString);
\r
\r
@@
-206,19
+197,18
@@
public class Finder extends GFinder
{
\r
int res = Integer.parseInt(searchString);
\r
found = true;
\r
{
\r
int res = Integer.parseInt(searchString);
\r
found = true;
\r
-
\r
- if (av.getSelectionGroup().getSize() > 0)
\r
+ if (av.getSelectionGroup() == null || av.getSelectionGroup().getSize() < 1)
\r
{
\r
{
\r
- seq = (Sequence) (av.getSelectionGroup().getSequenceAt(0));
\r
+ seq = (Sequence) av.getAlignment().getSequenceAt(0);
\r
}
\r
else
\r
{
\r
}
\r
else
\r
{
\r
- seq = (Sequence) av.getAlignment().getSequenceAt(0);
\r
+ seq = (Sequence) (av.getSelectionGroup().getSequenceAt(0));
\r
}
\r
\r
searchResults.add(Integer.toString(av.getAlignment().findIndex(seq)));
\r
}
\r
\r
searchResults.add(Integer.toString(av.getAlignment().findIndex(seq)));
\r
- searchResults.add(Integer.toString(seq.findIndex(res) - 1));
\r
- searchResults.add(Integer.toString(seq.findIndex(res) - 1));
\r
+ searchResults.add(res+"");
\r
+ searchResults.add(res+"");
\r
}
\r
catch (NumberFormatException ex)
\r
{
\r
}
\r
catch (NumberFormatException ex)
\r
{
\r