package org.helioviewer.jhv.display;

public class Viewport {

    public final double aspect;
    public final int width;
    public final int height;
    public final int x;
    public final int y;
    public final int idx;

    private final int yAwt;

    public Viewport(int _idx, int _x, int _y, int _w, int _h) {
        idx = _idx;
        width = _w;
        height = _h;
        aspect = _w / (double) _h;
        x = _x;
        y = Displayer.getGLHeight() - height - _y;
        yAwt = _y;
    }

    public boolean contains(int px, int py) {
        if (px >= x && px < x + width && py >= yAwt && py < yAwt + height) {
            return true;
        }
        return false;
    }

    @Override
    public String toString() {
        return "Offset: " + x + "," + y + " Size: " + width + "," + height;
    }

}

@@ -229,14 +229,13 @@
    p
-rivate
+ublic
  fin
@@ -247,11 +247,28 @@
 t yA
-wt;
+WT; // AWT direction
 %0A%0A  
@@ -502,18 +502,18 @@
       yA
-wt
+WT
  = _y;%0A 
@@ -613,18 +613,18 @@
 py %3E= yA
-wt
+WT
  && py %3C
@@ -630,10 +630,10 @@
 %3C yA
-wt
+WT
  + h

Make yAWT public