X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fworkers%2FAlignmentAnnotationFactory.java;h=8b5240ca5fbf56edf9693a086cafedccb92b858a;hb=cd669a0e8c7b91b379bca8fe6e702cf0fcbd1ce0;hp=b0392d43dcba33e116a609df29fdd3c84f8f95d1;hpb=136c0793b90b72b928c4d77dc109dd5c644e00d3;p=jalview.git diff --git a/src/jalview/workers/AlignmentAnnotationFactory.java b/src/jalview/workers/AlignmentAnnotationFactory.java index b0392d4..8b5240c 100644 --- a/src/jalview/workers/AlignmentAnnotationFactory.java +++ b/src/jalview/workers/AlignmentAnnotationFactory.java @@ -20,6 +20,8 @@ */ package jalview.workers; +import java.awt.Color; + import jalview.api.AlignViewportI; import jalview.api.AlignmentViewPanel; import jalview.bin.Jalview; @@ -27,15 +29,15 @@ import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.Annotation; import jalview.gui.AlignFrame; -import java.awt.Color; - /** * Factory class with methods which allow clients (including external scripts - * such as Groovy) to 'register and forget' an alignment annotation calculator.
+ * such as Groovy) to 'register and forget' an alignment annotation calculator. + *
* Currently supports two flavours of calculator: * @@ -50,11 +52,12 @@ public class AlignmentAnnotationFactory */ public static void newCalculator(FeatureSetCounterI counter) { - AlignmentViewPanel currentAlignFrame = Jalview.getCurrentAlignFrame().alignPanel; + AlignmentViewPanel currentAlignFrame = Jalview.getInstance() + .getCurrentAlignFrame().alignPanel; if (currentAlignFrame == null) { - System.err - .println("Can't register calculator as no alignment window has focus"); + jalview.bin.Console.errPrintln( + "Can't register calculator as no alignment window has focus"); return; } new ColumnCounterSetWorker(currentAlignFrame.getAlignViewport(), @@ -71,7 +74,8 @@ public class AlignmentAnnotationFactory { // TODO need an interface for AlignFrame by which to access // its AlignViewportI and AlignmentViewPanel - AlignFrame currentAlignFrame = Jalview.getCurrentAlignFrame(); + AlignFrame currentAlignFrame = Jalview.getInstance() + .getCurrentAlignFrame(); if (currentAlignFrame != null) { new AnnotationWorker(currentAlignFrame.getViewport(), @@ -79,8 +83,8 @@ public class AlignmentAnnotationFactory } else { - System.err - .println("Can't register calculator as no alignment window has focus"); + jalview.bin.Console.errPrintln( + "Can't register calculator as no alignment window has focus"); } } @@ -111,7 +115,8 @@ public class AlignmentAnnotationFactory public static Annotation newAnnotation(String displayChar, String desc, char secondaryStructure, float val, Color color) { - return new Annotation(displayChar, desc, secondaryStructure, val, color); + return new Annotation(displayChar, desc, secondaryStructure, val, + color); } /**