From 988f114b8ade17976c45693a1da84eda2dbd6e3f Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 26 Aug 2008 11:19:07 +0000 Subject: [PATCH] allow '|' to be entered in URL text box and added regex extension form to instructions --- src/jalview/jbgui/GSequenceLink.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/jalview/jbgui/GSequenceLink.java b/src/jalview/jbgui/GSequenceLink.java index 712354a..40d00be 100755 --- a/src/jalview/jbgui/GSequenceLink.java +++ b/src/jalview/jbgui/GSequenceLink.java @@ -71,8 +71,11 @@ public class GSequenceLink jLabel2.setText("URL"); jLabel2.setBounds(new Rectangle(17, 37, 54, 27)); jLabel3.setFont(new java.awt.Font("Verdana", Font.ITALIC, 11)); - jLabel3.setText("Use $SEQUENCE_ID$ to specify where sequence id is in URL"); + jLabel3.setText("Use $SEQUENCE_ID$ or $SEQUENCE_ID=//=$"); jLabel3.setBounds(new Rectangle(21, 72, 351, 15)); + jLabel4.setFont(new java.awt.Font("Verdana", Font.ITALIC, 11)); + jLabel4.setText("\nto embed sequence id in URL"); + jLabel4.setBounds(new Rectangle(21, 93, 351, 15)); jPanel1.setBorder(BorderFactory.createEtchedBorder()); jPanel1.setLayout(null); jPanel1.add(jLabel1); @@ -80,10 +83,11 @@ public class GSequenceLink jPanel1.add(urlTB); jPanel1.add(jLabel2); jPanel1.add(jLabel3); + jPanel1.add(jLabel4); this.add(jPanel1, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0 , GridBagConstraints.CENTER, GridBagConstraints.BOTH, - new Insets(5, 4, 6, 5), 390, 100)); + new Insets(5, 4, 6, 5), 390, 130)); } public void setName(String name) @@ -126,6 +130,7 @@ public class GSequenceLink JLabel jLabel1 = new JLabel(); JLabel jLabel2 = new JLabel(); JLabel jLabel3 = new JLabel(); + JLabel jLabel4 = new JLabel(); JPanel jPanel1 = new JPanel(); GridBagLayout gridBagLayout1 = new GridBagLayout(); public void nameTB_keyTyped(KeyEvent e) @@ -138,10 +143,11 @@ public class GSequenceLink public void urlTB_keyTyped(KeyEvent e) { - if (e.getKeyChar() == '|' || e.getKeyChar() == ' ') - { - e.consume(); - } + // URLLink object validation takes care of incorrect regexes. + //if (e.getKeyChar() == '|' || e.getKeyChar() == ' ') + //{ + // e.consume(); + // } } } -- 1.7.10.2