{
if (ap != null)
{
- ap.paintAlignment(true);
+ ap.paintAlignment(false);
}
Thread.sleep(200);
}
{
if (ap != null)
{
- ap.paintAlignment(true);
+ ap.paintAlignment(false);
}
Thread.sleep(200);
}
FeatureRenderer fr;
+ String lastCommand;
public void colourBySequence(AlignmentPanel ap)
{
if(!colourBySequence)
if (mapping.length < 1)
return;
- SequenceRenderer sr = ap.seqPanel.seqCanvas.getSequenceRenderer();
+ SequenceRenderer sr = new SequenceRenderer(ap.av);
boolean showFeatures = false;
if (ap.av.showSequenceFeatures)
}
}
- viewer.evalStringQuiet(command.toString());
+ if (lastCommand != null && !lastCommand.equals(command.toString()))
+ viewer.evalStringQuiet(command.toString());
+
+ lastCommand = command.toString();
}
StringBuffer condenseCommand(String command, int pos)
{
if (ap != null)
{
- ap.paintAlignment(true);
+ ap.paintAlignment(false);
}
Thread.sleep(200);
}
{
if (ap != null)
{
- ap.paintAlignment(true);
+ ap.paintAlignment(false);
}
Thread.sleep(200);
}
/**
- * This method returns an array of new SequenceI objects
+ * This method returns an array of new SequenceI objects
* derived from the whole alignment or just the current
* selection with start and end points adjusted
* @note if you need references to the actual SequenceI objects in the alignment or currently selected then use getSequenceSelection()
if (selectionGroup == null)
{
sequences = alignment.getSequencesArray();
- AlignmentAnnotation[] annots = alignment.getAlignmentAnnotation();
+ AlignmentAnnotation[] annots = alignment.getAlignmentAnnotation();
for (int i=0; i<sequences.length; i++)
{
sequences[i] = new Sequence(sequences[i], annots); // construct new sequence with subset of visible annotation
public void seqColour_actionPerformed(ActionEvent actionEvent)
{
colourBySequence = seqColour.isSelected();
- colourBySequence(ap);
+ colourBySequence(ap.alignFrame.alignPanel);
}
public void chainColour_actionPerformed(ActionEvent actionEvent)
//End StructureListener
////////////////////////////
+ String lastCommand;
FeatureRenderer fr=null;
public void colourBySequence(AlignmentPanel ap)
{
+
+ if(ap.alignFrame.getCurrentView()!=ap.av)
+ {
+ System.out.println("RETURN");
+ return;
+ }
+
if(!colourBySequence)
return;
if (mapping.length < 1)
return;
- SequenceRenderer sr = ap.seqPanel.seqCanvas.getSequenceRenderer();
+ SequenceRenderer sr = new SequenceRenderer(ap.av);
boolean showFeatures = false;
}
}
- viewer.evalStringQuiet(command.toString());
+ if (lastCommand != null && !lastCommand.equals(command.toString()))
+ {
+ viewer.evalStringQuiet(command.toString());
+ }
+ lastCommand = command.toString();
}
StringBuffer condenseCommand(StringBuffer command, int pos)
running = false;\r
}\r
\r
- alignPanel.paintAlignment(true);\r
+ alignPanel.paintAlignment(false);\r
\r
try\r
{\r