boolean gatherViewsHere = false;
+ Stack historyList = new Stack();
+ Stack redoList = new Stack();
+
+ Hashtable sequenceColours;
+
+ int thresholdTextColour = 0;
+ Color textColour = Color.black;
+ Color textColour2 = Color.white;
+
+
/**
* Creates a new AlignViewport object.
*
globalColourScheme.setConsensus(hconsensus);
}
}
+
+ wrapAlignment = jalview.bin.Cache.getDefault("WRAP_ALIGNMENT", false);
}
{
try
{
- while (updatingConservation)
+ updatingConservation = true;
+
+ while (UPDATING_CONSERVATION)
{
try
{
+ if (ap != null)
+ {
+ ap.repaint();
+ }
Thread.sleep(200);
}
catch (Exception ex)
}
}
- updatingConservation = true;
+ UPDATING_CONSERVATION = true;
int alWidth = alignment.getWidth();
}
+ UPDATING_CONSERVATION = false;
+ updatingConservation = false;
+
if(ap!=null)
{
ap.repaint();
}
- updatingConservation = false;
+
}
}
boolean consUpdateNeeded = false;
- static boolean updatingConsensus = false;
+ static boolean UPDATING_CONSENSUS = false;
+
+ static boolean UPDATING_CONSERVATION = false;
- static boolean updatingConservation = false;
+ boolean updatingConsensus = false;
+
+ boolean updatingConservation = false;
/**
* DOCUMENT ME!
}
public void run()
{
- while (updatingConsensus)
+ updatingConsensus = true;
+ while (UPDATING_CONSENSUS)
{
try
{
+ if (ap != null)
+ {
+ ap.repaint();
+ }
+
Thread.sleep(200);
}
catch (Exception ex)
}
}
- updatingConsensus = true;
+
+ UPDATING_CONSENSUS = true;
try
{
System.out.println("Consensus calculation: " + error);
System.gc();
}
+ UPDATING_CONSENSUS = false;
+ updatingConsensus = false;
if (ap != null)
{
ap.repaint();
}
-
-
- updatingConsensus = false;
}
}
/**
updateConservation(ap);
}
+ //Reset endRes of groups if beyond alignment width
+ int alWidth = alignment.getWidth();
+ Vector groups = alignment.getGroups();
+ if(groups!=null)
+ {
+ for(int i=0; i<groups.size(); i++)
+ {
+ SequenceGroup sg = (SequenceGroup)groups.elementAt(i);
+ if(sg.getEndRes()>alWidth)
+ sg.setEndRes(alWidth-1);
+ }
+ }
+
+ if(selectionGroup!=null && selectionGroup.getEndRes()>alWidth)
+ selectionGroup.setEndRes(alWidth-1);
+
resetAllColourSchemes();
alignment.adjustSequenceAnnotations();
-
}
}
+ 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);
+ }
+
}