X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAlignViewport.java;h=13d03e3772cf53eed9273d735fd2dd29f8a418b8;hb=25aaaa87042b3f507ad4348120df7dd073182759;hp=64907ac0e1644015d8003c7e711486669f0ba1fa;hpb=37fd8c26efada7832b61e5af5c0d56baa69608c3;p=jalview.git
diff --git a/src/jalview/appletgui/AlignViewport.java b/src/jalview/appletgui/AlignViewport.java
index 64907ac..13d03e3 100644
--- a/src/jalview/appletgui/AlignViewport.java
+++ b/src/jalview/appletgui/AlignViewport.java
@@ -1,39 +1,44 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
- * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
+ * Copyright (C) 2014 The Jalview Authors
*
* This file is part of Jalview.
*
* Jalview is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
- *
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *
* Jalview is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along with Jalview. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see .
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
*/
package jalview.appletgui;
-import java.util.*;
-
-import java.awt.*;
-
-import jalview.analysis.*;
-import jalview.api.AlignCalcManagerI;
+import jalview.analysis.NJTree;
import jalview.api.AlignViewportI;
-import jalview.bin.*;
-import jalview.datamodel.*;
-import jalview.schemes.*;
+import jalview.bin.JalviewLite;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
+import jalview.schemes.ColourSchemeProperty;
+import jalview.schemes.UserColourScheme;
import jalview.structure.SelectionSource;
import jalview.structure.VamsasSource;
import jalview.viewmodel.AlignmentViewport;
-import jalview.workers.ConservationThread;
-import jalview.workers.ConsensusThread;
-public class AlignViewport extends AlignmentViewport implements AlignViewportI, SelectionSource, VamsasSource
+import java.awt.Font;
+import java.util.Stack;
+
+public class AlignViewport extends AlignmentViewport implements
+ AlignViewportI, SelectionSource, VamsasSource
{
int startRes;
@@ -57,13 +62,10 @@ public class AlignViewport extends AlignmentViewport implements AlignViewportI,
boolean renderGaps = true;
- boolean showSequenceFeatures = false;
-
boolean showAnnotation = true;
boolean upperCasebold = false;
-
int charHeight;
int charWidth;
@@ -86,28 +88,24 @@ public class AlignViewport extends AlignmentViewport implements AlignViewportI,
boolean scaleRightWrapped = true;
- // The following vector holds the features which are
- // currently visible, in the correct order or rendering
- public Hashtable featuresDisplayed;
-
-
boolean showHiddenMarkers = true;
public jalview.bin.JalviewLite applet;
- Hashtable sequenceColours;
-
boolean MAC = false;
Stack historyList = new Stack();
Stack redoList = new Stack();
-
- public void finalize() {
- applet=null;
- quality=null;
- alignment=null;
- colSel=null;
+
+ private AnnotationColumnChooser annotationColumnSelectionState;
+
+ public void finalize()
+ {
+ applet = null;
+ quality = null;
+ alignment = null;
+ colSel = null;
}
public AlignViewport(AlignmentI al, JalviewLite applet)
@@ -179,15 +177,19 @@ public class AlignViewport extends AlignmentViewport implements AlignViewportI,
{
showJVSuffix = applet.getDefaultParameter("showFullId", showJVSuffix);
- showAnnotation = applet.getDefaultParameter("showAnnotation", showAnnotation);
-
- showConservation = applet.getDefaultParameter("showConservation", showConservation);
-
+ showAnnotation = applet.getDefaultParameter("showAnnotation",
+ showAnnotation);
+
+ showConservation = applet.getDefaultParameter("showConservation",
+ showConservation);
+
showQuality = applet.getDefaultParameter("showQuality", showQuality);
- showConsensus = applet.getDefaultParameter("showConsensus", showConsensus);
+ showConsensus = applet.getDefaultParameter("showConsensus",
+ showConsensus);
- showUnconserved = applet.getDefaultParameter("showUnconserved", showUnconserved);
+ showUnconserved = applet.getDefaultParameter("showUnconserved",
+ showUnconserved);
String param = applet.getParameter("upperCase");
if (param != null)
@@ -199,19 +201,26 @@ public class AlignViewport extends AlignmentViewport implements AlignViewportI,
}
sortByTree = applet.getDefaultParameter("sortByTree", sortByTree);
- followHighlight = applet.getDefaultParameter("automaticScrolling",followHighlight);
+ followHighlight = applet.getDefaultParameter("automaticScrolling",
+ followHighlight);
followSelection = followHighlight;
- showSequenceLogo = applet.getDefaultParameter("showSequenceLogo", showSequenceLogo);
+ showSequenceLogo = applet.getDefaultParameter("showSequenceLogo",
+ showSequenceLogo);
+
+ normaliseSequenceLogo = applet.getDefaultParameter(
+ "normaliseSequenceLogo", applet.getDefaultParameter(
+ "normaliseLogo", normaliseSequenceLogo));
- normaliseSequenceLogo = applet.getDefaultParameter("normaliseSequenceLogo", applet.getDefaultParameter("normaliseLogo", normaliseSequenceLogo));
+ showGroupConsensus = applet.getDefaultParameter("showGroupConsensus",
+ showGroupConsensus);
+
+ showGroupConservation = applet.getDefaultParameter(
+ "showGroupConservation", showGroupConservation);
+
+ showConsensusHistogram = applet.getDefaultParameter(
+ "showConsensusHistogram", showConsensusHistogram);
- showGroupConsensus = applet.getDefaultParameter("showGroupConsensus", showGroupConsensus);
-
- showGroupConservation = applet.getDefaultParameter("showGroupConservation", showGroupConservation);
-
- showConsensusHistogram = applet.getDefaultParameter("showConsensusHistogram", showConsensusHistogram);
-
}
if (applet != null)
@@ -247,17 +256,6 @@ public class AlignViewport extends AlignmentViewport implements AlignViewportI,
}
- public void showSequenceFeatures(boolean b)
- {
- showSequenceFeatures = b;
- }
-
- public boolean getShowSequenceFeatures()
- {
- return showSequenceFeatures;
- }
-
-
/**
* get the consensus sequence as displayed under the PID consensus annotation
* row.
@@ -478,26 +476,6 @@ public class AlignViewport extends AlignmentViewport implements AlignViewportI,
}
}
- public void setThreshold(int thresh)
- {
- threshold = thresh;
- }
-
- public int getThreshold()
- {
- return threshold;
- }
-
- public void setIncrement(int inc)
- {
- increment = inc;
- }
-
- public int getIncrement()
- {
- return increment;
- }
-
public void resetSeqLimits(int height)
{
setEndSeq(height / getCharHeight());
@@ -575,10 +553,6 @@ public class AlignViewport extends AlignmentViewport implements AlignViewportI,
}
}
-
-
-
-
public boolean getShowHiddenMarkers()
{
return showHiddenMarkers;
@@ -589,35 +563,6 @@ public class AlignViewport extends AlignmentViewport implements AlignViewportI,
showHiddenMarkers = show;
}
- public Color getSequenceColour(SequenceI seq)
- {
- if (sequenceColours == null || !sequenceColours.containsKey(seq))
- {
- return Color.white;
- }
- else
- {
- return (Color) sequenceColours.get(seq);
- }
- }
-
- public void setSequenceColour(SequenceI seq, Color col)
- {
- if (sequenceColours == null)
- {
- sequenceColours = new Hashtable();
- }
-
- if (col == null)
- {
- sequenceColours.remove(seq);
- }
- else
- {
- sequenceColours.put(seq, col);
- }
- }
-
boolean centreColumnLabels;
public boolean getCentreColumnLabels()
@@ -625,21 +570,6 @@ public class AlignViewport extends AlignmentViewport implements AlignViewportI,
return centreColumnLabels;
}
- public void updateSequenceIdColours()
- {
-
- for (SequenceGroup sg:alignment.getGroups())
- {
- if (sg.idColour != null)
- {
- for (SequenceI s:sg.getSequences(getHiddenRepSequences()))
- {
- this.setSequenceColour(s, sg.idColour);
- }
- }
- }
- }
-
public boolean followHighlight = true;
public boolean getFollowHighlight()
@@ -657,6 +587,7 @@ public class AlignViewport extends AlignmentViewport implements AlignViewportI,
{
return followSelection;
}
+
public void sendSelection()
{
jalview.structure.StructureSelectionManager
@@ -665,9 +596,6 @@ public class AlignViewport extends AlignmentViewport implements AlignViewportI,
new ColumnSelection(getColumnSelection()), this);
}
-
-
-
/**
* synthesize a column selection if none exists so it covers the given
* selection group. if wholewidth is false, no column selection is made if the
@@ -701,12 +629,6 @@ public class AlignViewport extends AlignmentViewport implements AlignViewportI,
}
}
- @Override
- public boolean hasHiddenColumns()
- {
- return hasHiddenColumns;
- }
-
public boolean isNormaliseSequenceLogo()
{
return normaliseSequenceLogo;
@@ -719,11 +641,22 @@ public class AlignViewport extends AlignmentViewport implements AlignViewportI,
/**
*
- * @return true if alignment characters should be displayed
+ * @return true if alignment characters should be displayed
*/
public boolean isValidCharWidth()
{
return validCharWidth;
}
+ public AnnotationColumnChooser getAnnotationColumnSelectionState()
+ {
+ return annotationColumnSelectionState;
+ }
+
+ public void setAnnotationColumnSelectionState(
+ AnnotationColumnChooser annotationColumnSelectionState)
+ {
+ this.annotationColumnSelectionState = annotationColumnSelectionState;
+ }
+
}