X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FFinder.java;h=84540f4aa341666ab3d390642d62b79ddf68d6e3;hb=f4766a7bbcfae845fc95923b01fa14ff83d589ff;hp=457d87145a75b7c5fc5add33de0a7148f11a4c43;hpb=f6e438356f6e08a940b2f7003f241706f4e4a968;p=jalview.git diff --git a/src/jalview/gui/Finder.java b/src/jalview/gui/Finder.java index 457d871..84540f4 100755 --- a/src/jalview/gui/Finder.java +++ b/src/jalview/gui/Finder.java @@ -101,14 +101,15 @@ public class Finder extends GFinder frame = new JInternalFrame(); frame.setContentPane(this); frame.setLayer(JLayeredPane.PALETTE_LAYER); - frame.addInternalFrameListener(new javax.swing.event.InternalFrameAdapter() - { - @Override - public void internalFrameClosing(InternalFrameEvent e) - { - closeAction(); - } - }); + frame.addInternalFrameListener( + new javax.swing.event.InternalFrameAdapter() + { + @Override + public void internalFrameClosing(InternalFrameEvent e) + { + closeAction(); + } + }); addEscapeHandler(); Desktop.addInternalFrame(frame, MessageManager.getString("label.find"), MY_WIDTH, MY_HEIGHT); @@ -121,8 +122,8 @@ public class Finder extends GFinder */ private void addEscapeHandler() { - getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( - KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "Cancel"); + getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW) + .put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "Cancel"); getRootPane().getActionMap().put("Cancel", new AbstractAction() { @Override @@ -133,7 +134,6 @@ public class Finder extends GFinder }); } - /** * Performs the 'Find Next' action. * @@ -223,7 +223,8 @@ public class Finder extends GFinder for (SearchResultMatchI match : searchResults.getResults()) { seqs.add(match.getSequence().getDatasetSequence()); - features.add(new SequenceFeature(searchString, desc, null, match + features.add(new SequenceFeature(searchString, desc, + match .getStart(), match.getEnd(), desc)); } @@ -315,8 +316,8 @@ public class Finder extends GFinder if (doFindAll) { // then we report the matches that were found - String message = (idMatch.size() > 0) ? "" + idMatch.size() - + " IDs" : ""; + String message = (idMatch.size() > 0) ? "" + idMatch.size() + " IDs" + : ""; if (searchResults != null) { if (idMatch.size() > 0 && searchResults.getSize() > 0)