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

📄 v.java

📁 // pica客户端J2ME源码
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
// pica客户端J2ME源码,100%可运行可修改,J2ME逆向工程经典作品
// 作者:fangji999
// QQ:57979471 Email:fangji999@163.com
// 博客:http://hi.baidu.com/ccall_net
// QQ群:51719370
// 如用此源码重新改写的软件或转载,请保留本人联系方式,作品原创作者

package pica;

import java.io.*;
import java.util.*;
import javax.microedition.lcdui.*;
import javax.microedition.rms.RecordStore;
import javax.microedition.rms.RecordStoreException;
import javax.microedition.rms.RecordStoreNotOpenException;
import utils.b;

// Referenced classes of package pica:
//			Pica, aa, d, j, 
//			k, l, w, x
//菜单主要类
public final class v extends Canvas
{
//	class x
//	{
//
//		public String a;
//		public boolean b;
//		public String c[];
//
//		public final void a(String as[])
//		{
//			b = true;
//			int i1 = as.length;
//			c = new String[i1];
//			System.arraycopy(as, 0, c, 0, i1);
//		}
//
//		public x(String s1)
//		{
//			a = s1;
//			b = false;
//			c = null;
//		}
//	}


	public static int a;
	public static int b;
	private int B;
	public static aa c = null;
	public Vector d;
	public String e;
	public Vector f;
	private byte C;
	public int g;
	private int D;
	private int E;
	private int F;
	private int G;
	private int H;
	private int I;
	private int J;
	public int h;
	private int K;//private int K;
	private int L;
	private int M;
	private int N;
	private int O;
	private String P[];
	private int Q;
	private int R;
	public int i;
	private int S;
	private int T;
	private int U;
	public static final int j;
	public static final int k;//public static final int k;
	public static final int l;
	public static int m;
	public static int n;
	public int o;
	public int p[] = {
		0x6f0d0a, 0x606060, 0xff1199, 0x84a2d9
	};
	public int q[] = {
		0xf0f0f, 0xf0f0f, 3855, 0x50505
	};
	public int r[] = {
		0xffdab9, 0xf5f5f5, 0xffc0cb, 0xf2f5ff
	};
	public Displayable s;
	public int t;
	public int u;
	public int v;
	public int wii;//public int w;
	public int x;
	public int y;
	public int z;
	public boolean A;
	private boolean V;
	private String W[];
	private int X;
	private d Y;
	private k Z;
	private int aa[];

	public v() 
	{
		B = 0;
		e = "";
		f = new Vector();
		C = 0;
		g = -1;
		D = 0;
		E = 0;
		F = 0;
		G = 0;
		H = 0;
		I = 0;
		J = 0;
		h = -1;
		K = 0;
		L = 0;
		M = 0;
		N = 0;
		O = 0;
		Q = 0;
		R = 0;
		i = -1;
		S = 0;
		T = 0;
		U = 0;
		o = 0;
		s = null;
		t = -6;
		u = -7;
		v = -1;
		wii = -2;
		x = -3;
		y = -4;
		z = -5;
		A = false;
		V = false;
		W = new String[7];
		X = 0;
		aa = new int[7];
		setFullScreenMode(true);
		a = getWidth();
		b = getHeight();
		d = new Vector();
		U = a - 108 - 35 >> 3;
		u();
	}

	public final void a(aa aa1)
	{
		if (aa1 == c)
			repaint();
	}

	public final void paint(Graphics g1)
	{
		setFullScreenMode(true);
		a = getWidth();
		b = getHeight();
		g1.setFont(Pica.q);
		a(g1);
		c.a(g1);
		if ((c instanceof d) && ((d)c).i())
			return;
		b(g1);
		g1.drawImage(Pica.wi, 2, 2, 20);
		e(g1);
		if (Runtime.getRuntime().freeMemory() < 10000L)
			System.gc();
	}

	protected final void sizeChanged(int i1, int j1)
	{
		a = i1;
		b = j1;
	}

	private static void a(Graphics g1)
	{
		g1.setColor(255, 255, 255);
		g1.setClip(0, 0, a, b);
		g1.fillRect(0, 0, a, b);
		g1.setColor(0, 0, 0);
	}

	private void b(Graphics g1)
	{
		g1.setColor(p[o]);
		g1.fillRect(0, 0, a, l);
		a(g1, l, 22, false);
		g1.setColor(100, 100, 100);
		g1.drawLine(0, (l + 22) - 1, a, (l + 22) - 1);
		g1.setColor(211, 211, 211);
		g1.drawLine(0, l + 22, a, l + 22);
		if (Pica.ac || Pica.Z || Pica.aa || Pica.ab || Pica.ad)
		{
			if (c.q.equals("信息详情"))
			{
				g1.setColor(0);
				g1.drawString(c.q, (a >> 1) + 1, 1, 17);
				g1.setColor(0xffffff);
				g1.drawString(c.q, a >> 1, 0, 17);
			} else
			{
				g1.setColor(0);
				g1.drawString(c.q, (a >> 1) + 1, (l >> 1) + 1, 17);
				g1.setColor(0xffffff);
				g1.drawString(c.q, a >> 1, l >> 1, 17);
			}
		} else
		{
			T = d.size();
			int i1 = a - (24 + U) * T;
			int j1 = l - 2;
			g1.setColor(0);
			g1.drawString(c.q, (a >> 1) + 1, 1, 17);
			g1.setColor(0xffffff);
			g1.drawString(c.q, a >> 1, 0, 17);
			for (int k1 = S; k1 < T; k1++)
			{
				aa aa1 = (aa)d.elementAt(k1);
				g1.setClip(i1 + 3, j1 + 2, 18, 18);
				g1.drawImage(aa1.r, (i1 + 3) - aa1.si, j1 + 2, 20);
				g1.setClip(0, 0, a, b);
				if (k1 == B)
					g1.drawImage(Pica.C, i1, j1, 20);
				i1 += 24 + U;
			}

		}
		if (!Pica.aQ)
		{
			if (!c.q.equals("信息详情"))
				d(g1);
			c(g1);
		}
		d d1;
		if (c.q.equals("信息详情") && Pica.aY.size() > 0)
			(d1 = (d)c).l.a(g1);
	}

	private static void c(Graphics g1)
	{
		if (Pica.Y < 0 && Pica.e.e() > 0 || Pica.Y % 2 == 0)
		{
			int i1 = a - 18 - 5;
			g1.setClip(i1, 0, 18, 18);
			g1.drawImage(Pica.v, i1 - 72, 0, 20);
			g1.setClip(0, 0, a, b);
		}
	}

	private void d(Graphics g1)
	{
		int i1 = U << 1;
		int j1 = (l >> 1) + 8;
		g1.setColor(245, 245, 245);
		g1.drawRect(i1 - 3, j1 - 3, 23, 23);
		g1.setClip(i1, j1, 18, 18);
		g1.drawImage(Pica.t, i1 - (Pica.am % 5) * 18, j1 - (Pica.am / 5) * 18, 20);
		g1.setClip(0, 0, a, b);
		if (Pica.H != 0)
		{
			int k1 = ((i1 + 18) - 10) + 2;
			int l1 = (j1 + 18) - 10;
			int i2 = 0;
			switch (Pica.H)
			{
			case 1: // '\001'
				i2 = k1;
				break;

			case 2: // '\002'
				i2 = k1 - 10;
				break;

			case 100: // 'd'
				i2 = k1 - 30;
				break;
			}
			g1.setClip(k1, l1, 10, 10);
			g1.drawImage(Pica.u, i2, l1, 20);
			g1.setClip(0, 0, a, b);
		}
	}

	private static void a(Graphics g1, int i1, int j1, int k1)
	{
		byte byte0 = 0;
		byte byte1 = 0;
		if (k1 == 1 || k1 == 2)
		{
			byte0 = 4;
			byte1 = 8;
		} else
		{
			byte0 = 8;
			byte1 = 4;
		}
		byte byte2 = 0;
		if (k1 == 1 || k1 == 3)
			byte2 = 20;
		else
		if (k1 == 2)
			byte2 = 17;
		else
		if (k1 == 4)
			byte2 = 6;
		g1.setClip(i1, j1, byte0, byte1);
		g1.drawImage(Pica.z, i1, j1, byte2);
		g1.setClip(0, 0, a, b);
	}

	private void e(Graphics g1)
	{
		String s1 = "";
		String s2 = "";
		if (C > 0)
		{
			s1 = "选择";
			s2 = "取消";
			f(g1);
			if (C == 2)
				g(g1);
		} else
		if (c != null)
		{
			if (!f.isEmpty())
				if (f.size() == 1)
					s1 = ((x)f.elementAt(0)).a;
				else
					s1 = "菜单";
			s2 = e;
		}
		a(g1, b - j, j, true);
		g1.setColor(0xffffff);
		g1.drawString(utils.b.a(new Date()).substring(11), a >> 1, b - 2, 33);
		g1.setColor(0);
		g1.drawString(s1, 4, b, 36);
		g1.drawString(s2, a - 2, b, 40);
		g1.setColor(0xffffff);
		g1.drawString(s1, 3, b - 1, 36);
		g1.drawString(s2, a - 3, b - 1, 40);
	}

	private void a(Graphics g1, int i1, int j1, boolean flag)
	{
		if (flag)
		{
			g1.setColor(0, 0, 0);
			g1.drawLine(0, i1, a, i1);
			g1.setColor(100, 100, 100);
			g1.drawLine(0, i1 - 1, a, i1 - 1);
			g1.setColor(211, 211, 211);
			g1.drawLine(0, i1 - 2, a, i1 - 2);
		}
		int k1 = i1;
		int l1 = p[o];
		for (int i2 = 0; i2 < j1 / 3; i2++)
		{
			g1.setColor(l1);
			g1.fillRect(0, k1, a, 3);
			k1 += 3;
			l1 += q[o];
		}

		g1.setColor(l1);
		g1.fillRect(0, k1, a, j1 % 3);
	}

	private void f(Graphics g1)
	{
		g1.setClip(0, 0, a, b);
		int i1 = I;
		int j1 = J;
		a(g1, i1, j1, G, H);
		if (F > 0)
			a(g1, G / 2 - 4, j1 + 1, 3);
		j1 += 5;
		for (int k1 = F; k1 < F + E; k1++)
		{
			g1.setColor(0);
			if (k1 == g)
			{
				g1.setColor(p[o]);
				g1.fillRect(i1 + 1, j1, G - 1, k);
				g1.setColor(0xffffff);
			}
			x x1 = (x)f.elementAt(k1);
			g1.drawString(x1.a, i1 + 4, j1 + 2, 20);
			if (x1.b)
				a(g1, G - 5, j1 + 6, 2);
			j1 += k;
		}

		if (F + E < D)
			a(g1, (G >> 1) - 4, j1, 4);
	}

	private void g(Graphics g1)
	{
		int i1 = Q;
		int j1 = R;
		a(g1, i1, j1, N, O);
		if (M > 0)
			a(g1, (i1 + (N >> 1)) - 4, j1 + 1, 3);
		j1 += 5;
		for (int k1 = M; k1 < M + L; k1++)
		{
			g1.setColor(0);
			if (k1 == h)
			{
				g1.setColor(p[o]);
				g1.fillRect(i1 + 1, j1, N - 1, k);
				g1.setColor(0xffffff);
			}
			g1.drawString(P[k1], i1 + 4, j1 + 2, 20);
			j1 += k;
		}

		if (M + L < K)
			a(g1, (i1 + (N >> 1)) - 4, j1, 4);
	}

	private static void a(Graphics g1, int i1, int j1, int k1, int l1)
	{
		g1.setColor(211, 211, 211);
		g1.drawRect(i1 + 2, j1 + 3, k1, l1 - 1);
		g1.setColor(100, 100, 100);
		g1.drawRect(i1 + 1, j1 + 2, k1, l1 - 1);
		g1.setColor(245, 245, 245);
		g1.fillRect(i1, j1, k1, l1);
		g1.setColor(0, 0, 0);
		g1.drawRect(i1, j1, k1, l1);
	}

	public final void a(int i1)
	{
		Pica.ad = false;
		B = i1;
		aa aa1 = (aa)d.elementAt(i1);
		b(aa1);
	}

	public final void b(aa aa1)
	{
		if (c != null)
		{
			j();
			f.removeAllElements();
			e = "";
			if (!aa1.q.equals("信息详情") && Pica.aW != null)
			{
				Pica.aW.cancel();
				Pica.aW = null;
			}
		}
		c = null;
		c = aa1;
		aa1.a(this);
		repaint();
	}

	public final void a()
	{
		Pica.l.A = false;
		if (Pica.aW != null)
		{
			Pica.aW.cancel();
			Pica.aW = null;
			d d1;
			if ((c instanceof d) && (d1 = (d)c).l != null)
				d1.l.l = null;
		}
		if (Pica.aQ)
		{
			pica.w.e();
			return;
		}
		if (s != null)
		{
			Pica.j.setCurrent(s);
			s = null;
			return;
		} else
		{
			a(B);
			return;
		}
	}

	public static aa b()
	{
		return c;
	}

	protected final void keyPressed(int i1)
	{
		if (!Pica.aK)
		{
			Pica.aI = Pica.aJ[0];
			Pica.aL = true;
		}
		if (V)
		{
			if (i1 >= 48 && i1 <= 57 || i1 == 42 || i1 == 35)
			{
				pica.w.a("按键错误,请按正确的键!", 2000, this);
				return;
			}
			aa[X] = i1;
			X++;
			if (X == aa.length)
			{
				pica.w.a("恭喜!按键设置成功。", 2000, this);
				s();
				return;
			} else
			{
				a(Y);
				return;
			}
		}
		if (i1 == t)
			g();
		else
		if (i1 == u)
			h();
		else
		if (i1 == v || i1 == 50)
		{
			if (i1 == 50 && Pica.ad)
				i();
			else
				c();
		} else
		if (i1 == wii || i1 == 56)
		{
			if (i1 == 56 && Pica.ad)
				i();
			else
				d();
		} else
		if (i1 == x || i1 == 52)
		{
			if (i1 == 52 && Pica.ad)
				i();
			else
				e();
		} else
		if (i1 == y || i1 == 54)
		{
			if (i1 == 54 && Pica.ad)
				i();
			else
				f();
		} else
		if (i1 == z || i1 == 53)
			i();
		else
		if (i1 == 49)
		{
			if (Pica.ad)
				i();
			else
			if (C == 0)
				c.f();
		} else
		if (i1 == 55)
		{
			if (Pica.ad)
				i();
			else
			if (C == 0)
				c.g();
		} else
		if (i1 == 51)
		{
			if (Pica.ad)
				i();
			else
			if (C == 0)
				c.r();
		} else
		if (i1 == 57)
		{
			if (Pica.ad)
				i();
			else
			if (C == 0)
				c.s();
		} else
		if (i1 == 48)
		{
			if (C == 0)
				o();
		} else
		if (i1 == 35)
		{
			if ((c instanceof d) && ((d)c).i())
			{
				((d)c).a(false);
				repaint();
				return;
			}
			if (C == 0)
				p();
		} else
		if (i1 == 42)
			if (Pica.aQ)
				t();
			else
			if (C == 0)
			{
				if ((c instanceof d) && ((d)c).i())
				{
					((d)c).a(false);
					repaint();
					return;
				}
				pica.w.c();
			}
		repaint();
	}

	private void c()

⌨️ 快捷键说明

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