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

📄 j.java

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

package pica;

import java.util.Date;
import java.util.Vector;
import javax.microedition.lcdui.Display;
import utils.b;

// Referenced classes of package pica:
//			aa, Pica, ai, h, 
//			i, m, p, q, 
//			t, v, w
//消息列表界面
public final class j extends aa
{

	private int c;
	private int d;
	private int e;
	private int f;
	private boolean g;
	public boolean a;
	public p b;

	public j(boolean flag, String s1)
	{
		super(Pica.l);
		c = 0;
		d = 0;
		e = 0;
		f = 0;
		a = false;
		g = flag;
		super.q = s1;
		a();
	}

	public static boolean a(p p1)
	{
		return p1.b.endsWith("@pica") || p1.b.equals("pica") || p1.b.endsWith("@qq.pica") || p1.b.endsWith("@msn.pica") || p1.b.endsWith("@cluster.qq.pica");
	}

	private static boolean c(p p1)
	{
		return p1.b.indexOf("cluster") != -1 || p1.b.indexOf("@game.pica") != -1;
	}
//添加到界面
	public final void a(p p1, boolean flag)
	{
		try
		{
			long l1 = Runtime.getRuntime().freeMemory();
			if (a(p1))
			{
				d++;
				if (d - 1 >= 25 || l1 <= 1024L)
				{
					int k = 0;
					int k1 = 0;
					do
					{
						if (k1 >= Pica.e.q())
							break;
						p p4;
						if (a(p4 = (p)Pica.e.b(k1)))
						{
							k = k1;
							break;
						}
						k1++;
					} while (true);
					p p2;
					if ((p2 = (p)Pica.e.b(k)) != null)
					{
						f(p2);
						p2.u = -1;
						int k2 = p2.a;
						e(p2);
						d--;
						Pica.a(k2);
					}
				}
			} else
			if (!c(p1))
			{
				c++;
				if (c - 1 >= 15 || l1 <= 1024L)
				{
					int i1 = 0;
					int i2 = 0;
					do
					{
						if (i2 >= Pica.e.q())
							break;
						p p5;
						if (!a(p5 = (p)Pica.e.b(i2)))
						{
							i1 = i2;
							break;
						}
						i2++;
					} while (true);
					p p3;
					if ((p3 = (p)Pica.e.b(i1)) != null)
					{
						f(p3);
						p3.u = -1;
						c--;
						e(p3);
					}
				}
			}
			synchronized (this)
			{
				int j2 = 0;
				if (flag)
				{
					do
					{
						if (j2 >= q())
							break;
						p p6 = (p)b(j2);
						if (p1.a <= p6.a)
							break;
						j2++;
					} while (true);
					p().insertElementAt(p1, j2);
				} else
				{
					super.a(p1);//a(p1);添加消息到列表演
				}
				d(p1);
				if (p1.u == 0)
				{
					Pica.Y = -1;
					e++;
				}
			}
			return;
		}
		catch (Exception  e)
		{
			return;
		}
	}

	public final void a(boolean flag, String s1, String s2, String s3, String s4, String s5, Date date, 
			String s6)
	{
		p p1;
		if (Pica.f.q() >= 30 && (p1 = (p)Pica.f.b(0)) != null)
		{
			f(p1);
			p1.u = -1;
			e(p1);
		}
		if ((p1 = new p(++f, s1, null, s2, s3, s4, s5, flag ? ((int) (date == null ? 0 : 1)) : 3, (String[][])null, null)).b.equals(Pica.M) && flag)
			p1.u = 1;
		p1.t = s6;
		if (p1.t == null && p1.b.indexOf("%") != -1 || p1.t != null && p1.t.trim().length() == 0 && p1.b.indexOf("%") != -1)
		{
			p1.t = Pica.K.c(s1);
			if (p1.t == null || p1.t.trim().length() == 0)
				p1.t = p1.b.substring(0, p1.b.indexOf('%'));
		}
		if (date != null)
			p1.vd = date;
		String s7 = "";
		if (s1.indexOf('%') != -1)
			s7 = s1.substring(0, s1.indexOf('%'));
		else
		if (s1.indexOf('@') != -1)
			s7 = s1.substring(0, s1.indexOf('@'));
		if (date == null && flag && s7.equals(w.ls) && (s2.equals("groupchat") || s2.equals("chat")))
		{
			return;
		} else
		{
			a(p1, false);
			return;
		}
	}

	private void d(p p1)
	{
		String s1 = utils.b.a(p1.vd);
		String s2 = utils.b.a(new Date());
		if (s1.substring(0, 10).equals(s2.substring(0, 10)))
			s1 = s1.substring(11, 16);
		else
			s1 = s1.substring(5, 10);
		String s3 = "[" + p1.b + "]";
		if (g)
		{
			if (p1.u != 3)
			{
				if (p1.b.indexOf('%') != -1)
				{
					if (p1.t != null && p1.t.length() > 0)
					{
						s3 = "[ " + p1.t + " ] ";
					} else
					{
						s3 = p1.b.substring(0, p1.b.indexOf('%'));
						s3 = "[ " + s3 + " ] ";
					}
				} else
				if (p1.b.equals(Pica.M))
					s3 = "[公告]";
			} else
			{
				s3 = ">>>";
			}
			s3 = s3 + " " + " " + (p1.r.length() <= 0 ? p1.s.startsWith("ptt://") ? "语音信息" : p1.s : p1.r);
		} else
		{
			if (p1.u != 2)
				try
				{
					if (p1.t != null)
						s3 = "[" + p1.t + "]";
					else
						s3 = pica.Pica.b(p1.b);
				}
				catch (Exception  e) { }
			else
				s3 = ">>>";
			s3 = s3 + " " + s1 + " " + (p1.r.length() <= 0 ? p1.s.startsWith("ptt://") ? "语音信息" : p1.s : p1.r);
		}
		if (s3.length() > 30)
			s3 = s3.substring(0, 30);
		p1.w = s3;
	}

	private void e(p p1)
	{
		b(p1);
		if (super.p >= q())
			super.p--;
	}

	public final void a()
	{
		m();
		e = 0;
		c = 0;
		d = 0;
	}

	public final int e()
	{
		return e;
	}

	public final void b(p p1)
	{
		f(p1);
		if (!g && a(p1))
			Pica.a(p1);
	}

	private void f(p p1)
	{
		if (p1.u == 0)
		{
			p1.u = 1;
			if (!g)
				e--;
			if (e < 0)
				e = 0;
		}
	}

	public final p c(int k)
	{
		return (p)b(k);
	}

	public final void a(v v1)
	{
		if (a)
		{
			v1.e = "发言";
			v1.a("离开");
			return;
		}
		if (g)
		{
			v1.a("转发");
			if (!Pica.P && Pica.R)
				v1.e = "发言";
			if (Pica.Q)
				v1.a("悄悄话");
			v1.a("离开");
			return;
		} else
		{
			v1.e = "回复";
			v1.a("回复");
			v1.a("转发");
			v1.a("删除");
			v1.a("全部删除");
			return;
		}
	}

	public final void a(String s1)
	{
		if (s1 == "删除")
		{
			y();
			return;
		}
		if (s1 == "全部删除")
		{
			z();
			return;
		}
		if (s1 == "回复")
		{
			u();
			return;
		}
		if (s1 == "转发")
		{
			t();
			return;
		}
		if (s1 == "发言")
			if (a)
			{
				v();
				return;
			} else
			{
				w();
				return;
			}
		if (s1 == "悄悄话")
		{
			l();
			return;
		}
		if (s1 == "离开")
			x();
	}

	public final void d()
	{
		p p1;
		if ((p1 = (p)o()) != null)
		{
			String s1 = null;
			m m1;
			if ((m1 = Pica.m.b(p1.b)) != null)
			{
				s1 = m1.a;
			} else
			{
				if (p1.b.indexOf("@") > 0)
					s1 = p1.b.substring(0, p1.b.indexOf("@"));
				else
					s1 = p1.b;
				if (p1.b.indexOf("%") > 0)
					s1 = p1.b.substring(0, p1.b.indexOf("%"));
			}
			b(p1);
			pica.w.a(s1, p1, g);
		}
	}

	private void l()
	{
		p p1;
		if ((p1 = (p)o()) == null)
			return;
		b(p1);
		Object obj = null;
		Object obj1 = null;
		if (p1.b.indexOf('%') != -1)
		{
			String s3 = null;
			String s1 = p1.t;
			String s2 = p1.b;
			s3 = "发给:" + s1;
			Pica.j.setCurrent(new h(s3, s2, s1, "chat", true, Pica.l));
			return;
		}
		String s4 = null;
		if (p1.t != null && p1.t.length() > 0)
			s4 = p1.t;
		else
			s4 = p1.b;
		if (s4.equals(Pica.M))
			s4 = super.q;
		pica.w.a("对不起,不能向[" + s4 + "]发送悄悄话!", 2000, Pica.l);
	}

	private void t()
	{
		p p1;
		if ((p1 = (p)o()) == null)
			return;
		if (g)
			Pica.aa = true;
		else
			Pica.Z = true;
		b(p1);
		b = null;
		b = p1;
		Pica.l.a(0);
		pica.w.a("请选择接收人", 2000, Pica.l);
	}

	private void u()
	{
		p p1;
		if ((p1 = (p)o()) == null)
			return;
		String s1 = p1.y;
		Pica.e.b(p1);
		String s2 = null;
		String s3;
		String s4;
		if ((s4 = pica.Pica.b(s3 = p1.b)).indexOf(";") != -1)
			s4 = s4.substring(0, s4.indexOf(";"));
		s2 = "发给:" + s4;
		Pica.j.setCurrent(new h(s2, s3, s4, null, Pica.l, s1));
	}

	private static void v()
	{
		String s1 = pica.i.b;
		Pica.j.setCurrent(new h("游戏命令:", s1, null, "groupchat", false, Pica.l));
	}

	private static void w()
	{
		String s1 = pica.i.b;
		Pica.j.setCurrent(new h("发言:", s1, null, "groupchat", false, Pica.l));
	}

	private void x()
	{
		try
		{
			Pica.P = true;
			Pica.Q = false;
			Pica.R = false;
			Pica.S = false;
			Pica.U = false;
			Pica.T = false;
			Pica.K.m();
			Pica.f.m();
			if (!Pica.L)
			{
				if (a)
					Pica.h.a(Pica.M, Pica.aS);
				else
					Pica.h.f();
			} else
			{
				Pica.h.i(Pica.M);
			}
			a = false;
			pica.w.a("正在离开,请稍候...", 8000, Pica.l);
			return;
		}
		catch (Exception  e)
		{
			pica.w.a("离开失败,请稍候再试!", 2000, Pica.l);
		}
	}

	private void y()
	{
		p p1;
		if ((p1 = (p)o()) != null)
		{
			f(p1);
			p1.u = -1;
			int k = p1.a;
			boolean flag = a(p1);
			d(super.p);
			if (flag)
			{
				d--;
				Pica.a(k);
				return;
			}
			c--;
		}
	}

	private void d(int k)
	{
		p().removeElementAt(k);
		if (super.p >= q())
			super.p--;
		if (super.p >= 0 && super.p < super.oi)
			super.oi = super.p;
	}

	public final void r()
	{
		y();
	}

	public final void s()
	{
		n();
	}

	private void z()
	{
		if (q() == 0)
		{
			return;
		} else
		{
			pica.w.al("提示", "你确定要删除全部信息吗?", null, 5);
			return;
		}
	}

	public final void i()
	{
		a();
		Pica.e();
		Pica.l.a();
	}

	public final void h()
	{
	}
}

⌨️ 快捷键说明

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