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

📄 utility.java

📁 J2ME斜45度游戏引擎
💻 JAVA
字号:
package isoj2me;import java.util.*;import javax.microedition.lcdui.*;/** * <p>isoj2me: Utility</p> * <p>This class contains utility methods.</p> * <p>Copyright: Copyright (c) 2004</p> * <p>License: Lesser GPL (http://www.gnu.org)</p> * <p>Company: <a href=http://www.mondonerd.com target="_blank">Mondonerd.com</a></p> * @author Massimo Maria Avvisati * @version alpha 0.4 */public class Utility {  public Utility() {  }  /**   * This method return an Image loading it from the "hard disk" of the mobile phone (from the standard directory) or, if the image was already loaded, it return an image took from an hashtable   * @param imageCode alphanumeric code for this image (filename)   * @param imagesHash where to store Image objects   * @return the requested Image   */  public static Image loadImage(String imageCode, Hashtable imagesHash) {    if (imagesHash.containsKey(imageCode)) {      return (Image) imagesHash.get(imageCode);    }    else {      try {	Image temp_image = Image.createImage("/" + imageCode + ".png");	imagesHash.put(imageCode, temp_image);	return (Image) imagesHash.get(imageCode);      }      catch (Exception ex) {	System.out.println("loadImage Error can't load " + imageCode + ":" + ex);      }    }    return null;  }}

⌨️ 快捷键说明

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