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);
*/
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
});
}
-
/**
* Performs the 'Find Next' action.
*
for (SearchResultMatchI match : searchResults.getResults())
{
seqs.add(match.getSequence().getDatasetSequence());
- features.add(new SequenceFeature(searchString, desc, null, match
- .getStart(), match.getEnd(), desc));
+ features.add(new SequenceFeature(searchString, desc, match.getStart(),
+ match.getEnd(), desc));
}
- if (ap.getSeqPanel().seqCanvas.getFeatureRenderer().amendFeatures(seqs,
- features, true, ap))
+ new FeatureEditor(ap).amendFeatures(seqs, features, true, new Runnable()
{
- /*
- * ensure feature display is turned on to show the new features,
- * and remove them as highlighted regions
- */
- ap.alignFrame.showSeqFeatures.setSelected(true);
- av.setShowSequenceFeatures(true);
- ap.highlightSearchResults(null);
- }
+ @Override
+ public void run()
+ {
+
+ /*
+ * ensure feature display is turned on to show the new features,
+ * and remove them as highlighted regions
+ */
+ ap.alignFrame.showSeqFeatures.setSelected(true);
+ av.setShowSequenceFeatures(true);
+ ap.highlightSearchResults(null);
+ }
+ });
}
/**
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)