package Ġio . github . f jo ss inet . rn artist . model Ċ Ċ import Ġio . github . f jo ss inet . rn artist . Mediator Ċ import Ġio . github . f jo ss inet . rn artist . core . model . Secondary Structure Drawing Ċ import Ġio . github . f jo ss inet . rn artist . gui . J unction Kn ob Ċ import Ġio . github . f jo ss inet . rn artist . gui . Selection Shape Ċ import Ġjavafx . collections . FX Collections Ċ import Ġjavafx . collections . List ChangeListener Ċ import Ġjavafx . collections . Observable List Ċ import Ġorg . d iz it art . no 2 . N it rite Id Ċ import Ġjava . io . File Ċ Ċ interface ĠDraw ing Loaded Ġ{ ĊĊĠĠĠ Ġval Ġdrawing : ĠSecondary Structure Drawing ĊĊĠĠĠ Ġval Ġselection Shapes : ĠObservable List < Selection Shape > ĊĠĠĠ Ġval Ġkn obs Ġ: ĠMutable List < J unction Kn ob > ĊĠĠĠ Ġvar Ġtmp Ch imer a Session : ĠPair < File , ĠFile >? Ċ } Ċ Ċ abstract Ġclass ĠAbstract Drawing Loaded ( protected Ġval Ġmedi ator : ĠMed iator , Ġoverride Ġval Ġdrawing : ĠSecondary Structure Drawing ): Drawing Loaded Ġ{ ĊĊĠĠĠ Ġoverride Ġval Ġselection Shapes Ġ= ĠFX Collections . observable ArrayList < Selection Shape >() ĊĠĠĠ Ġoverride Ġval Ġkn obs Ġ= Ġmutable ListOf < J unction Kn ob >() ĊĠĠĠ Ġoverride Ġvar Ġtmp Ch imer a Session : ĠPair < File , ĠFile >? Ġ= Ġnull ĊĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ Ġthis . selection Shapes . addListener ( List ChangeListener Ġ{ Ġchange Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ(! this . selection Shapes . isEmpty () Ġ&& Ġmedi ator . ch imer a Driver . pdb File Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġmedi ator . rn artist . paint Selection in 3 D . is Disable Ġ= Ġfalse ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġmedi ator . rn artist . paint Selection in 3 D . is Disable Ġ= Ġtrue ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠ Ġ} Ċ Ċ } Ċ Ċ class ĠDraw ing Loaded FromFile ( Ġmedi ator : ĠMed iator , drawing : ĠSecondary Structure Drawing , Ġval Ġfile : ĠFile ): Abstract Drawing Loaded ( medi ator , Ġdrawing ) Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠtoString (): ĠString Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġ" RNA Ġ${ drawing . secondary Structure . r na . name } Ġ${ drawing . secondary Structure . r na . length } nt s Ġfrom Ġfile Ġ${ file . name }" ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠDraw ing Loaded From Script Editor ( medi ator : ĠMed iator , Ġdrawing : ĠSecondary Structure Drawing , Ġval Ġid : String ): Abstract Drawing Loaded ( medi ator , Ġdrawing ) Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠtoString (): ĠString Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġ" RNA Ġ${ drawing . secondary Structure . r na . name } Ġ${ drawing . secondary Structure . r na . length } nt s Ġloaded Ġfrom Ġscript Ġeditor " ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠDraw ing Loaded From RNA rt ist DB ( Ġmedi ator : ĠMed iator , drawing : ĠSecondary Structure Drawing , Ġval Ġid : ĠN it rite Id , Ġvar ĠprojectName : String ): Abstract Drawing Loaded ( medi ator , Ġdrawing ) Ġ{ ĊĊĠĠĠ Ġfun Ġget Ch imer a Session (): ĠFile ? Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġf Ġ= ĠFile ( File ( medi ator . embedded DB . rootDir , Ġ" ch imer a _ sessions "), Ġ"$ id . py ") ĊĠĠĠĠĠĠĠ Ġreturn Ġwhen ( f . exists ()) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtrue Ġ-> Ġf ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfalse Ġ-> Ġnull ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget P db File (): ĠFile ? Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġf Ġ= ĠFile ( File ( medi ator . embedded DB . rootDir , Ġ" ch imer a _ sessions "), Ġ"$ id . pdb ") ĊĠĠĠĠĠĠĠ Ġreturn Ġwhen ( f . exists ()) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtrue Ġ-> Ġf ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfalse Ġ-> Ġnull ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠtoString (): ĠString Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġ" RNA Ġ${ drawing . secondary Structure . r na . name } Ġ${ drawing . secondary Structure . r na . length } nt s Ġfrom Ġproject Ġ${ projectName }" ĊĠĠĠ Ġ} Ċ }