New class
authoramwaterhouse <Andrew Waterhouse>
Wed, 1 Dec 2004 17:03:12 +0000 (17:03 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 1 Dec 2004 17:03:12 +0000 (17:03 +0000)
src/jalview/jbgui/GFinder.java [new file with mode: 0755]

diff --git a/src/jalview/jbgui/GFinder.java b/src/jalview/jbgui/GFinder.java
new file mode 100755 (executable)
index 0000000..76b4b42
--- /dev/null
@@ -0,0 +1,117 @@
+package jalview.jbgui;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.*;
+
+
+public class GFinder extends JPanel
+{
+  JLabel jLabel1 = new JLabel();
+  protected JTextField textfield = new JTextField();
+  protected JButton findAll = new JButton();
+  protected JButton findNext = new JButton();
+  protected JButton cancel = new JButton();
+  JPanel jPanel1 = new JPanel();
+  GridLayout gridLayout1 = new GridLayout();
+
+  public GFinder()
+  {
+    try
+    {
+      jbInit();
+    }
+    catch(Exception e)
+    {
+      e.printStackTrace();
+    }
+  }
+  private void jbInit() throws Exception
+  {
+    jLabel1.setFont(new java.awt.Font("Verdana", 0, 12));
+    jLabel1.setText("Find");
+    jLabel1.setBounds(new Rectangle(6, 28, 34, 15));
+    this.setLayout(null);
+    textfield.setFont(new java.awt.Font("Verdana", 0, 12));
+    textfield.setText("");
+    textfield.setBounds(new Rectangle(41, 24, 133, 21));
+    textfield.addKeyListener(new java.awt.event.KeyAdapter()
+    {
+      public void keyTyped(KeyEvent e)
+      {
+        textfield_keyTyped(e);
+      }
+    });
+    textfield.addActionListener(new java.awt.event.ActionListener()
+    {
+      public void actionPerformed(ActionEvent e)
+      {
+        textfield_actionPerformed(e);
+      }
+    });
+    findAll.setFont(new java.awt.Font("Verdana", 0, 12));
+    findAll.setText("Find all");
+    findAll.addActionListener(new java.awt.event.ActionListener()
+    {
+      public void actionPerformed(ActionEvent e)
+      {
+        findAll_actionPerformed(e);
+      }
+    });
+    findNext.setEnabled(false);
+    findNext.setFont(new java.awt.Font("Verdana", 0, 12));
+    findNext.setText("Find Next");
+    findNext.addActionListener(new java.awt.event.ActionListener()
+    {
+      public void actionPerformed(ActionEvent e)
+      {
+        findNext_actionPerformed(e);
+      }
+    });
+    cancel.setFont(new java.awt.Font("Verdana", 0, 12));
+    cancel.setText("Close");
+    cancel.addActionListener(new java.awt.event.ActionListener()
+    {
+      public void actionPerformed(ActionEvent e)
+      {
+        cancel_actionPerformed(e);
+      }
+    });
+    jPanel1.setBounds(new Rectangle(178, 4, 102, 62));
+    jPanel1.setLayout(gridLayout1);
+    gridLayout1.setHgap(0);
+    gridLayout1.setRows(3);
+    gridLayout1.setVgap(2);
+    this.add(textfield, null);
+    this.add(jPanel1, null);
+    jPanel1.add(findNext, null);
+    jPanel1.add(findAll, null);
+    jPanel1.add(cancel, null);
+    this.add(jLabel1, null);
+  }
+
+  protected void findNext_actionPerformed(ActionEvent e)
+  {
+
+  }
+
+  protected void findAll_actionPerformed(ActionEvent e)
+  {
+
+  }
+
+  protected void cancel_actionPerformed(ActionEvent e)
+  {
+
+  }
+
+  protected void textfield_actionPerformed(ActionEvent e)
+  {
+
+  }
+
+  void textfield_keyTyped(KeyEvent e)
+  {
+    findNext.setEnabled(true);
+  }
+}