private AlignmentPanel ap;
- private JInternalFrame frame;
+ private JalviewInternalFrame frame;
/*
* Finder agent per viewport searched
ap = alignPanel;
focusFixed = fixedFocus;
finders = new HashMap<>();
- frame = new JInternalFrame();
- frame.setFrameIcon(WindowIcons.logoIcon);
+ frame = new JalviewInternalFrame();
+ frame.setFrameIcon(null);
frame.setContentPane(this);
frame.setLayer(JLayeredPane.PALETTE_LAYER);
frame.addInternalFrameListener(new InternalFrameAdapter()
new FeatureEditor(ap, seqs, features, true).showDialog();
}
+ @Override
+ protected void copyToClipboard_actionPerformed()
+ {
+ if (searchResults.isEmpty())
+ {
+ return; // shouldn't happen
+ }
+ // assume viewport controller has same searchResults as we do...
+ ap.alignFrame.avc.copyHighlightedRegionsToClipboard();
+ }
+
/**
* Search the alignment for the next or all matches. If 'all matches', a
* dialog is shown with the number of sequence ids and subsequences matched.
void doSearch(boolean doFindAll)
{
createFeatures.setEnabled(false);
+ copyToClipboard.setEnabled(false);
String searchString = searchBox.getUserInput();
finder = new jalview.analysis.Finder(av);
finders.put(av, finder);
}
+ finder.setFeatureRenderer(ap.getFeatureRenderer());
boolean isCaseSensitive = caseSensitive.isSelected();
boolean doSearchDescription = searchDescription.isSelected();
+ boolean doSearchfeatures = searchFeatures.isSelected();
boolean skipHidden = ignoreHidden.isSelected();
if (doFindAll)
{
finder.findAll(searchString, isCaseSensitive, doSearchDescription,
- skipHidden);
+ doSearchfeatures, skipHidden);
}
else
{
finder.findNext(searchString, isCaseSensitive, doSearchDescription,
- skipHidden);
+ doSearchfeatures, skipHidden);
}
searchResults = finder.getSearchResults();
else
{
createFeatures.setEnabled(true);
+ copyToClipboard.setEnabled(true);
}
searchBox.updateCache();