X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fjbgui%2FGSequenceLink.java;h=19740fa544f7b0b3e6e1812d567edd91bef71fb8;hb=4f1f764c09427cd63c3e355fa729da86735a8194;hp=2c688ced9426ece42e4c083e7f46b2fd0689fed0;hpb=174230b4233d9ce80f94527768d2cd2f76da11ab;p=jalview.git diff --git a/src/jalview/jbgui/GSequenceLink.java b/src/jalview/jbgui/GSequenceLink.java index 2c688ce..19740fa 100755 --- a/src/jalview/jbgui/GSequenceLink.java +++ b/src/jalview/jbgui/GSequenceLink.java @@ -1,29 +1,26 @@ /* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2006 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 -*/ + * Jalview - A Sequence Alignment Editor and Viewer + * 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 + * 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.jbgui; import java.awt.*; -import javax.swing.JTextField; -import javax.swing.JLabel; +import java.awt.event.*; import javax.swing.*; -import java.awt.event.KeyAdapter; -import java.awt.event.KeyEvent; public class GSequenceLink extends Panel @@ -109,18 +106,17 @@ public class GSequenceLink public boolean checkValid() { - if(urlTB.getText().indexOf("$SEQUENCE_ID$")==-1) + if (urlTB.getText().indexOf("$SEQUENCE_ID$") == -1) { JOptionPane.showInternalMessageDialog(jalview.gui.Desktop.desktop, "Sequence URL must contain $SEQUENCE_ID$", - "URL not valid", JOptionPane.WARNING_MESSAGE); + "URL not valid", + JOptionPane.WARNING_MESSAGE); return false; } return true; } - - JTextField nameTB = new JTextField(); JTextField urlTB = new JTextField(); JLabel jLabel1 = new JLabel(); @@ -130,19 +126,18 @@ public class GSequenceLink GridBagLayout gridBagLayout1 = new GridBagLayout(); public void nameTB_keyTyped(KeyEvent e) { - if(e.getKeyChar()=='|') - { - e.consume(); - } + if (e.getKeyChar() == '|') + { + e.consume(); + } } public void urlTB_keyTyped(KeyEvent e) { - if (e.getKeyChar() == '|' || e.getKeyChar()==' ') + if (e.getKeyChar() == '|' || e.getKeyChar() == ' ') { e.consume(); } } } -