X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignViewport.java;h=350921722fa2d3a56ac8053787e15543340f1841;hb=6fc9aca27f606f6e3a0121597896e1a5dae35c36;hp=088d4273b8397893f8fd4fea13df5e64b43218c1;hpb=1deb6329192c4750c104d4da8c70f9cb6e3c5a42;p=jalview.git diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 088d427..3509217 100755 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -62,7 +62,7 @@ public class AlignViewport int charHeight; int charWidth; int wrappedWidth; - Font font = new Font("SansSerif", Font.PLAIN, 10); + Font font; AlignmentI alignment; ColumnSelection colSel = new ColumnSelection(); int threshold; @@ -71,12 +71,22 @@ public class AlignViewport boolean scaleAboveWrapped = false; boolean scaleLeftWrapped = true; boolean scaleRightWrapped = true; + boolean hasHiddenColumns = false; + boolean hasHiddenRows = false; + + boolean cursorMode = false; + + // The following vector holds the features which are + // currently visible, in the correct order or rendering + Hashtable featuresDisplayed = null; + /** DOCUMENT ME!! */ public Vector vconsensus; AlignmentAnnotation consensus; AlignmentAnnotation conservation; AlignmentAnnotation quality; + boolean autoCalculateConsensus = true; /** DOCUMENT ME!! */ public int ConsPercGaps = 25; // JBPNote : This should be a scalable property! @@ -90,6 +100,8 @@ public class AlignViewport boolean antiAlias = false; + boolean padGaps = false; + public AlignViewport(AlignmentI al, boolean dataset) { @@ -124,6 +136,10 @@ public class AlignViewport showQuality = Cache.getDefault("SHOW_QUALITY", true); showIdentity = Cache.getDefault("SHOW_IDENTITY", true); + autoCalculateConsensus = Cache.getDefault("AUTO_CALC_CONSENSUS", true); + + padGaps = Cache.getDefault("PAD_GAPS", false); + String fontName = Cache.getDefault("FONT_NAME", "SansSerif"); String fontStyle = Cache.getDefault("FONT_STYLE", Font.PLAIN + "") ; String fontSize = Cache.getDefault("FONT_SIZE", "10"); @@ -178,11 +194,16 @@ public class AlignViewport * * @param b DOCUMENT ME! */ - public void showSequenceFeatures(boolean b) + public void setShowSequenceFeatures(boolean b) { showSequenceFeatures = b; } + public boolean getShowSequenceFeatures() + { + return showSequenceFeatures; + } + /** * DOCUMENT ME! */ @@ -1064,7 +1085,6 @@ public class AlignViewport { globalColourScheme.setThreshold(globalColourScheme.getThreshold(), ignoreGapsInConsensusCalculation); } - } public boolean getIgnoreGapsConsensus() @@ -1081,4 +1101,23 @@ public class AlignViewport { return isDataset; } + + public void hideSequence(SequenceI seq) + { + alignment.getHiddenSequences().hideSequence(seq); + hasHiddenRows = true; + } + + public void showSequence(int index) + { + alignment.getHiddenSequences().showSequence(index); + + if(alignment.getHiddenSequences().getSize()<1) + hasHiddenRows = false; + } + + public int adjustForHiddenSeqs(int alignmentIndex) + { + return alignment.getHiddenSequences().adjustForHiddenSeqs(alignmentIndex); + } }