package jalview.appletgui;
import java.util.*;
+import java.util.List;
import java.awt.*;
import java.awt.event.*;
conservationSlider.setTitle("Conservation Colour Increment (" + source
+ ")");
- if (ap.av.alignment.getGroups() != null)
+ if (ap.av.getAlignment().getGroups() != null)
{
sp.setAllGroupsCheckEnabled(true);
}
}
PIDSlider.setTitle("Percentage Identity Threshold (" + source + ")");
- if (ap.av.alignment.getGroups() != null)
+ if (ap.av.getAlignment().getGroups() != null)
{
pid.setAllGroupsCheckEnabled(true);
}
}
ColourSchemeI toChange = null;
- Vector allGroups = null;
- int groupIndex = 0;
+ Iterator<SequenceGroup> allGroups = null;
if (allGroupsCheck.getState())
{
- allGroups = ap.av.alignment.getGroups();
- groupIndex = allGroups.size() - 1;
+ allGroups = ap.av.getAlignment().getGroups().listIterator();
}
else
{
toChange = cs;
}
- while (groupIndex > -1)
+ do
{
if (allGroups != null)
{
- toChange = ((SequenceGroup) allGroups.elementAt(groupIndex)).cs;
+ toChange = allGroups.next().cs;
}
if (forConservation)
toChange.setThreshold(i, ap.av.getIgnoreGapsConsensus());
}
- groupIndex--;
- }
+ } while (allGroups != null && allGroups.hasNext());
ap.seqPanel.seqCanvas.repaint();