import jalview.datamodel.SequenceI;
import jalview.io.DataSourceType;
import jalview.io.FeaturesFile;
+import jalview.schemes.ColourSchemeI;
import jalview.util.MessageManager;
import java.awt.Color;
viewport.getAlignment().deleteAllGroups();
viewport.clearSequenceColours();
viewport.setSelectionGroup(null);
+ ColourSchemeI colours = viewport.getGlobalColourScheme();
// set view properties for each group
for (int g = 0; g < gps.length; g++)
{
// gps[g].setShowunconserved(viewport.getShowUnconserved());
gps[g].setshowSequenceLogo(viewport.isShowSequenceLogo());
viewport.getAlignment().addGroup(gps[g]);
- Color col = new Color((int) (Math.random() * 255),
- (int) (Math.random() * 255), (int) (Math.random() * 255));
- col = col.brighter();
- for (SequenceI sq : gps[g].getSequences(null))
+ if (colours != null)
{
- viewport.setSequenceColour(sq, col);
+ gps[g].setColourScheme(colours.getInstance(viewport, gps[g],
+ viewport.getHiddenRepSequences()));
}
+ Color col = new Color((int) (Math.random() * 255),
+ (int) (Math.random() * 255), (int) (Math.random() * 255));
+ gps[g].idColour = col;
+ viewport.setUpdateStructures(true);
+ viewport.addSequenceGroup(gps[g]);
}
return true;
}
{
PaintRefresher.Refresh(this, viewport.getSequenceSetId());
alignPanel.updateAnnotation();
- alignPanel.paintAlignment(true, true);
+ alignPanel.paintAlignment(true,
+ viewport.needToUpdateStructureViews());
}
}