-
- if (currentColours.isSelected())
- {
- sg.cs = new AnnotationColourGradient(currentAnnotation, sg.cs,
- aboveThreshold);
- }
- else
- {
- sg.cs = new AnnotationColourGradient(currentAnnotation,
- minColour.getBackground(), maxColour.getBackground(),
- aboveThreshold);
- }
-
- }
- }
- // ensure all associated views (overviews, structures, etc) are notified of updated colours.
- ap.paintAlignment(true);
- }
-
- public void ok_actionPerformed(ActionEvent e)
- {
- changeColour();
- try
- {
- frame.setClosed(true);
- } catch (Exception ex)
- {
- }
- }
-
- public void cancel_actionPerformed(ActionEvent e)
- {
- reset();
- try
- {
- frame.setClosed(true);
- } catch (Exception ex)
- {
- }
- }
-
- void reset()
- {
- av.setGlobalColourScheme(oldcs);
- if (av.alignment.getGroups() != null)
- {
- Vector allGroups = ap.av.alignment.getGroups();
- SequenceGroup sg;
- for (int g = 0; g < allGroups.size(); g++)
- {
- sg = (SequenceGroup) allGroups.get(g);
- sg.cs = (ColourSchemeI) oldgroupColours.get(sg);