X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbappletgui%2FGFinder.java;h=434c8ea6c34a89b73537b3f14272ec33fa329b7b;hb=5aca821095eac17ed013a04b66256d5db7df69b7;hp=5a1afbe5303002ef2d447d76f82d377e84b5cebf;hpb=ec955aa655d8320258b91eb079bc57f688cd0a07;p=jalview.git diff --git a/src/jalview/jbappletgui/GFinder.java b/src/jalview/jbappletgui/GFinder.java index 5a1afbe..434c8ea 100755 --- a/src/jalview/jbappletgui/GFinder.java +++ b/src/jalview/jbappletgui/GFinder.java @@ -1,119 +1,111 @@ +/* +* Jalview - A Sequence Alignment Editor and Viewer +* Copyright (C) 2005 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 +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA +*/ package jalview.jbappletgui; import java.awt.*; import java.awt.event.*; -public class GFinder extends Panel -{ - Label jLabel1 = new Label(); - protected TextField textfield = new TextField(); - protected Button findAll = new Button(); - protected Button findNext = new Button(); - Panel jPanel1 = new Panel(); - GridLayout gridLayout1 = new GridLayout(); - protected Button createNewGroup = new Button(); +public class GFinder extends Panel { + Label jLabel1 = new Label(); + protected TextField textfield = new TextField(); + protected Button findAll = new Button(); + protected Button findNext = new Button(); + Panel jPanel1 = new Panel(); + GridLayout gridLayout1 = new GridLayout(); + protected Button createNewGroup = new Button(); - public GFinder() - { - try - { - jbInit(); + public GFinder() { + try { + jbInit(); + } catch (Exception e) { + e.printStackTrace(); + } } - 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(3, 30, 34, 15)); - this.setLayout(null); - textfield.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10)); - textfield.setText(""); - textfield.setBounds(new Rectangle(40, 27, 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", Font.PLAIN, 10)); - findAll.setLabel("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", Font.PLAIN, 10)); - findNext.setLabel("Find Next"); - findNext.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - findNext_actionPerformed(e); - } - }); - jPanel1.setBounds(new Rectangle(180, 5, 141, 64)); - jPanel1.setLayout(gridLayout1); - gridLayout1.setHgap(0); - gridLayout1.setRows(3); - gridLayout1.setVgap(2); - createNewGroup.setEnabled(false); - createNewGroup.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10)); - createNewGroup.setLabel("Create new group"); - createNewGroup.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - createNewGroup_actionPerformed(e); - } - }); - jPanel1.add(findNext, null); - jPanel1.add(findAll, null); - jPanel1.add(createNewGroup, null); - this.add(textfield, null); - this.add(jLabel1, null); - this.add(jPanel1, null); - } - - protected void findNext_actionPerformed(ActionEvent e) - { - - } - - protected void findAll_actionPerformed(ActionEvent e) - { - - } - - protected void textfield_actionPerformed(ActionEvent e) - { + private void jbInit() throws Exception { + jLabel1.setFont(new java.awt.Font("Verdana", 0, 12)); + jLabel1.setText("Find"); + jLabel1.setBounds(new Rectangle(3, 30, 34, 15)); + this.setLayout(null); + textfield.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10)); + textfield.setText(""); + textfield.setBounds(new Rectangle(40, 27, 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", Font.PLAIN, 10)); + findAll.setLabel("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", Font.PLAIN, 10)); + findNext.setLabel("Find Next"); + findNext.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + findNext_actionPerformed(e); + } + }); + jPanel1.setBounds(new Rectangle(180, 5, 141, 64)); + jPanel1.setLayout(gridLayout1); + gridLayout1.setHgap(0); + gridLayout1.setRows(3); + gridLayout1.setVgap(2); + createNewGroup.setEnabled(false); + createNewGroup.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10)); + createNewGroup.setLabel("Create new group"); + createNewGroup.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + createNewGroup_actionPerformed(e); + } + }); + jPanel1.add(findNext, null); + jPanel1.add(findAll, null); + jPanel1.add(createNewGroup, null); + this.add(textfield, null); + this.add(jLabel1, null); + this.add(jPanel1, null); + } - } + protected void findNext_actionPerformed(ActionEvent e) { + } - void textfield_keyTyped(KeyEvent e) - { - findNext.setEnabled(true); - } + protected void findAll_actionPerformed(ActionEvent e) { + } - public void createNewGroup_actionPerformed(ActionEvent e) - { + protected void textfield_actionPerformed(ActionEvent e) { + } - } + void textfield_keyTyped(KeyEvent e) { + findNext.setEnabled(true); + } + public void createNewGroup_actionPerformed(ActionEvent e) { + } }