From e986fde3ae4b511e4c5eccfc1a6e4591a5e77661 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 17 Nov 2005 18:18:55 +0000 Subject: [PATCH] Hidden tabs and vamsas refs for beta release --- src/jalview/gui/AlignFrame.java | 12 ++++++++---- src/jalview/gui/Desktop.java | 4 ++-- src/jalview/gui/SequenceFetcher.java | 18 +++++++++++------- src/jalview/gui/SequenceRenderer.java | 3 ++- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 65b9a08..74f081b 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -98,7 +98,7 @@ public class AlignFrame // remove(tabbedPane); getContentPane().add(alignPanel, BorderLayout.CENTER); - setGUINucleotide(al.isNucleotide()); + // tabbedPane.add(al.isNucleotide() ? "DNA":"Protein", alignPanel); @@ -127,8 +127,12 @@ public class AlignFrame } }); - if(Desktop.desktop!=null) + + if (Desktop.desktop != null) + { addServiceListeners(); + setGUINucleotide(al.isNucleotide()); + } } /* Set up intrinsic listeners for dynamically generated GUI bits. */ @@ -2492,7 +2496,7 @@ public class AlignFrame // TODO: group services by location as well as function. } - public void vamsasStore_actionPerformed(ActionEvent e) + /* public void vamsasStore_actionPerformed(ActionEvent e) { JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache. getProperty("LAST_DIRECTORY")); @@ -2509,7 +2513,7 @@ public class AlignFrame //vs.store(chooser.getSelectedFile().getAbsolutePath() ); vs.storeJalview( chooser.getSelectedFile().getAbsolutePath(), this); } - } + }*/ public void featureSettings_actionPerformed(ActionEvent e) { diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index cc720fe..8323320 100755 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -550,7 +550,7 @@ public class Desktop extends jalview.jbgui.GDesktop } } - public void vamsasLoad_actionPerformed(ActionEvent e) + /* public void vamsasLoad_actionPerformed(ActionEvent e) { JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache. getProperty("LAST_DIRECTORY")); @@ -569,7 +569,7 @@ public class Desktop extends jalview.jbgui.GDesktop ); } - } + }*/ public void inputSequence_actionPerformed(ActionEvent e) diff --git a/src/jalview/gui/SequenceFetcher.java b/src/jalview/gui/SequenceFetcher.java index 4fa215f..adadf14 100755 --- a/src/jalview/gui/SequenceFetcher.java +++ b/src/jalview/gui/SequenceFetcher.java @@ -127,6 +127,7 @@ public class SequenceFetcher public void run() { + String error = null; StringBuffer result = new StringBuffer(); if (database.getSelectedItem().equals("Uniprot") || database.getSelectedItem().equals("EMBL") @@ -160,13 +161,11 @@ public class SequenceFetcher } }catch(Exception ex)// Problem parsing PDB file { - JOptionPane.showInternalMessageDialog(Desktop.desktop, - "Error retrieving "+textfield.getText()+" from "+database.getSelectedItem(), - "Error Retrieving Data", JOptionPane.WARNING_MESSAGE); + error = "Error retrieving "+textfield.getText()+" from "+database.getSelectedItem(); } } - if (result.length() > 0) + if (result.length() > 0 && error!=null) { String format = IdentifyFile.Identify(result.toString(), "Paste"); SequenceI[] sequences = null; @@ -228,9 +227,9 @@ public class SequenceFetcher } else - JOptionPane.showInternalMessageDialog(Desktop.desktop, - "Error retrieving "+textfield.getText()+" from "+database.getSelectedItem(), - "Error Retrieving Data", JOptionPane.WARNING_MESSAGE); + error = "Error retrieving "+textfield.getText()+" from "+database.getSelectedItem(); + + } } @@ -240,6 +239,11 @@ public class SequenceFetcher ok.setEnabled(true); cancel.setEnabled(true); frame.setTitle("Sequence Fetcher"); + + if(error!=null) + JOptionPane.showInternalMessageDialog(Desktop.desktop, + error, "Error Retrieving Data", JOptionPane.WARNING_MESSAGE); + } } diff --git a/src/jalview/gui/SequenceRenderer.java b/src/jalview/gui/SequenceRenderer.java index f70a9fa..e95ca02 100755 --- a/src/jalview/gui/SequenceRenderer.java +++ b/src/jalview/gui/SequenceRenderer.java @@ -86,7 +86,8 @@ public class SequenceRenderer graphics = bi.getGraphics(); - bi.setRGB(0,0, initialCol.getRGB()); + if(initialCol!=null) + bi.setRGB(0,0, initialCol.getRGB()); allGroups = av.alignment.findAllGroups(seq); -- 1.7.10.2