}
else
{
- cs = ColourSchemeProperty.getColourScheme(al,
- // TODO: notify of view reference when available
+ cs = ColourSchemeProperty.getColourScheme(null, al,
jGroup.getColour());
}
}
}
else
{
- cs = ColourSchemeProperty.getColourScheme(al, view.getBgColour());
- cs = ColourSchemeProperty.getColourScheme(af.viewport, al,
++ cs = ColourSchemeProperty.getColourScheme(af.getViewport(), al,
+ view.getBgColour());
}
}
else
{
cs = new AnnotationColourGradient(matchedAnnotation,
- ColourSchemeProperty.getColourScheme(al,
- ColourSchemeProperty.getColourScheme(af.viewport, al,
++ ColourSchemeProperty.getColourScheme(af.getViewport(), al,
viewAnnColour.getColourScheme()),
- viewAnnColour.getAboveThreshold());
+ safeInt(viewAnnColour.getAboveThreshold()));
}
- boolean perSequenceOnly = viewAnnColour.isPerSequence();
- boolean useOriginalColours = viewAnnColour.isPredefinedColours();
+ boolean perSequenceOnly = safeBoolean(viewAnnColour.isPerSequence());
+ boolean useOriginalColours = safeBoolean(
+ viewAnnColour.isPredefinedColours());
cs.setSeqAssociated(perSequenceOnly);
cs.setPredefinedColours(useOriginalColours);
DataSourceType.FILE);
assertNotNull(af, "Didn't read input file " + inFile);
af.loadJalviewDataFile(inAnnot, DataSourceType.FILE, null, null);
-- assertSame(af.getViewport().getGlobalColourScheme().getClass(),
++ AlignViewport viewport = af.getViewport();
++ assertSame(viewport.getGlobalColourScheme().getClass(),
TCoffeeColourScheme.class, "Didn't set T-coffee colourscheme");
assertNotNull(
- ColourSchemeProperty.getColourScheme(
- af.getViewport().getAlignment(),
- af.getViewport().getGlobalColourScheme()
- ColourSchemeProperty.getColourScheme(af.getViewport(),
- af.getViewport()
- .getAlignment(), af.getViewport().getGlobalColourScheme()
- .getSchemeName()), "Recognise T-Coffee score from string");
++ ColourSchemeProperty.getColourScheme(viewport,
++ viewport.getAlignment(),
++ viewport.getGlobalColourScheme()
+ .getSchemeName()),
+ "Recognise T-Coffee score from string");
assertTrue(af.saveAlignment(tfile, FileFormat.Jalview),
"Failed to store as a project.");
af.closeMenuItem_actionPerformed(true);
af = null;
- af = new FileLoader()
- .LoadFileWaitTillLoaded(tfile, DataSourceType.FILE);
+ af = new FileLoader().LoadFileWaitTillLoaded(tfile,
+ DataSourceType.FILE);
assertNotNull(af, "Failed to import new project");
-- assertSame(af.getViewport().getGlobalColourScheme().getClass(),
++ assertSame(viewport.getGlobalColourScheme().getClass(),
TCoffeeColourScheme.class,
"Didn't set T-coffee colourscheme for imported project.");
- System.out
- .println("T-Coffee score shading successfully recovered from project.");
+ System.out.println(
+ "T-Coffee score shading successfully recovered from project.");
}
@Test(groups = { "Functional" })