/*
- * 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.1)
+ * 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.
- *
+ *
* 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 <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
*/
package jalview.appletgui;
import java.awt.*;
import jalview.analysis.*;
-import jalview.api.AlignCalcManagerI;
import jalview.api.AlignViewportI;
import jalview.bin.*;
import jalview.datamodel.*;
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
+public class AlignViewport extends AlignmentViewport implements
+ AlignViewportI, SelectionSource, VamsasSource
{
int startRes;
boolean upperCasebold = false;
-
int charHeight;
int charWidth;
// 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;
+
+ public void finalize()
+ {
+ applet = null;
+ quality = null;
+ alignment = null;
+ colSel = null;
}
public AlignViewport(AlignmentI al, JalviewLite applet)
{
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)
}
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)
return showSequenceFeatures;
}
-
/**
* get the consensus sequence as displayed under the PID consensus annotation
* row.
}
}
- 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());
}
}
-
-
-
-
public boolean getShowHiddenMarkers()
{
return showHiddenMarkers;
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()
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()
{
return followSelection;
}
+
public void sendSelection()
{
jalview.structure.StructureSelectionManager
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
{
return hasHiddenColumns;
}
-
+
public boolean isNormaliseSequenceLogo()
{
return normaliseSequenceLogo;
/**
*
- * @return true if alignment characters should be displayed
+ * @return true if alignment characters should be displayed
*/
public boolean isValidCharWidth()
{