import java.awt.Canvas;
import java.awt.Component;
import java.awt.Container;
import java.awt.Frame;

public class za extends Class151_Sub2 implements Interface49 {

   long nativeid;
   int anInt10577;
   int anInt10578;
   Canvas aCanvas10579;
   ja aja10580;
   static boolean aBool10581 = false;
   static long aLong10582;


   boolean method2743() {
      return true;
   }

   public void finalize() {
      if(this.nativeid != 0L) {
         Class164.method2837(this, 1661357677);
      }

   }

   public native void ma(boolean var1);

   public int method2741() {
      return this.anInt10578;
   }

   native void n(ja var1, Canvas var2, int var3, int var4);

   native void H(int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8);

   native void wa(Canvas var1, int var2, int var3);

   public int method14944() {
      return this.method14945(0, 0);
   }

   public void method10() {
      if(this.aja10580.method11482((byte)14) == this) {
         this.method2748();
      }

      this.ma(true);
      this.nativeid = 0L;
      this.aCanvas10579 = null;
   }

   native void at(int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8);

   native void ah(int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8);

   public int method2742() {
      return this.anInt10577;
   }

   boolean method154() {
      this.aja10580.PA(this);
      return true;
   }

   za(ja var1, Canvas var2, int var3, int var4) {
      this.aja10580 = var1;
      this.aCanvas10579 = var2;
      this.anInt10578 = var3;
      this.anInt10577 = var4;
      this.n(var1, this.aCanvas10579, var3, var4);
   }

   public int method14945(int var1, int var2) {
      try {
         Object var3 = this.aCanvas10579.getTreeLock();
         synchronized(var3) {
            Object var4 = this.aCanvas10579;
            int var5 = 0;
            int var6 = 0;
            int var7 = 0;

            int var8;
            Container var9;
            for(var8 = this.aCanvas10579.getWidth(); var4 != null; var4 = var9) {
               var9 = ((Component)var4).getParent();
               if(var9 instanceof Frame) {
                  var7 = ((Frame)var9).getInsets().top;
               }

               if(var9 == null) {
                  break;
               }

               var5 += ((Component)var4).getX();
               var6 += ((Component)var4).getY();
               int var10 = ((Component)var4).getWidth();
               if(var10 < var8) {
                  var8 = var10;
               }
            }

            this.H(var1, var2, var5, var6, this.anInt10578, this.anInt10577, var8, var7);
            aBool10581 = false;
            return 0;
         }
      } catch (Exception var13) {
         this.method16332(var13);
         return -1;
      }
   }

   void method14947(int var1, int var2) {
      this.anInt10578 = var1;
      this.anInt10577 = var2;
      this.wa(this.aCanvas10579, var1, var2);
      if(this.aja10580.method11482((byte)14) == this) {
         this.method154();
      }

   }

   boolean method2748() {
      return true;
   }

   public int method2745() {
      return this.anInt10577;
   }

   public int method2746() {
      return this.anInt10577;
   }

   boolean method149() {
      this.aja10580.PA(this);
      return true;
   }

   void method16332(Exception var1) {
      if(!aBool10581) {
         aLong10582 = Class339.method6240(1339879652);
         aBool10581 = true;
      } else {
         if(Class339.method6240(1212750118) - aLong10582 >= 30000L) {
            throw new RuntimeException(var1.getMessage());
         }

         this.aCanvas10579.repaint();
      }

   }

   void method14946(int var1, int var2) {
      this.anInt10578 = var1;
      this.anInt10577 = var2;
      this.wa(this.aCanvas10579, var1, var2);
      if(this.aja10580.method11482((byte)14) == this) {
         this.method154();
      }

   }

   public int method14948() {
      return this.method14945(0, 0);
   }

   public int method2744() {
      return this.anInt10578;
   }

   public void method148() {
      if(this.aja10580.method11482((byte)14) == this) {
         this.method2748();
      }

      this.ma(true);
      this.nativeid = 0L;
      this.aCanvas10579 = null;
   }

   void method16333() {
      if(this.nativeid != 0L) {
         Class164.method2837(this, 2136014597);
      }

   }

   void method16334() {
      if(this.nativeid != 0L) {
         Class164.method2837(this, 1340235766);
      }

   }

   void method16335(Exception var1) {
      if(!aBool10581) {
         aLong10582 = Class339.method6240(-1001194050);
         aBool10581 = true;
      } else {
         if(Class339.method6240(231067526) - aLong10582 >= 30000L) {
            throw new RuntimeException(var1.getMessage());
         }

         this.aCanvas10579.repaint();
      }

   }

   void method16336() {
      if(this.nativeid != 0L) {
         Class164.method2837(this, 1731899580);
      }

   }

   public native void y(boolean var1);

   void method16337(Exception var1) {
      if(!aBool10581) {
         aLong10582 = Class339.method6240(-578915668);
         aBool10581 = true;
      } else {
         if(Class339.method6240(-1052062018) - aLong10582 >= 30000L) {
            throw new RuntimeException(var1.getMessage());
         }

         this.aCanvas10579.repaint();
      }

   }

   public int method2747() {
      return this.anInt10578;
   }

   native void s(ja var1, Canvas var2, int var3, int var4);

   native void e(ja var1, Canvas var2, int var3, int var4);

   native void ad(int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8);

   public void method150() {
      if(this.aja10580.method11482((byte)14) == this) {
         this.method2748();
      }

      this.ma(true);
      this.nativeid = 0L;
      this.aCanvas10579 = null;
   }

   public int method14949(int var1, int var2) {
      try {
         Object var3 = this.aCanvas10579.getTreeLock();
         synchronized(var3) {
            Object var4 = this.aCanvas10579;
            int var5 = 0;
            int var6 = 0;
            int var7 = 0;

            int var8;
            Container var9;
            for(var8 = this.aCanvas10579.getWidth(); var4 != null; var4 = var9) {
               var9 = ((Component)var4).getParent();
               if(var9 instanceof Frame) {
                  var7 = ((Frame)var9).getInsets().top;
               }

               if(var9 == null) {
                  break;
               }

               var5 += ((Component)var4).getX();
               var6 += ((Component)var4).getY();
               int var10 = ((Component)var4).getWidth();
               if(var10 < var8) {
                  var8 = var10;
               }
            }

            this.H(var1, var2, var5, var6, this.anInt10578, this.anInt10577, var8, var7);
            aBool10581 = false;
            return 0;
         }
      } catch (Exception var13) {
         this.method16332(var13);
         return -1;
      }
   }

   native void ag(Canvas var1, int var2, int var3);
}
