+ /**
+ * show the reference sequence in the alignment view
+ */
+ private boolean displayReferenceSeq=false;
+ /**
+ * colour according to the reference sequence defined on the alignment
+ */
+ private boolean colourByReferenceSeq=false;
+
+ @Override
+ public boolean isDisplayReferenceSeq()
+ {
+ return alignment.hasSeqrep() && displayReferenceSeq;
+ }
+
+ @Override
+ public void setDisplayReferenceSeq(boolean displayReferenceSeq)
+ {
+ this.displayReferenceSeq = displayReferenceSeq;
+ }
+
+ public boolean isColourByReferenceSeq()
+ {
+ return alignment.hasSeqrep() && colourByReferenceSeq;
+ }
+
+ public void setColourByReferenceSeq(boolean colourByReferenceSeq)
+ {
+ this.colourByReferenceSeq = colourByReferenceSeq;
+ }
+
+ @Override
+ public Color getSequenceColour(SequenceI seq)
+ {
+ Color sqc = Color.white;
+ if (sequenceColours != null)
+ {
+ sqc = (Color) sequenceColours.get(seq);
+ if (sqc == null)
+ {
+ sqc = Color.white;
+ }
+ }
+ return sqc;
+ }
+
+ @Override
+ public void setSequenceColour(SequenceI seq, Color col)
+ {
+ if (sequenceColours == null)
+ {
+ sequenceColours = new Hashtable();
+ }
+
+ if (col == null)
+ {
+ sequenceColours.remove(seq);
+ }
+ else
+ {
+ sequenceColours.put(seq, col);
+ }
+ }
+
+ @Override
+ 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);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void clearSequenceColours()
+ {
+ sequenceColours = null;
+ };
+
+ FeaturesDisplayedI featuresDisplayed = null;
+
+ @Override
+ public FeaturesDisplayedI getFeaturesDisplayed()
+ {
+ return featuresDisplayed;
+ }
+
+ @Override
+ public void setFeaturesDisplayed(FeaturesDisplayedI featuresDisplayedI)
+ {
+ featuresDisplayed = featuresDisplayedI;
+ }
+
+ @Override
+ public boolean areFeaturesDisplayed()
+ {
+ return featuresDisplayed != null && featuresDisplayed.getRegisterdFeaturesCount()>0;
+ }
+
+ /**
+ * display setting for showing/hiding sequence features on alignment view
+ */
+ boolean showSequenceFeatures = false;
+
+ /**
+ * set the flag
+ *
+ * @param b
+ * features are displayed if true
+ */
+ @Override
+ public void setShowSequenceFeatures(boolean b)
+ {
+ showSequenceFeatures = b;
+ }
+ @Override
+ public boolean isShowSequenceFeatures()
+ {
+ return showSequenceFeatures;
+ }
+
+ boolean showSeqFeaturesHeight;
+
+ @Override
+ public void setShowSequenceFeaturesHeight(boolean selected)
+ {
+ showSeqFeaturesHeight = selected;
+ }
+
+ @Override
+ public boolean isShowSequenceFeaturesHeight()
+ {
+ return showSeqFeaturesHeight;
+ }
+
+ private boolean showAnnotation = true;
+
+ private boolean rightAlignIds = false;
+
+
+ @Override
+ public void setShowAnnotation(boolean b)
+ {
+ showAnnotation = b;
+ }
+
+ @Override
+ public boolean isShowAnnotation()
+ {
+ return showAnnotation;
+ }
+
+ @Override
+ public boolean isRightAlignIds()
+ {
+ return rightAlignIds;
+ }
+
+ @Override
+ public void setRightAlignIds(boolean rightAlignIds)
+ {
+ this.rightAlignIds = rightAlignIds;
+ }