git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1152 with sticky annotation sort order that updates as sequences are
[jalview.git]
/
src
/
jalview
/
gui
/
AlignViewport.java
diff --git
a/src/jalview/gui/AlignViewport.java
b/src/jalview/gui/AlignViewport.java
index
6d6531f
..
6969513
100644
(file)
--- a/
src/jalview/gui/AlignViewport.java
+++ b/
src/jalview/gui/AlignViewport.java
@@
-38,6
+38,7
@@
*/
package jalview.gui;
*/
package jalview.gui;
+import jalview.analysis.AnnotationSorter.SortOrder;
import jalview.analysis.NJTree;
import jalview.api.AlignViewportI;
import jalview.bin.Cache;
import jalview.analysis.NJTree;
import jalview.api.AlignViewportI;
import jalview.bin.Cache;
@@
-99,6
+100,8
@@
public class AlignViewport extends AlignmentViewport implements
boolean showAnnotation = true;
boolean showAnnotation = true;
+ SortOrder sortAnnotationsBy = null;
+
int charHeight;
int charWidth;
int charHeight;
int charWidth;
@@
-358,12
+361,14
@@
public class AlignViewport extends AlignmentViewport implements
}
}
}
}
- wrapAlignment = jalview.bin.Cache.getDefault("WRAP_ALIGNMENT", false);
- showUnconserved = jalview.bin.Cache.getDefault("SHOW_UNCONSERVED",
+ wrapAlignment = Cache.getDefault("WRAP_ALIGNMENT", false);
+ showUnconserved = Cache.getDefault("SHOW_UNCONSERVED",
false);
false);
- sortByTree = jalview.bin.Cache.getDefault("SORT_BY_TREE", false);
- followSelection = jalview.bin.Cache.getDefault("FOLLOW_SELECTIONS",
+ sortByTree = Cache.getDefault("SORT_BY_TREE", false);
+ followSelection = Cache.getDefault("FOLLOW_SELECTIONS",
true);
true);
+ sortAnnotationsBy = SortOrder.valueOf(Cache.getDefault(
+ "SORT_ANNOTATIONS", SortOrder.SEQUENCE_AND_TYPE.name()));
}
/**
}
/**
@@
-969,8
+974,10
@@
public class AlignViewport extends AlignmentViewport implements
{
// TODO: JAL-1126
if (historyList == null || redoList == null)
{
// TODO: JAL-1126
if (historyList == null || redoList == null)
+ {
return new long[]
{ -1, -1 };
return new long[]
{ -1, -1 };
+ }
return new long[]
{ historyList.hashCode(), this.redoList.hashCode() };
}
return new long[]
{ historyList.hashCode(), this.redoList.hashCode() };
}
@@
-1207,7
+1214,9
@@
public class AlignViewport extends AlignmentViewport implements
Vector pdbs = alignment.getSequenceAt(i).getDatasetSequence()
.getPDBId();
if (pdbs == null)
Vector pdbs = alignment.getSequenceAt(i).getDatasetSequence()
.getPDBId();
if (pdbs == null)
+ {
continue;
continue;
+ }
SequenceI sq;
for (int p = 0; p < pdbs.size(); p++)
{
SequenceI sq;
for (int p = 0; p < pdbs.size(); p++)
{
@@
-1215,7
+1224,9
@@
public class AlignViewport extends AlignmentViewport implements
if (p1.getId().equals(pdb.getId()))
{
if (!seqs.contains(sq = alignment.getSequenceAt(i)))
if (p1.getId().equals(pdb.getId()))
{
if (!seqs.contains(sq = alignment.getSequenceAt(i)))
+ {
seqs.add(sq);
seqs.add(sq);
+ }
continue;
}
continue;
}
@@
-1264,4
+1275,14
@@
public class AlignViewport extends AlignmentViewport implements
Cache.log.debug("trigger update for " + calcId);
}
}
Cache.log.debug("trigger update for " + calcId);
}
}
+
+ protected SortOrder getSortAnnotationsBy()
+ {
+ return sortAnnotationsBy;
+ }
+
+ protected void setSortAnnotationsBy(SortOrder sortAnnotationsBy)
+ {
+ this.sortAnnotationsBy = sortAnnotationsBy;
+ }
}
}