亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? emotions.java.svn-base

?? 類似QQ的功能
?? SVN-BASE
?? 第 1 頁 / 共 2 頁
字號:
/******************************************************************************* Jimm - Mobile Messaging - J2ME ICQ clone Copyright (C) 2003-05  Jimm Project This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. ******************************************************************************** File: src/jimm/Emotions.java Version: ###VERSION###  Date: ###DATE### Author(s): Artyomov Denis *******************************************************************************/package jimm;//#sijapp cond.if modules_SMILES_STD="true" | modules_SMILES_ANI="true" #import java.util.Hashtable;import java.util.Timer;import java.util.TimerTask;import java.util.Vector;import javax.microedition.lcdui.*;import java.io.*;import jimm.comm.Util;import jimm.util.ResourceBundle;import DrawControls.*;public class Emotions implements VirtualListCommands, CommandListener{	private static Emotions _this;	private static Vector imagesData = new Vector();	private static Vector timeData = new Vector();	private static Vector findedEmotions = new Vector();	private static boolean used;	private static boolean animated;	private static int[] selEmotionsIndexes, textCorrIndexes;	private static String[] selEmotionsWord;	private static String[] selEmotionsSmileNames;	private static String[] textCorrWords;	private static boolean[] emoFinded;	private static String setName;	public Emotions()	{		used = false;		_this = this;		load();	}		static void load()	{		int iconsSize = -1;		animated = false;		String lang = Options.getString(Options.OPTION_UI_LANGUAGE).toLowerCase();		if (lang == null || lang.length() == 0) lang = "en";		ImageList imageList = new ImageList(); 		Vector textCorr = new Vector();		Vector selEmotions = new Vector();		Vector timeingsValues = new Vector();		InputStream stream;		DataInputStream dos;		Hashtable transl = new Hashtable();		//#sijapp cond.if target="MIDP2" | target="SIEMENS2"#		imageList.setScale(Options.getInt(Options.OPTION_IMG_SCALE));//#sijapp cond.end#				//#sijapp cond.if modules_DEBUGLOG is "true"#		System.gc();		long mem = Runtime.getRuntime().freeMemory();		//#sijapp cond.end#				String fileLine = null;				try		{			stream = _this.getClass().getResourceAsStream("/ani_emotions/animate.txt");			if (stream != null)			{				dos = new DataInputStream(stream);				String[] lineItems;				String[] nameAndExt;				String[] imgAndTime;				String fileName;				int imgWidth;				int index;				byte[] timeDataArray;				for (;;)				{					fileLine = readLineFromStream(dos);					if (fileLine == null) break;										lineItems = Util.explode(fileLine, ' ');										if (lineItems.length >= 3)					{						fileName = lineItems[0];						imgWidth = Integer.parseInt(lineItems[1]);												nameAndExt = Util.explode(fileName, '.');												index = Integer.parseInt(nameAndExt[0]);												imageList.load("/ani_emotions/"+fileName, imgWidth, -1, -1, Jimm.getPhoneVendor() == Jimm.PHONE_NOKIA);						imagesData.setSize(index+1);						imagesData.setElementAt(imageList.getImages(), index);												timeingsValues.removeAllElements();						for (int i = 2; i < lineItems.length; i++)						{							imgAndTime = Util.explode(lineItems[i], ',');							timeingsValues.addElement(new Byte((byte)(0xFF&Integer.parseInt(imgAndTime[0]))));							timeingsValues.addElement(new Byte((byte)(0xFF&Integer.parseInt(imgAndTime[1]))));						}												timeData.setSize(index+1);						if (timeingsValues.size() > 2)						{							timeDataArray = new byte[timeingsValues.size()];							for (int i = 0; i < timeDataArray.length; i++)								timeDataArray[i] = ((Byte)timeingsValues.elementAt(i)).byteValue();							timeData.setElementAt(timeDataArray, index);							timeDataArray = null;						}					}				}								animated = true;			}			else animated = false;						String translFile = "/smiles."+lang+".txt";			loadTranslation(animated ? "/ani_emotions"+translFile : translFile, transl);						// Load file "smiles.txt"			stream = _this.getClass().getResourceAsStream(animated ? "/ani_emotions/smiles.txt" : "/smiles.txt");			if (stream == null) return;			dos = new DataInputStream(stream);						fileLine = readLineFromStream(dos);						// Read icon size			if (!animated)			{				iconsSize = Integer.parseInt(fileLine);				setName = null;			}						// Read emotions set name			else			{				String[] emoData = Util.explode(fileLine, '|');				String[] langAndName;				if (emoData.length >= 1)				{					setName = emoData[0];					for (int i = 1; i < emoData.length; i++)					{						langAndName = Util.explode(emoData[i], ',');						if (langAndName.length == 2 && lang.equals(langAndName[0].toLowerCase()))						{							setName = langAndName[1];							break;						}					}				}			}			String[] lineItems;			Integer currIndex;			String smileName;			String translation; 			String word;			for (;;)			{				fileLine = readLineFromStream(dos);				if (fileLine == null) break;								lineItems = Util.explode(fileLine, ' ');								if (lineItems.length >= 3)				{					if (lineItems[0].charAt(0) == '#') continue;					currIndex = Integer.valueOf(lineItems[0]);					smileName = lineItems[1];					translation = (String)transl.get(smileName.toLowerCase()); 					smileName = (translation != null) ? translation : lineItems[1].replace('_', ' ');					for (int i = 2; i < lineItems.length; i++)					{						word = lineItems[i];						if (word.length() == 0) continue;						insertTextCorr(textCorr, word.toLowerCase(), currIndex);						if (word.indexOf('_') != -1 && word.length() > 3) 							insertTextCorr(textCorr, word.replace('_', ' ').toLowerCase(), currIndex);						if (i == 2) selEmotions.addElement(new Object[] { currIndex, word, smileName });					}				}			}			stream.close();			// Read images			if (!animated)			{				imageList.load("/smiles.png", iconsSize, iconsSize, -1, Jimm.getPhoneVendor() == Jimm.PHONE_NOKIA);				for (int i = 0; i < imageList.size(); i++)					imagesData.addElement(new Image[] { imageList.elementAt(i) });				timeData.setSize(imagesData.size());			}						used = true;		}		catch (OutOfMemoryError e)		{			imageList.removeAllElements();			imagesData.removeAllElements();			timeData.removeAllElements();			findedEmotions.removeAllElements();						imageList = null;			imagesData = null;			timeData = null;			findedEmotions = null;			selEmotionsIndexes = null;			textCorrIndexes = null;			selEmotionsWord = null;			selEmotionsSmileNames = null;			textCorrWords = null;			emoFinded = null;						System.gc();						Jimm.setLoadError("No memory to load emotions images!");			return;		}		catch (Exception e)		{			e.printStackTrace();			Jimm.setLoadError("Error while loading emotions: "+e.toString());			return;		}				// Write emotions data from vectors to arrays		int size = selEmotions.size();		selEmotionsIndexes = new int[size];		selEmotionsWord = new String[size];		selEmotionsSmileNames = new String[size];		Object[] data;		for (int i = 0; i < size; i++)		{			data = (Object[]) selEmotions.elementAt(i);			selEmotionsIndexes[i] = ((Integer) data[0]).intValue();			selEmotionsWord[i] = (String) data[1];			selEmotionsSmileNames[i] = (String) data[2];		}		size = textCorr.size();		textCorrWords = new String[size];		textCorrIndexes = new int[size];		emoFinded = new boolean[size];		for (int i = 0; i < size; i++)		{			data = (Object[]) textCorr.elementAt(i);			textCorrWords[i] = (String) data[0];			textCorrIndexes[i] = ((Integer) data[1]).intValue();		}		data = null;		//#sijapp cond.if modules_DEBUGLOG is "true"#		selEmotions.removeAllElements();		selEmotions = null;		textCorr.removeAllElements();		textCorr = null;		dos = null;		stream = null;		System.gc();		DebugLog.addText("Emotions used: "+(mem - Runtime.getRuntime().freeMemory()));		//#sijapp cond.end#	}	static private void loadTranslation(String file, Hashtable transl) throws IOException	{		InputStream stream = _this.getClass().getResourceAsStream(file);		if (stream == null) return;		DataInputStream dos = new DataInputStream(stream);				String line;		String[] pair;		for (;;)		{			line = readLineFromStream(dos);			if (line == null) break;						pair = Util.explode(line, '=');			if (pair.length < 2) continue;			if (pair[1].length() == 0) continue;			transl.put(pair[0].toLowerCase(), pair[1]);		}		stream.close();	}	// Add smile text and index to textCorr in decreasing order of text length 	static void insertTextCorr(Vector textCorr, String word, Integer index)	{		Object[] data = new Object[] { word, index };		int wordLen = word.length();		int size = textCorr.size();		int insIndex = 0;		Object[] cvtData;		int cvlDataWordLen;		for (; insIndex < size; insIndex++)		{			cvtData = (Object[]) textCorr.elementAt(insIndex);			cvlDataWordLen = ((String) cvtData[0]).length();			if (cvlDataWordLen <= wordLen)			{				textCorr.insertElementAt(data, insIndex);				return;			}		}		cvtData = null;		textCorr.addElement(data);	}	// Reads simple word from stream. Used in Emotions(). 	// Returns "true" if break was found after word	static String readLineFromStream(DataInputStream stream)	{		ByteArrayOutputStream bytes = new ByteArrayOutputStream();		boolean wasRead = false;		try		{			for (;;)			{				int chr = stream.readByte();				if (chr == -1) break;				wasRead = true;				if (chr == '\n') break;				if (chr != '\r') bytes.write(chr);			}		}		catch (Exception e) {}		return wasRead ? Util.byteArrayToString(bytes.toByteArray(), true) : null;	}	static private void findEmotionInText(String text, String emotion,			int index, int startIndex, int recIndex)	{		if (!emoFinded[recIndex]) return;		int findedIndex, len = emotion.length();		findedIndex = text.indexOf(emotion, startIndex);		if (findedIndex == -1)		{			emoFinded[recIndex] = false;			return;		}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
九一久久久久久| 亚洲婷婷国产精品电影人久久| 日韩精品一区二区三区四区| 久久久久亚洲综合| 亚洲欧洲综合另类| 久久国产精品99久久人人澡| 99精品视频中文字幕| 7799精品视频| 国产精品午夜在线| 日韩国产精品久久| 懂色av一区二区三区免费观看| 91亚洲午夜精品久久久久久| 91精品国产品国语在线不卡| 国产精品素人一区二区| 亚洲综合视频在线| 亚洲黄色片在线观看| 天堂va蜜桃一区二区三区漫画版| 蜜桃av一区二区三区| 国产成人免费av在线| 91国产福利在线| 日韩视频在线一区二区| 中文字幕av一区二区三区免费看| 日韩美女视频19| 久久精品国产秦先生| 成人激情图片网| 91亚洲精品久久久蜜桃网站| 日韩视频中午一区| 亚洲乱码日产精品bd| 蜜桃视频第一区免费观看| 成人中文字幕电影| 欧美福利一区二区| 精品动漫一区二区三区在线观看| 亚洲欧美电影院| 成人免费高清视频在线观看| 欧美精品v国产精品v日韩精品| 成人涩涩免费视频| 国产伦精品一区二区三区免费迷| 国产宾馆实践打屁股91| 欧美成人精品福利| 午夜精品成人在线| 欧美精品色一区二区三区| 亚洲欧美另类久久久精品2019| 奇米888四色在线精品| 欧美嫩在线观看| 亚洲国产精品一区二区尤物区| 日本道在线观看一区二区| 亚洲私人黄色宅男| 色婷婷av一区二区三区大白胸| 欧美国产日韩精品免费观看| 国产黄人亚洲片| 国产亚洲一区字幕| 国产精品77777竹菊影视小说| 91麻豆精品国产91久久久久久久久 | 91国内精品野花午夜精品| 国产精品不卡一区| 国产91精品一区二区| 久久久亚洲午夜电影| 韩国女主播成人在线观看| 精品国产在天天线2019| 国产99久久久精品| 国产精品丝袜在线| 3d成人h动漫网站入口| 日韩电影免费在线看| av激情综合网| 亚洲午夜久久久久久久久久久| 色94色欧美sute亚洲线路一久| 日韩专区欧美专区| 久久这里只精品最新地址| 成人av网址在线观看| 中文字幕一区二区三区精华液| 在线视频一区二区三| 男男视频亚洲欧美| 久久你懂得1024| 欧美吞精做爰啪啪高潮| 日本91福利区| 亚洲视频电影在线| 欧美日韩免费观看一区三区| 国产精品夜夜嗨| 亚洲丝袜另类动漫二区| 在线成人免费观看| 国产在线一区观看| 亚洲免费观看视频| 91精品在线观看入口| 天堂成人免费av电影一区| 欧美性色综合网| 国产在线国偷精品产拍免费yy| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 亚洲婷婷国产精品电影人久久| 在线看国产日韩| 麻豆精品国产传媒mv男同| 中文字幕精品一区二区三区精品| 欧美性一区二区| 国产精品综合网| 亚洲成人综合在线| 欧美精品一区二区久久婷婷| yourporn久久国产精品| 免费成人在线播放| 国产精品久久久久9999吃药| 欧美日韩高清一区| 国产精品正在播放| 五月天婷婷综合| 国产精品卡一卡二| 日韩午夜在线播放| 色婷婷亚洲一区二区三区| 亚洲一区二区三区四区中文字幕| 欧美一区二区三区的| www.亚洲激情.com| 国产乱人伦精品一区二区在线观看 | 一区二区在线观看免费视频播放 | 蜜臀国产一区二区三区在线播放 | 丝袜亚洲另类丝袜在线| 欧美国产日产图区| 日韩免费电影一区| 大胆亚洲人体视频| 日韩不卡手机在线v区| 久久女同互慰一区二区三区| 欧美日韩国产中文| 一本一本久久a久久精品综合麻豆| 国产一区 二区| 麻豆国产精品视频| 亚洲免费观看高清完整版在线| 久久久久久亚洲综合| 欧美电影一区二区| 在线亚洲人成电影网站色www| 国产91综合网| 国产米奇在线777精品观看| 青青草国产成人99久久| 调教+趴+乳夹+国产+精品| 国产精品国产馆在线真实露脸| 884aa四虎影成人精品一区| 欧美日韩国产经典色站一区二区三区| 91在线国内视频| 91在线国产观看| 成熟亚洲日本毛茸茸凸凹| 亚洲黄一区二区三区| 亚洲美女屁股眼交| 亚洲色图在线看| 亚洲午夜免费电影| 午夜精品福利视频网站| 国产在线一区观看| 国产精品乡下勾搭老头1| 成人动漫一区二区三区| www.欧美亚洲| 色综合欧美在线视频区| 欧美日韩国产一级二级| 欧美日本韩国一区二区三区视频 | 欧美岛国在线观看| 欧美日本一区二区| 欧美xxxx老人做受| 精品国产91乱码一区二区三区| 欧美一区二区啪啪| 欧美r级电影在线观看| 国产视频一区在线播放| 国产精品色在线| 最新国产精品久久精品| 亚洲综合免费观看高清完整版| 亚洲成年人影院| 久久精品国产亚洲aⅴ| 韩国v欧美v日本v亚洲v| 国产成人午夜电影网| 96av麻豆蜜桃一区二区| 欧美日韩一区久久| 6080午夜不卡| 欧美一区二区精品在线| 在线观看欧美精品| 欧美电影影音先锋| 久久久久国产精品免费免费搜索| 国产日韩欧美a| 亚洲一区二区三区四区五区中文| 日韩国产欧美在线视频| 国产大陆亚洲精品国产| 在线视频综合导航| 日韩欧美国产成人一区二区| 欧美极品另类videosde| 亚洲最快最全在线视频| 久久精品久久99精品久久| 精品一区二区免费| 成人涩涩免费视频| 色乱码一区二区三区88| 日韩欧美亚洲另类制服综合在线| 亚洲欧洲国产日韩| 国产激情视频一区二区在线观看 | 国产成人综合亚洲91猫咪| 国产福利一区二区三区视频| 91九色02白丝porn| 久久青草欧美一区二区三区| 五月婷婷激情综合网| av激情亚洲男人天堂| 久久综合色鬼综合色| 午夜伊人狠狠久久| 国产91丝袜在线播放0| 欧美裸体bbwbbwbbw| 日韩一区在线看| 国产一区久久久| 91精品久久久久久久91蜜桃| 中文字幕一区二区三区乱码在线| 另类小说一区二区三区| 欧美午夜精品免费| 国产精品视频一二| 国产精品小仙女|