/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
- * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
+ * 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 <http://www.gnu.org/licenses/>.
+ * 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.
*/
/*
* Jalview - A Sequence Alignment Editor and Viewer
*/
package jalview.gui;
+import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
import jalview.analysis.NJTree;
import jalview.api.AlignViewportI;
import jalview.bin.Cache;
boolean showAnnotation = true;
+ SequenceAnnotationOrder sortAnnotationsBy = null;
+
int charHeight;
int charWidth;
Stack redoList = new Stack();
- Hashtable sequenceColours;
-
int thresholdTextColour = 0;
Color textColour = Color.black;
}
}
- 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);
+ 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(
+ "SORT_ANNOTATIONS", SequenceAnnotationOrder.SEQUENCE_AND_LABEL.name()));
+ showAutocalculatedAbove = Cache
+ .getDefault("SHOW_AUTOCALC_ABOVE", false);
}
/**
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);
- }
- }
-
/**
* returns the visible column regions of the alignment
*
{
// TODO: JAL-1126
if (historyList == null || redoList == null)
+ {
return new long[]
{ -1, -1 };
+ }
return new long[]
{ historyList.hashCode(), this.redoList.hashCode() };
}
centreColumnLabels = centrecolumnlabels;
}
- public void updateSequenceIdColours()
- {
- if (sequenceColours == null)
- {
- sequenceColours = new Hashtable();
- }
- for (SequenceGroup sg : alignment.getGroups())
- {
- if (sg.idColour != null)
- {
- for (SequenceI s : sg.getSequences(getHiddenRepSequences()))
- {
- sequenceColours.put(s, sg.idColour);
- }
- }
- }
- }
-
/**
* enable or disable the display of Database Cross References in the sequence
* ID tooltip
Vector pdbs = alignment.getSequenceAt(i).getDatasetSequence()
.getPDBId();
if (pdbs == null)
+ {
continue;
+ }
SequenceI sq;
for (int p = 0; p < pdbs.size(); p++)
{
if (p1.getId().equals(pdb.getId()))
{
if (!seqs.contains(sq = alignment.getSequenceAt(i)))
+ {
seqs.add(sq);
+ }
continue;
}
private Hashtable<String, AutoCalcSetting> calcIdParams = new Hashtable<String, AutoCalcSetting>();
+ private boolean showAutocalculatedAbove;
+
public AutoCalcSetting getCalcIdSettingsFor(String calcId)
{
return calcIdParams.get(calcId);
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;
+ }
}