⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 l.java

📁 webviwer,一个基于j2me的浏览器
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
    public void b()
    {
        if(I != 0)
        {
            I = 0;
            O = true;
            repaint(0, 0, aa, B);
        }
    }

    public void a()
    {
        I = w - k;
        O = true;
        repaint(0, 0, aa, B);
    }

    public void f(int i1)
    {
        if(I + i1 <= 0)
        {
            if(I != 0)
            {
                I = 0;
                repaint(0, 0, aa, B);
            }
        } else
        if(I + i1 >= w)
        {
            if(I != w)
            {
                I = w;
                repaint(0, 0, aa, B);
            }
        } else
        if(i1 != 0)
        {
            I += i1;
            repaint(0, 0, aa, B);
        }
    }

    public void a(boolean flag)
    {
        if(flag)
        {
            if(!j)
            {
                l();
                O = true;
                repaint(0, 0, aa, B);
            }
        } else
        if(I > 0)
        {
            r();
            O = true;
            repaint(0, 0, aa, B);
        }
    }

    public void c(int i1)
    {
        if(E)
        {
            if(Y + i1 <= 0)
                Y = 0;
            else
            if(af > 0 && Y + i1 >= af - aa)
            {
                if(af > aa)
                    Y = af - aa;
            } else
            {
                Y += i1;
            }
            repaint(0, 0, aa, B);
        }
    }

    public void e()
    {
        try
        {
            if(G != null && ac >= 0 && ac < G.size())
            {
                ((d)G.elementAt(ac)).a(this, c, this, 0, 0, false);
                repaint(0, 0, aa, B);
            }
        }
        catch(ArrayIndexOutOfBoundsException arrayindexoutofboundsexception) { }
    }

    protected void keyPressed(int i1)
    {
        try
        {
            switch(getGameAction(i1))
            {
            case 6: // '\006'
                c(true);
                break;

            case 1: // '\001'
                c(false);
                break;

            case 5: // '\005'
                if(E)
                    c(aa - 8);
                else
                    a(true);
                break;

            case 2: // '\002'
                if(E)
                    c(8 - aa);
                else
                    a(false);
                break;

            case 8: // '\b'
                e();
                break;

            case 12: // '\f'
                f(1);
                break;

            case 9: // '\t'
                f(-1);
                break;

            case 10: // '\n'
                if(E)
                    c(1);
                else
                    b();
                break;

            case 11: // '\013'
                if(E)
                    c(-1);
                else
                    a();
                break;

            case 3: // '\003'
            case 4: // '\004'
            case 7: // '\007'
            default:
                if(i1 == 10)
                {
                    e();
                    break;
                }
                if(i1 == 116 || i1 == 84)
                {
                    b();
                    break;
                }
                if(i1 == 98 || i1 == 66)
                    a();
                break;
            }
        }
        catch(OutOfMemoryError outofmemoryerror) { }
    }

    protected void keyRepeated(int i1)
    {
        keyPressed(i1);
    }

    void a(String s1)
    {
        if(u != null && !u.isEmpty())
        {
            Integer integer = (Integer)u.get(s1);
            if(integer != null)
            {
                I = integer.intValue();
                r = true;
                O = true;
                repaint(0, 0, aa, B);
            }
        }
    }

    void g()
    {
        m = o;
    }

    public void f()
    {
        if(Z != null)
        {
            Z.d();
            Z = null;
        }
        n = "Done loading";
        repaint(0, 0, aa, B);
    }

    public synchronized void p()
    {
        f();
        H = null;
        G = null;
        u = null;
        f = null;
        i = null;
        j = true;
        w = 0;
        E = false;
        if(ae != null)
            removeCommand(ae);
        if(t != null)
            removeCommand(t);
        n = "Contacting server";
        L = 0;
        k = B - ab - y;
        System.gc();
    }

    public void b(String s1)
    {
        a(s1, false);
    }

    public void a(String s1, boolean flag)
    {
        if(s1.length() > 0 && s1.charAt(0) == '#')
        {
            m = null;
            a(t.c(s1.substring(1)));
            int i1 = o.indexOf(35);
            if(i1 != -1)
                o = o.substring(0, i1) + s1;
            else
                o = o + s1;
        } else
        {
            a(s1, null, null, null, null, flag, true);
        }
    }

    public synchronized void b(int i1)
    {
        if(i1 == 0)
        {
            if(o != null)
                a(o, null, null, null, null, true, false);
        } else
        if(i1 < 0 && R + i1 >= 0)
        {
            g g1 = K[R + i1];
            for(int j1 = 0; j1 > i1; j1--)
                if(K[--R] != null)
                {
                    if(K[R].g != null)
                        J--;
                    K[R] = null;
                }

            if(R <= 0)
            {
                if(P != null)
                    removeCommand(P);
                if(h != null)
                    removeCommand(h);
            }
            o = g1.e;
            H = g1.g;
            if(H == null)
            {
                a(o, null, null, null, null, false, false);
            } else
            {
                G = g1.h;
                i = g1.k;
                I = g1.f;
                u = g1.a;
                f = g1.j;
                w = g1.d;
                Y = g1.i;
                E = g1.b;
                af = g1.c;
                if(ae != null)
                    if(f == null || E)
                        removeCommand(ae);
                    else
                        addCommand(ae);
                if(t != null)
                    if(f == null)
                        removeCommand(t);
                    else
                        addCommand(t);
                g = g1.l;
                ac = g1.m;
                n = "Done loading";
                repaint(0, 0, aa, B);
            }
        }
    }

    public void a(String s1, String s2, String s3, q aq[], String s4)
    {
        a(s1, s2, s3, aq, s4, false);
    }

    public void a(String s1, String s2, String s3, q aq[], String s4, boolean flag)
    {
        a(s1, s2, s3, aq, s4, flag, true);
    }

    private synchronized void a(String s1, String s2, String s3, q aq[], String s4, boolean flag, boolean flag1)
    {
        if(flag1 && o != null && K != null)
        {
            if(J >= X && J > 0 && !o.startsWith("reqwireless:"))
            {
                int i1 = R - X;
                if(i1 >= 0)
                    K[i1].b();
                J--;
            }
            g g1 = new g();
            g1.e = o;
            g1.k = i;
            if(X > 0 && !o.startsWith("reqwireless:"))
            {
                g1.g = H;
                g1.h = G;
                g1.f = I;
                g1.i = Y;
                g1.b = E;
                g1.c = af;
                g1.l = g;
                g1.m = ac;
                g1.a = u;
                g1.j = f;
                g1.d = w;
            }
            if(R >= K.length)
            {
                g ag1[] = new g[K.length];
                System.arraycopy(K, 1, ag1, 0, K.length - 1);
                K = ag1;
                R = K.length - 1;
            }
            K[R++] = g1;
            if(X > 0)
                J++;
            if(P != null)
                addCommand(P);
            if(h != null)
                addCommand(h);
        }
        p();
        I = 0;
        Y = 0;
        g = 0;
        ac = 0;
        H = new Vector();
        G = new Vector();
        u = new Hashtable();
        Z = new t(this, s1, s2, s3, aq, s4, m, flag, H, G, u);
        m = null;
        (new Thread(Z)).start();
    }

    private void l()
    {
        I += k - y - ag.getHeight();
    }

    private void r()
    {
        I -= k - y - ag.getHeight();
        if(I < 0)
            I = 0;
    }

    protected void pointerPressed(int i1, int j1)
    {
        s = i1;
        d = j1;
        if(G != null)
            try
            {
                int k1 = I + j1;
                int l1 = ac;
                boolean flag = false;
                boolean flag1 = true;
                while(l1 >= 0 && l1 < G.size()) 
                {
                    d d1 = (d)G.elementAt(l1);
                    int i2 = d1.a();
                    if(flag && !flag1)
                        i2 = (i2 + d1.b()) - 1;
                    while(i2 >= d1.a() && i2 < d1.a() + d1.b()) 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -