X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FFinder.java;h=e8c16d234f398bce693cd176b1601c56abf6a501;hb=174230b4233d9ce80f94527768d2cd2f76da11ab;hp=6b8df4b33d1d298e08fc24e8ecc72cd5095c0ae1;hpb=7131594a75aff4691699b4499fb91ec29b8952df;p=jalview.git diff --git a/src/jalview/gui/Finder.java b/src/jalview/gui/Finder.java index 6b8df4b..e8c16d2 100755 --- a/src/jalview/gui/Finder.java +++ b/src/jalview/gui/Finder.java @@ -1,6 +1,6 @@ /* * Jalview - A Sequence Alignment Editor and Viewer - * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -153,7 +153,10 @@ public class Finder extends GFinder { createNewGroup.setEnabled(false); - String searchString = textfield.getText().toUpperCase().trim(); + String searchString = textfield.getText().trim(); + if(!caseSensitive.isSelected()) + searchString = searchString.toUpperCase(); + if(searchString.length()<1) return; @@ -170,7 +173,7 @@ public class Finder extends GFinder { int res = Integer.parseInt(searchString); found = true; - if (av.getSelectionGroup() == null || av.getSelectionGroup().getSize() < 1) + if (av.getSelectionGroup() == null || av.getSelectionGroup().getSize(false) < 1) { seq = (Sequence) av.getAlignment().getSequenceAt(0); } @@ -193,7 +196,7 @@ public class Finder extends GFinder if (selection != null) { - if ((selection.getSize() < 1) || + if ((selection.getSize(false) < 1) || ((selection.getEndRes() - selection.getStartRes()) < 2)) { selection = null; @@ -204,7 +207,7 @@ public class Finder extends GFinder { seq = (Sequence) av.alignment.getSequenceAt(seqIndex); - if ((selection != null) && !selection.sequences.contains(seq)) + if ((selection != null) && !selection.getSequences(false).contains(seq)) { seqIndex++; resIndex = 0; @@ -212,7 +215,9 @@ public class Finder extends GFinder continue; } - item = seq.getSequence().toUpperCase(); + item = seq.getSequence(); + if(!caseSensitive.isSelected()) + item = item.toUpperCase(); if ((selection != null) && (selection.getEndRes() < av.alignment.getWidth()-1))