X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAlignViewport.java;h=fc4638697a6fd6b9cd96f5b0391285fd4c5b708d;hb=7be3a744db5213f49e70178ade126d1cc797c762;hp=7c46cd9b492dd4646d55817780a55d2da9b12dc0;hpb=b169b1a49c078d123feb729db6acb9779f50e7d6;p=jalview.git diff --git a/src/jalview/appletgui/AlignViewport.java b/src/jalview/appletgui/AlignViewport.java index 7c46cd9..fc46386 100755 --- a/src/jalview/appletgui/AlignViewport.java +++ b/src/jalview/appletgui/AlignViewport.java @@ -1,6 +1,6 @@ /* * Jalview - A Sequence Alignment Editor and Viewer - * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * 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 @@ -50,6 +50,7 @@ public class AlignViewport boolean showConservation = true; boolean showQuality = true; boolean showConsensus = true; + boolean upperCasebold = false; boolean colourAppliesToAllGroups = true; ColourSchemeI globalColourScheme = null; @@ -79,7 +80,7 @@ public class AlignViewport // The following vector holds the features which are // currently visible, in the correct order or rendering - Hashtable featuresDisplayed; + public Hashtable featuresDisplayed; boolean hasHiddenColumns = false; boolean hasHiddenRows = false; @@ -101,6 +102,8 @@ public class AlignViewport jalview.bin.JalviewLite applet; + boolean MAC = false; + public AlignViewport(AlignmentI al, JalviewLite applet) { this.applet = applet; @@ -111,6 +114,9 @@ public class AlignViewport this.endSeq = al.getHeight() - 1; setFont(font); + if(System.getProperty("os.name").startsWith("Mac")) + MAC = true; + if (applet != null) { String param = applet.getParameter("showFullId"); @@ -142,6 +148,14 @@ public class AlignViewport { showConsensus = Boolean.valueOf(param).booleanValue(); } + + param = applet.getParameter("upperCase"); + if (param != null) + { + if(param.equalsIgnoreCase("bold")) + upperCasebold = true; + } + } // We must set conservation and consensus before setting colour, // as Blosum and Clustal require this to be done @@ -352,7 +366,32 @@ public class AlignViewport globalColourScheme.setConsensus(vconsensus); } - + /** + * get the consensus sequence as displayed under the PID consensus annotation row. + * @return consensus sequence as a new sequence object + */ + /** + * get the consensus sequence as displayed under the PID consensus annotation row. + * @return consensus sequence as a new sequence object + */ + public SequenceI getConsensusSeq() { + if (consensus==null) + updateConsensus(); + if (consensus==null) + return null; + StringBuffer seqs=new StringBuffer(); + for (int i=0; i 0) + if(seq!=null) { - if (selectionGroup == null) - { - selectionGroup = new SequenceGroup(); - selectionGroup.setEndRes(alignment.getWidth() - 1); - } + for (int i = 0; i < seq.length; i++) + alignment.getHiddenSequences().hideSequence(seq[i]); - for (int t = 0; t < tmp.size(); t++) - { - selectionGroup.addSequence( - (SequenceI) tmp.elementAt(t), false - ); - } + hasHiddenRows = true; + firePropertyChange("alignment", null, alignment.getSequences()); } - if (alignment.getHiddenSequences().getSize() < 1) - hasHiddenRows = false; } public void showColumn(int col) @@ -824,8 +858,9 @@ public class AlignViewport (SequenceI)tmp.elementAt(t), false ); } + firePropertyChange("alignment", null, alignment.getSequences()); hasHiddenRows = false; - } + } } public int adjustForHiddenSeqs(int alignmentIndex) @@ -921,9 +956,9 @@ public class AlignViewport } // Final match if necessary. if (last