X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fapi%2FAlignCalcWorkerI.java;h=85157c466c31e11b66eeea25b8aced2bccb066c8;hb=e1dbbc5edc07f65706eeb1dda9f4c9bcdee9d3a5;hp=87a1ee86e794f855b2d55f0e1df864c487f76123;hpb=ab43013b7e357b84b4abade0dba949668dfb2a0e;p=jalview.git diff --git a/src/jalview/api/AlignCalcWorkerI.java b/src/jalview/api/AlignCalcWorkerI.java index 87a1ee8..85157c4 100644 --- a/src/jalview/api/AlignCalcWorkerI.java +++ b/src/jalview/api/AlignCalcWorkerI.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -22,12 +22,39 @@ package jalview.api; import jalview.datamodel.AlignmentAnnotation; +/** + * Interface describing a worker that calculates alignment annotation(s). The + * main (re-)calculation should be performed by the inherited run() method. + */ public interface AlignCalcWorkerI extends Runnable { + /** + * Answers true if this worker updates the given annotation (regardless of its + * current state) + * + * @param annot + * @return + */ + boolean involves(AlignmentAnnotation annot); - public boolean involves(AlignmentAnnotation annot); + /** + * Updates the display of calculated annotation values (does not recalculate + * the values). This allows ßquick redraw of annotations when display settings + * are changed. + */ + void updateAnnotation(); - public void updateAnnotation(); + /** + * Removes any annotation(s) managed by this worker from the alignment + */ + void removeAnnotation(); - void removeOurAnnotation(); + /** + * Answers true if the worker should be deleted entirely when its annotation + * is deleted from the display, or false if it should continue to run. Some + * workers are required to run for their side-effects. + * + * @return + */ + boolean isDeletable(); }