package jalview.workers;
+import jalview.api.AlignViewportI;
+import jalview.api.AlignmentViewPanel;
+ import jalview.bin.Jalview;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.Annotation;
import jalview.gui.AlignFrame;
*/
public static void newCalculator(FeatureCounterI counter)
{
- if (Jalview.getCurrentAlignFrame() != null)
+ // TODO need an interface for AlignFrame by which to access
+ // its AlignViewportI and AlignmentViewPanel
- AlignFrame currentAlignFrame = Desktop.getCurrentAlignFrame();
++ AlignFrame currentAlignFrame = Jalview.getCurrentAlignFrame() ;
+ if (currentAlignFrame != null)
{
- newCalculator(Jalview.getCurrentAlignFrame(), counter);
+ newCalculator(currentAlignFrame.getViewport(), currentAlignFrame
+ .getAlignPanels().get(0), counter);
}
else
{
*/
public static void newCalculator(AnnotationProviderI calculator)
{
- if (Jalview.getCurrentAlignFrame() != null)
+ // TODO need an interface for AlignFrame by which to access
+ // its AlignViewportI and AlignmentViewPanel
- AlignFrame currentAlignFrame = Desktop.getCurrentAlignFrame();
++ AlignFrame currentAlignFrame = Jalview.getCurrentAlignFrame() ;
+ if (currentAlignFrame != null)
{
- newCalculator(Jalview.getCurrentAlignFrame(), calculator);
+ newCalculator(currentAlignFrame.getViewport(), currentAlignFrame
+ .getAlignPanels().get(0), calculator);
}
else
{