X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=examples%2Fgroovy%2FcolourSchemes.groovy;h=eb40cc627dd9cb8b29277127b3ef47382a38dcee;hb=HEAD;hp=d5ca97377599c76d0eaacec61b80bfad85b1b2b6;hpb=244520d01226040ec02eb8560bf0b181932797cf;p=jalview.git diff --git a/examples/groovy/colourSchemes.groovy b/examples/groovy/colourSchemes.groovy index d5ca973..eb40cc6 100644 --- a/examples/groovy/colourSchemes.groovy +++ b/examples/groovy/colourSchemes.groovy @@ -4,6 +4,7 @@ import jalview.schemes.ColourSchemes; import jalview.datamodel.AnnotatedCollectionI; import jalview.datamodel.SequenceI; import jalview.datamodel.SequenceCollectionI; +import jalview.api.AlignViewportI /* * Example script that registers two new alignment colour schemes @@ -25,7 +26,7 @@ candy = { -> /* * to make a new instance for each alignment view */ - getInstance: { AnnotatedCollectionI coll, Map map -> candy() }, + getInstance: { view, coll -> candy() }, /* * method only needed if colour scheme has to recalculate @@ -85,7 +86,7 @@ byWeight = { -> // this colour scheme is peptide-specific: isApplicableTo: { coll -> !coll.isNucleotide() }, alignmentChanged: { coll, map -> }, - getInstance: { coll, map -> byWeight() }, + getInstance: { view, coll -> byWeight() }, isSimple: { true }, findColour: {res, col, seq, consensus, pid -> switch (res) {