2009-PICA最新j2ME源码

源代码在线查看: f.java

软件大小: 238 K
上传用户: wujiahui1pm
关键词: 2009 PICA j2ME 源码
下载地址: 免注册下载 普通下载 VIP

相关代码

				// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
				// Jad home page: http://kpdus.tripod.com/jad.html
				// Decompiler options: packimports(3) fieldsfirst ansi space 
				
				package pica.ui;
				
				import java.util.*;
				import javax.microedition.lcdui.*;
				
				public final class f
				{
				
					public f()
					{
					}
				
					public static final String a(Date date)
					{
						Calendar calendar;
						(calendar = Calendar.getInstance()).setTime(date);
						StringBuffer stringbuffer;
						(stringbuffer = new StringBuffer()).append(Integer.toString(calendar.get(1)) + "年");
						a(stringbuffer, calendar.get(2) + 1, "月");
						a(stringbuffer, calendar.get(5), "日 ");
						a(stringbuffer, calendar.get(11), ":");
						a(stringbuffer, calendar.get(12), "");
						return stringbuffer.toString();
					}
				
					private static final void a(StringBuffer stringbuffer, int i, String s)
					{
						int j = stringbuffer.length();
						stringbuffer.append(Integer.toString(i));
						if (stringbuffer.length() - j == 1)
							stringbuffer.insert(stringbuffer.length() - 1, "0");
						stringbuffer.append(s);
					}
				
					public static String[] a(String s, int i, Font font)
					{
						int j = 0;
						int k = 1;
						s.length();
						char ac[] = null;
						ac = s.toCharArray();
						Vector vector = new Vector();
						int l = 0;
						for (int i1 = 0; i1 < s.length(); i1++)
						{
							if (ac[i1] == '\n')
							{
								j = 0;
								k++;
								vector.addElement(s.substring(l, i1));
								l = i1 + 1;
								continue;
							}
							if (i - j < font.charWidth(ac[i1]))
							{
								j = 0;
								k++;
								vector.addElement(s.substring(l, i1));
								l = i1;
							}
							j += font.charWidth(ac[i1]);
						}
				
						vector.addElement(s.substring(l));
						String as[] = new String[k];
						for (int j1 = 0; j1 < vector.size(); j1++)
							as[j1] = (String)vector.elementAt(j1);
				
						return as;
					}
				
					public static void a(String s, int i, int j, int k, int l, int i1, Graphics g)
					{
						g.setColor(l);
						g.drawString(s, i - 1, j, i1);
						g.drawString(s, i + 1, j, i1);
						g.drawString(s, i, j - 1, i1);
						g.drawString(s, i, j + 1, i1);
						g.drawString(s, i - 1, j - 1, i1);
						g.drawString(s, i + 1, j + 1, i1);
						g.drawString(s, i - 1, j + 1, i1);
						g.drawString(s, i + 1, j - 1, i1);
						g.setColor(k);
						g.drawString(s, i, j, i1);
					}
				
					public static final boolean a(String s)
					{
						return s == null || s.length() != 11 || !s.startsWith("1");
					}
				
					public static final boolean b(String s)
					{
						if (s == null || s.length() == 0)
							return true;
						int i = s.length();
						for (int j = 0; j < i; j++)
						{
							char c;
							if (((c = s.charAt(j)) < '0' || c > '9') && (c < 'A' || c > 'Z') && (c < 'a' || c > 'z') && c != '_')
								return true;
						}
				
						return false;
					}
				
					public static final void a(Image image, int i, int j, int k, int l, int i1, Graphics g)
					{
						int j1 = image.getWidth() / k;
						int k1 = i1 % j1;
						int l1 = (i1 - k1) / j1;
						int i2 = g.getClipX();
						int j2 = g.getClipY();
						int k2 = g.getClipWidth();
						int l2 = g.getClipHeight();
						g.setClip(i, j, k, l);
						g.drawImage(image, i - k1 * k, j - l1 * l, 0);
						g.setClip(i2, j2, k2, l2);
					}
				}
							

相关资源