X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fgui%2FAlignViewport.java;h=2922f0910e5b23904b95946ab7f6d96cd4601067;hb=133e5d7be0ca295fd4ac4ccfa6c82165c795ea80;hp=24d50d446e8c8bbf2febcd17eccafa92cc08789c;hpb=98eb909d0a4fe04ff6ad93f71086f1127fe4a530;p=jalview.git diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 24d50d4..2922f09 100755 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -61,8 +61,7 @@ public class AlignViewport SequenceGroup selectionGroup; int charHeight; int charWidth; - int chunkWidth; - int chunkHeight; + int wrappedWidth; Font font = new Font("SansSerif", Font.PLAIN, 10); AlignmentI alignment; ColumnSelection colSel = new ColumnSelection(); @@ -139,6 +138,7 @@ public class AlignViewport // We must set conservation and consensus before setting colour, // as Blosum and Clustal require this to be done updateConservation(); + updateConsensus(); if (jalview.bin.Cache.getProperty("DEFAULT_COLOUR") != null) @@ -176,6 +176,9 @@ public class AlignViewport */ public void updateConservation() { + if(alignment.isNucleotide()) + return; + try{ Conservation cons = new jalview.analysis.Conservation("All", jalview.schemes.ResidueProperties.propHash, 3, @@ -278,10 +281,18 @@ public class AlignViewport quality.annotations = qannotations; quality.graphMax = cons.qualityRange[1].floatValue(); } - }catch(OutOfMemoryError error) + } + catch (OutOfMemoryError error) { - System.out.println("Out of memory calculating conservation."); + javax.swing.JOptionPane.showInternalMessageDialog(Desktop.desktop, + "Out of memory calculating conservation!!" + + + "\nSee help files for increasing Java Virtual Machine memory." + , "Out of memory", + javax.swing.JOptionPane.WARNING_MESSAGE); + System.out.println("Conservation calculation: " + error); System.gc(); + } } @@ -358,7 +369,13 @@ public class AlignViewport }catch(OutOfMemoryError error) { - System.out.println("Out of memory calculating consensus."); + javax.swing.JOptionPane.showInternalMessageDialog(Desktop.desktop, + "Out of memory calculating consensus!!" + + + "\nSee help files for increasing Java Virtual Machine memory." + , "Out of memory", + javax.swing.JOptionPane.WARNING_MESSAGE); + System.out.println("Consensus calculation: " + error); System.gc(); } @@ -616,9 +633,9 @@ public class AlignViewport * * @param w DOCUMENT ME! */ - public void setChunkWidth(int w) + public void setWrappedWidth(int w) { - this.chunkWidth = w; + this.wrappedWidth = w; } /** @@ -626,30 +643,11 @@ public class AlignViewport * * @return DOCUMENT ME! */ - public int getChunkWidth() - { - return chunkWidth; - } - - /** - * DOCUMENT ME! - * - * @param h DOCUMENT ME! - */ - public void setChunkHeight(int h) + public int getWrappedWidth() { - this.chunkHeight = h; + return wrappedWidth; } - /** - * DOCUMENT ME! - * - * @return DOCUMENT ME! - */ - public int getChunkHeight() - { - return chunkHeight; - } /** * DOCUMENT ME!