X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignViewport.java;h=d6df3855b2dc56ad4e771595bd0abff599b8c493;hb=497958b4e5217efaa3ddeece38f38c3a6e98cb96;hp=de8f310cf7b8b3f90de225275a725bd21741f184;hpb=b2f9a8d7bce642ff4011bc6d49e02bb0569fbb11;p=jalview.git
diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java
index de8f310..d6df385 100644
--- a/src/jalview/gui/AlignViewport.java
+++ b/src/jalview/gui/AlignViewport.java
@@ -1,19 +1,21 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
* 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.
*/
/*
@@ -36,6 +38,7 @@
*/
package jalview.gui;
+import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
import jalview.analysis.NJTree;
import jalview.api.AlignViewportI;
import jalview.bin.Cache;
@@ -93,10 +96,10 @@ public class AlignViewport extends AlignmentViewport implements
boolean renderGaps = true;
- boolean showSequenceFeatures = false;
-
boolean showAnnotation = true;
+ SequenceAnnotationOrder sortAnnotationsBy = null;
+
int charHeight;
int charWidth;
@@ -121,12 +124,6 @@ public class AlignViewport extends AlignmentViewport implements
boolean cursorMode = false;
- /**
- * Keys are the feature types which are currently visible. Note: Values are
- * not used!
- */
- Hashtable featuresDisplayed = null;
-
boolean antiAlias = false;
Rectangle explodedPosition;
@@ -356,28 +353,15 @@ public class AlignViewport extends AlignmentViewport implements
}
}
- wrapAlignment = jalview.bin.Cache.getDefault("WRAP_ALIGNMENT", false);
- showUnconserved = jalview.bin.Cache.getDefault("SHOW_UNCONSERVED",
- false);
- sortByTree = jalview.bin.Cache.getDefault("SORT_BY_TREE", false);
- followSelection = jalview.bin.Cache.getDefault("FOLLOW_SELECTIONS",
- true);
- }
-
- /**
- * set the flag
- *
- * @param b
- * features are displayed if true
- */
- public void setShowSequenceFeatures(boolean b)
- {
- showSequenceFeatures = b;
- }
-
- public boolean getShowSequenceFeatures()
- {
- return showSequenceFeatures;
+ wrapAlignment = Cache.getDefault("WRAP_ALIGNMENT", false);
+ showUnconserved = Cache.getDefault("SHOW_UNCONSERVED", false);
+ sortByTree = Cache.getDefault("SORT_BY_TREE", false);
+ followSelection = Cache.getDefault("FOLLOW_SELECTIONS", true);
+ sortAnnotationsBy = SequenceAnnotationOrder.valueOf(Cache.getDefault(
+ Preferences.SORT_ANNOTATIONS,
+ SequenceAnnotationOrder.NONE.name()));
+ showAutocalculatedAbove = Cache.getDefault(
+ Preferences.SHOW_AUTOCALC_ABOVE, false);
}
/**
@@ -967,8 +951,10 @@ public class AlignViewport extends AlignmentViewport implements
{
// TODO: JAL-1126
if (historyList == null || redoList == null)
+ {
return new long[]
{ -1, -1 };
+ }
return new long[]
{ historyList.hashCode(), this.redoList.hashCode() };
}
@@ -1014,7 +1000,6 @@ public class AlignViewport extends AlignmentViewport implements
centreColumnLabels = centrecolumnlabels;
}
-
/**
* enable or disable the display of Database Cross References in the sequence
* ID tooltip
@@ -1097,8 +1082,6 @@ public class AlignViewport extends AlignmentViewport implements
return followSelection;
}
- boolean showSeqFeaturesHeight;
-
public void sendSelection()
{
jalview.structure.StructureSelectionManager
@@ -1107,16 +1090,6 @@ public class AlignViewport extends AlignmentViewport implements
new ColumnSelection(getColumnSelection()), this);
}
- public void setShowSequenceFeaturesHeight(boolean selected)
- {
- showSeqFeaturesHeight = selected;
- }
-
- public boolean getShowSequenceFeaturesHeight()
- {
- return showSeqFeaturesHeight;
- }
-
/**
* return the alignPanel containing the given viewport. Use this to get the
* components currently handling the given viewport.
@@ -1206,7 +1179,9 @@ public class AlignViewport extends AlignmentViewport implements
Vector pdbs = alignment.getSequenceAt(i).getDatasetSequence()
.getPDBId();
if (pdbs == null)
+ {
continue;
+ }
SequenceI sq;
for (int p = 0; p < pdbs.size(); p++)
{
@@ -1214,7 +1189,9 @@ public class AlignViewport extends AlignmentViewport implements
if (p1.getId().equals(pdb.getId()))
{
if (!seqs.contains(sq = alignment.getSequenceAt(i)))
+ {
seqs.add(sq);
+ }
continue;
}
@@ -1246,6 +1223,8 @@ public class AlignViewport extends AlignmentViewport implements
private Hashtable calcIdParams = new Hashtable();
+ private boolean showAutocalculatedAbove;
+
public AutoCalcSetting getCalcIdSettingsFor(String calcId)
{
return calcIdParams.get(calcId);
@@ -1263,4 +1242,24 @@ public class AlignViewport extends AlignmentViewport implements
Cache.log.debug("trigger update for " + calcId);
}
}
+
+ protected SequenceAnnotationOrder getSortAnnotationsBy()
+ {
+ return sortAnnotationsBy;
+ }
+
+ protected void setSortAnnotationsBy(SequenceAnnotationOrder sortAnnotationsBy)
+ {
+ this.sortAnnotationsBy = sortAnnotationsBy;
+ }
+
+ protected boolean isShowAutocalculatedAbove()
+ {
+ return showAutocalculatedAbove;
+ }
+
+ protected void setShowAutocalculatedAbove(boolean showAutocalculatedAbove)
+ {
+ this.showAutocalculatedAbove = showAutocalculatedAbove;
+ }
}