/*
* Jalview - A Sequence Alignment Editor and Viewer
- * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
-import jalview.io.FormatAdapter;
-import jalview.datamodel.Alignment;
-import java.awt.BorderLayout;
+
+import jalview.datamodel.*;
+import jalview.io.*;
public class GFinder
extends JPanel
textfield_caretUpdate(e);
}
});
- textfield.addKeyListener(new java.awt.event.KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- textfield_keyPressed(e);
- }
+ textfield.addKeyListener(new java.awt.event.KeyAdapter()
+ {
+ public void keyPressed(KeyEvent e)
+ {
+ textfield_keyPressed(e);
+ }
});
borderLayout1.setHgap(5);
{
}
-
protected void textfield_keyPressed(KeyEvent e)
{
- if(e.getKeyCode()==KeyEvent.VK_ENTER)
+ if (e.getKeyCode() == KeyEvent.VK_ENTER)
{
e.consume();
findNext_actionPerformed(null);
{
String str = textfield.getText();
Alignment al = null;
- try{al = new FormatAdapter().readFile(str, "Paste", "FASTA");}
- catch(Exception ex){}
- if(al!=null && al.getHeight()>0)
+ try
+ {
+ al = new FormatAdapter().readFile(str, "Paste", "FASTA");
+ }
+ catch (Exception ex)
+ {}
+ if (al != null && al.getHeight() > 0)
{
str = jalview.analysis.AlignSeq.extractGaps(
jalview.util.Comparison.GapChars,