/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  javax.microedition.lcdui.Font
 *  javax.microedition.lcdui.Graphics
 *  javax.microedition.lcdui.Image
 */
import java.io.DataInput;
import java.io.DataOutput;
import java.io.OutputStream;
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;

/*
 * Duplicate member names - consider using --renamedupmembers true
 */
public class ht
implements ob,
w,
jf,
v,
Runnable {
    private final iu a;
    private final boolean a;
    private final eb a;
    private final Font a;
    private final String c;
    private final hj f;
    public final Graphics a;
    private int a;
    private int b;
    private w b;
    private boolean c;
    private nh c;
    private bq d;
    private v e;
    public lc a;
    public gm a;

    public boolean z_() {
        return false;
    }

    public boolean A_() {
        return false;
    }

    public boolean y_() {
        return true;
    }

    public int g() {
        return this.a.getClipX();
    }

    public int f() {
        return this.a.getClipY();
    }

    public int e() {
        return this.a.getColor();
    }

    public int d() {
        return this.a.getClipHeight();
    }

    public int h() {
        return this.a.getClipWidth();
    }

    public int c() {
        return this.a.getBaselinePosition();
    }

    public int l() {
        return this.a.getHeight();
    }

    public int t() {
        return this.b;
    }

    public static hj a(ht ht2) {
        return ht2.f;
    }

    public w f() {
        return this.b;
    }

    public static iu b(ht ht2) {
        return ht2.a;
    }

    public void a() {
        if (iu.a()) {
            iu.a(this.a);
        }
    }

    public void run() {
        if (!this.c) {
            this.a.a(new iu(this));
            return;
        }
        iu.a(this.a);
    }

    public void a(DataOutput dataOutput) {
        lk lk2 = new lk(la.P);
        lk2.h(1, this.b);
        if (this.a) {
            lk2.a(2, this.c);
            lk2.h(3, this.a);
        }
        lk lk3 = new lk(la.V);
        lk3.b(1, lk2);
        dataOutput.writeInt(lk3.b());
        lk3.a((OutputStream)((Object)dataOutput));
    }

    public lk a() {
        lk lk2 = new lk(la.J);
        lk2.h(1, this.a);
        int n = this.b == 0 ? (!this.c.a ? 0 : 1) : (this.b == 1 ? this.d.b() : -1);
        lk2.h(2, n);
        return lk2;
    }

    public w a(int n, boolean bl2, boolean bl3, int n2, boolean bl4) {
        bl2 = bl2;
        if (bl3) {
            bl2 |= 4;
        }
        if (n != 1) {
            if (n != 2) {
                if (n == 3) {
                    n = 16;
                }
            } else {
                n = 0;
            }
        } else {
            n = 8;
        }
        Font font = Font.getFont((int)0, (int)(bl2 ? 1 : 0), (int)n);
        w w2 = bl4 ? new ht(font, n2) : new ht(font, false);
        if (this.a != null) {
            w2 = new oz(w2, this.a);
        }
        return px.a(w2);
    }

    public boolean a(DataInput dataInput) {
        lk lk2 = ar.a(la.W, dataInput);
        int n = ar.b(lk2, 1, -1);
        int n2 = ar.b(lk2.f(2), 1, -1);
        switch (n) {
            case 0: {
                if (this.e == null) break;
                this.e.a();
                return true;
            }
            default: {
                ka.a(n2, this.f);
            }
        }
        return true;
    }

    private void a(Graphics graphics) {
        if (this.c) {
            graphics.setColor(this.b);
        }
        graphics.setFont(this.a);
    }

    public void a(le le2, int n, int n2) {
        Image image = le2.a;
        if (image != null) {
            this.a.drawImage(image, n, n2, 20);
        }
    }

    public void b(int n, int n2, int n3, int n4) {
        int n5 = this.g();
        int n6 = this.f();
        int n7 = n5 + this.h();
        int n8 = n6 + this.d();
        n5 = Math.max(n5, n);
        n6 = Math.max(n6, n2);
        n = Math.min(n7, n + n3) - n5;
        n2 = Math.min(n8, n2 + n4) - n6;
        this.a.clipRect(n5, n6, Math.max(n, 0), Math.max(n2, 0));
    }

    public void b(int n, int n2, int n3, int n4, int n5, int n6) {
        this.a.drawRoundRect(n, n2, n3, n4, n5, n6);
    }

    public void e(int n, int n2, int n3, int n4, int n5, int n6) {
        this.a.fillTriangle(n, n2, n3, n4, n5, n6);
    }

    public void d(int n, int n2, int n3, int n4, int n5, int n6) {
        this.a.fillArc(n, n2, n3, n4, n5, n6);
    }

    public void a(int n, int n2, int n3, int n4, int n5, int n6) {
        this.a.fillRoundRect(n, n2, n3, n4, n5, n6);
    }

    public void c(int n, int n2, int n3, int n4, int n5, int n6) {
        this.a.drawArc(n, n2, n3, n4, n5, n6);
    }

    public void f(int n, int n2, int n3, int n4, int n5, int n6) {
        this.a.drawLine(n, n2, n3, n4);
        this.a.drawLine(n, n2, n5, n6);
        this.a.drawLine(n5, n6, n3, n4);
    }

    public void e(int n, int n2, int n3, int n4) {
        this.a.drawLine(n, n2, n3, n4);
    }

    public void a(int n, int n2, int n3, int n4) {
        this.a.setClip(n, n2, n3, n4);
    }

    public void c(int n, int n2, int n3, int n4) {
        this.a.fillRect(n, n2, n3, n4);
    }

    public void d(int n, int n2, int n3, int n4) {
        this.a.drawRect(n, n2, n3, n4);
    }

    public ht(eb eb2, hj hj2, iu iu2, boolean bl2) {
        this.a = eb2;
        this.f = hj2;
        this.a = iu2;
        this.c = bl2;
    }

    public ht(boolean bl2, int n, int n2, hj hj2, v v2) {
        this.c = bl2;
        this.a = n;
        this.b = n2;
        this.f = hj2;
        this.e = v2;
        this.a = true;
    }

    public ht(int n, hj hj2, v v2) {
        this.b = n;
        this.f = hj2;
        this.e = v2;
    }

    public ht(Font font, int n) {
        this.c = true;
        this.a = font;
        this.b = n;
    }

    public ht(Font font, boolean bl2) {
        this.c = true;
        this.a = font;
        this.c = bl2;
    }

    public ht(Font font) {
        this.c = true;
        this.a = font;
    }

    private ht(int n, int n2) {
        this.a = n;
        this.b = n2;
    }

    public ht(iu iu2) {
        this.a = iu2;
    }

    public ht(gm gm2) {
        this.a = gm2;
    }

    public ht(Graphics graphics) {
        this.a = graphics;
        this.b = px.a(new ht(graphics.getFont()));
    }

    public static ht a(int n, nh nh2) {
        new ht(n, 0).c = nh2;
        return new ht(n, 0);
    }

    public static ht a(int n, bq bq2) {
        new ht(n, 1).d = bq2;
        return new ht(n, 1);
    }

    public void a(w w2) {
        this.b = w2;
    }

    public void i(int n) {
        this.b = n;
    }

    public void a(int n) {
        this.a.setColor(n);
    }

    public int d(char c) {
        return this.a.charWidth(c);
    }

    public int a(String string) {
        return this.a.stringWidth(string);
    }

    public int a(String string, int n, int n2) {
        return this.a.substringWidth(string, n, n2);
    }

    public void a(ht ht2, int n, int n2) {
        ht2.b = this.b;
        ht2.a(this.c, n, n2);
    }

    public void a(String string, int n, int n2) {
        this.b.a(this, string, n, n2);
    }

    public void a(String string, int n, int n2, int n3, int n4) {
        this.b.a(this, string, n, n2, n3, n4);
    }

    public void a(ht ht2, String string, int n, int n2, int n3, int n4) {
        Graphics graphics = ht.a(ht2);
        this.a(graphics);
        graphics.drawSubstring(string, n, n2, n3, n4, 20);
    }

    public void a(ht ht2, String string, int n, int n2) {
        Graphics graphics = ht.a(ht2);
        this.a(graphics);
        graphics.drawString(string, n, n2, 20);
    }

    public boolean a(le le2, int n, int n2, int n3, int n4, int n5, int n6, int n7, int n8) {
        return fo.a(le2, this, n, n2, n3, n4, n5, n6, n7, n8);
    }

    public int z() {
        return 51;
    }

    public int a() {
        return this.b.a(this.c);
    }

    public ht() {
        this(false);
    }

    public ht(boolean bl2) {
    }

    public ht(gm gm2, String string, w w2) {
        this(gm2);
        this.c = string;
        this.b = w2;
    }

    public boolean b(int n) {
        this.a(n);
        return false;
    }

    public void a(int n, int n2) {
        this.a.translate(n, n2);
    }

    private static Graphics a(ht ht2) {
        return ht2.a;
    }
}

