private int startRes = 0;
/**
- * end column (base 0)
+ * end column (base 0)
*/
private int endRes = 0;
displayBoxes = seqsel.displayBoxes;
displayText = seqsel.displayText;
colourText = seqsel.colourText;
-
+
startRes = seqsel.startRes;
endRes = seqsel.endRes;
cs = new ResidueShader((ResidueShader) seqsel.cs);
for (int i = 0, ipos = 0; i < inorder.length; i++)
{
SequenceI seq = inorder[i];
-
- seqs[ipos] = seq.getSubSequence(startRes, endRes + 1);
- if (seqs[ipos] != null)
+ SequenceI seqipos = seqs[ipos] = seq.getSubSequence(startRes,
+ endRes + 1);
+ if (seqipos != null)
{
- seqs[ipos].setDescription(seq.getDescription());
- seqs[ipos].setDBRefs(seq.getDBRefs());
- seqs[ipos].setSequenceFeatures(seq.getSequenceFeatures());
+ seqipos.setDescription(seq.getDescription());
+ seqipos.setDBRefs(seq.getDBRefs());
+ seqipos.setSequenceFeatures(seq.getSequenceFeatures());
if (seq.getDatasetSequence() != null)
{
- seqs[ipos].setDatasetSequence(seq.getDatasetSequence());
+ seqipos.setDatasetSequence(seq.getDatasetSequence());
}
if (seq.getAnnotation() != null)
if (alann != null)
{
boolean found = false;
- for (int pos = 0; pos < alann.length; pos++)
+ for (int pos = 0, np = alann.length; pos < np; pos++)
{
if (alann[pos] == tocopy)
{
newannot.restrict(startRes, endRes);
newannot.setSequenceRef(seqs[ipos]);
newannot.adjustForAlignment();
- seqs[ipos].addAlignmentAnnotation(newannot);
+ seqipos.addAlignmentAnnotation(newannot);
}
}
ipos++;
public void setStartRes(int newStart)
{
int before = startRes;
- startRes= Math.max(0,newStart); // sanity check for negative start column positions
- changeSupport.firePropertyChange(SEQ_GROUP_CHANGED, before, startRes);
-
-
+ startRes = Math.max(0, newStart); // sanity check for negative start column
+ // positions
+ changeSupport.firePropertyChange(SEQ_GROUP_CHANGED, before, startRes);
}