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;
- boolean colourAppliesToAllGroups = true;
-
- boolean conservationColourSelected = false;
-
- boolean abovePIDThreshold = false;
-
int charHeight;
int charWidth;
// currently visible, in the correct order or rendering
public Hashtable featuresDisplayed;
-
boolean showHiddenMarkers = true;
public jalview.bin.JalviewLite applet;
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));
+
+ showGroupConsensus = applet.getDefaultParameter("showGroupConsensus",
+ showGroupConsensus);
- normaliseSequenceLogo = applet.getDefaultParameter("normaliseSequenceLogo", normaliseSequenceLogo);
+ 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.
return sq;
}
- public boolean getConservationSelected()
- {
- return conservationColourSelected;
- }
-
- public void setConservationSelected(boolean b)
- {
- conservationColourSelected = b;
- }
-
- public boolean getAbovePIDThreshold()
- {
- return abovePIDThreshold;
- }
-
- public void setAbovePIDThreshold(boolean b)
- {
- abovePIDThreshold = b;
- }
-
public int getStartRes()
{
return startRes;
return currentTree;
}
- public void setColourAppliesToAllGroups(boolean b)
- {
- colourAppliesToAllGroups = b;
- }
-
- public boolean getColourAppliesToAllGroups()
- {
- return colourAppliesToAllGroups;
- }
-
public boolean getShowJVSuffix()
{
return showJVSuffix;
}
}
-
-
-
-
public boolean getShowHiddenMarkers()
{
return showHiddenMarkers;
public void updateSequenceIdColours()
{
- Vector groups = alignment.getGroups();
- for (int ig = 0, igSize = groups.size(); ig < igSize; ig++)
+
+ for (SequenceGroup sg : alignment.getGroups())
{
- SequenceGroup sg = (SequenceGroup) groups.elementAt(ig);
if (sg.idColour != null)
{
- Vector sqs = sg.getSequences(getHiddenRepSequences());
- for (int s = 0, sSize = sqs.size(); s < sSize; s++)
+ for (SequenceI s : sg.getSequences(getHiddenRepSequences()))
{
- this.setSequenceColour((SequenceI) sqs.elementAt(s), sg.idColour);
+ this.setSequenceColour(s, sg.idColour);
}
}
}
{
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()
{