label.invalid_name = Invalid Name !
label.output_seq_details = Output Sequence Details to list all database references
label.urllinks = Links
+label.default_cache_size = Default Cache Size
- action.clear_cached_items = Clear Cached Items
++action.clear_cached_items = Clear Cached Items
+ label.togglehidden = Show hidden regions
+ label.quality_descr = Alignment Quality based on Blosum62 scores
+ label.conservation_descr = Conservation of total alignment less than {0}% gaps
+ label.consensus_descr = PID
+ label.complement_consensus_descr = PID for cDNA
+ label.strucconsensus_descr = PID for base pairs
+ label.occupancy_descr = Number of aligned positions
+ label.show_experimental = Enable experimental features
+ label.show_experimental_tip = Enable any new and currently 'experimental' features (see Latest Release Notes for details)
+ label.warning_hidden = Warning: {0} {1} is currently hidden
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();
+ }
+ });
addEscapeHandler();
Desktop.addInternalFrame(frame, MessageManager.getString("label.find"),
- WIDTH, HEIGHT);
-
+ MY_WIDTH, MY_HEIGHT);
+ frame.setMinimumSize(new Dimension(MIN_WIDTH, MIN_HEIGHT));
- textfield.requestFocus();
+ searchBox.requestFocus();
}
/**
}
/**
- * DOCUMENT ME!
- *
- * @param e
- * DOCUMENT ME!
+ * Opens a dialog that allows the user to create sequence features for the
+ * find match results.
*/
@Override
- public void createNewGroup_actionPerformed(ActionEvent e)
+ public void createFeatures_actionPerformed()
{
- SequenceI[] seqs = new SequenceI[searchResults.getSize()];
- SequenceFeature[] features = new SequenceFeature[searchResults
- .getSize()];
+ List<SequenceI> seqs = new ArrayList<SequenceI>();
+ List<SequenceFeature> features = new ArrayList<SequenceFeature>();
+
- String searchString = textfield.getText().trim();
++ String searchString = searchBox.getEditor().getItem().toString().trim();
+ String desc = "Search Results";
- int i = 0;
+ /*
+ * assemble dataset sequences, and template new sequence features,
+ * for the amend features dialog
+ */
for (SearchResultMatchI match : searchResults.getResults())
{
- seqs[i] = match.getSequence().getDatasetSequence();
-
- features[i] = new SequenceFeature(searchBox.getEditor().getItem()
- .toString().trim(),
- "Search Results", null, match.getStart(), match.getEnd(),
- "Search Results");
- i++;
+ seqs.add(match.getSequence().getDatasetSequence());
+ features.add(new SequenceFeature(searchString, desc, null, match
+ .getStart(), match.getEnd(), desc));
}
if (ap.getSeqPanel().seqCanvas.getFeatureRenderer().amendFeatures(seqs,
* 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.
*
- * @param findAll
+ * @param doFindAll
*/
- void doSearch(boolean findAll)
+ void doSearch(boolean doFindAll)
{
- createNewGroup.setEnabled(false);
+ createFeatures.setEnabled(false);
- String searchString = textfield.getText().trim();
+ String searchString = searchBox.getUserInput().trim();
if (isInvalidSearchString(searchString))
{
GridLayout gridLayout1 = new GridLayout();
- protected JButton createNewGroup = new JButton();
+ protected JButton createFeatures = new JButton();
- JScrollPane jScrollPane1 = new JScrollPane();
-
- protected JTextArea textfield = new JTextArea();
+ protected JvCacheableInputBox<String> searchBox = new JvCacheableInputBox<String>(getCacheKey());
BorderLayout mainBorderLayout = new BorderLayout();
@Override
public void actionPerformed(ActionEvent e)
{
- createNewGroup_actionPerformed(e);
+ createFeatures_actionPerformed();
}
});
- textfield.setFont(new java.awt.Font("Verdana", Font.PLAIN, 12));
- textfield.setText("");
- textfield.setLineWrap(true);
- textfield.addCaretListener(new CaretListener()
+ searchBox.setFont(new java.awt.Font("Verdana", Font.PLAIN, 12));
+ ((JTextComponent) searchBox.getEditor().getEditorComponent())
+ .addCaretListener(new CaretListener()
{
@Override
public void caretUpdate(CaretEvent e)