protected JButton createFeatures = new JButton();
- protected JvCacheableInputBox<String> searchBox = new JvCacheableInputBox<String>(getCacheKey());
+ protected JvCacheableInputBox<String> searchBox = new JvCacheableInputBox<String>(
+ getCacheKey());
BorderLayout mainBorderLayout = new BorderLayout();
searchBox.setFont(new java.awt.Font("Verdana", Font.PLAIN, 12));
((JTextComponent) searchBox.getEditor().getEditorComponent())
.addCaretListener(new CaretListener()
- {
- @Override
- public void caretUpdate(CaretEvent e)
- {
- textfield_caretUpdate(e);
- }
- });
+ {
+ @Override
+ public void caretUpdate(CaretEvent e)
+ {
+ textfield_caretUpdate(e);
+ }
+ });
searchBox.getEditor().getEditorComponent()
.addKeyListener(new java.awt.event.KeyAdapter()
- {
- @Override
- public void keyPressed(KeyEvent e)
- {
- textfield_keyPressed(e);
- }
- });
-
+ {
+ @Override
+ public void keyPressed(KeyEvent e)
+ {
+ textfield_keyPressed(e);
+ }
+ });
mainBorderLayout.setHgap(5);
mainBorderLayout.setVgap(5);
jPanel4.setLayout(borderLayout2);
caseSensitive.setHorizontalAlignment(SwingConstants.LEFT);
caseSensitive.setText(MessageManager.getString("label.match_case"));
- searchDescription.setText(MessageManager
- .getString("label.include_description"));
+ searchDescription
+ .setText(MessageManager.getString("label.include_description"));
actionsPanel.add(findNext, null);
actionsPanel.add(findAll, null);
jPanel4.add(optionsPanel, java.awt.BorderLayout.WEST);
}
- protected void findNext_actionPerformed(ActionEvent e)
+ protected void textfield_keyPressed(KeyEvent e)
{
+ if (e.getKeyCode() == KeyEvent.VK_ENTER)
+ {
+ if (!searchBox.isPopupVisible())
+ {
+ e.consume();
+ findNext_actionPerformed(null);
+ }
+ }
}
- protected void findAll_actionPerformed(ActionEvent e)
+ protected void findNext_actionPerformed(ActionEvent e)
{
}
- protected void textfield_keyPressed(KeyEvent e)
+ protected void findAll_actionPerformed(ActionEvent e)
{
- if (e.getKeyCode() == KeyEvent.VK_ENTER)
- {
- e.consume();
- findNext_actionPerformed(null);
- }
}
public void createFeatures_actionPerformed()
if (al != null && al.getHeight() > 0)
{
str = jalview.analysis.AlignSeq.extractGaps(
- jalview.util.Comparison.GapChars, al.getSequenceAt(0)
- .getSequenceAsString());
+ jalview.util.Comparison.GapChars,
+ al.getSequenceAt(0).getSequenceAsString());
}
}
}
}
-
-
-
-
/**
* Returns unique key used for storing Finder cache items in the cache data
* structure
return FINDER_CACHE_KEY;
}
-
-
}