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

📄 readermidlet.java

📁 初学者的佳音 初学者的佳音 初学者的佳音
💻 JAVA
字号:
package x;

import java.util.Hashtable;
import java.util.Vector;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;


public class ReaderMIDlet extends MIDlet{
   public static ReaderMIDlet instance=null;
  
   
   public static Vector vector=new Vector();
   public static Vector fictons=new Vector();
   public static String tableName="main_menu",strCurrTable=null,strPreTable=null;
  	
   // Image keys
   private static final int OFFSET_IMG          = 100;
   public static final int IMG_BACKGROUND       = 100;
   public static final int IMG_PROXY_ON         = 101;
   public static final int IMG_PROXY_OFF        = 102;
    
   Display d=Display.getDisplay(this);
   // Resource string keys
   public  static final String LIST ="http://127.0.0.1:8080/tom/list.xml";
   
    public ReaderMIDlet(){
    	
    	instance=this;
    	
    }
    public void destroyApp(boolean arg0) throws MIDletStateChangeException {
		
		
	}

    public void pauseApp() {
		
		
	}

    public void startApp() throws MIDletStateChangeException {
		  
		  
		   downLoadForm df=new downLoadForm(this);
//		   mainCanvas mc=new mainCanvas(Resources.tableName);
		   
		   
		   d.setCurrent(df);

		
	}
    public static void quitApp(){
		try
		{
		  	instance.destroyApp(true);
			instance.notifyDestroyed();
			instance=null;
		}
		catch(Exception e)
		{}
		
	}
	 protected static final char[][] TEXTBUF = {
		    "http://127.0.0.1:8080/tom/list.xml".toCharArray(),
		    "My Feeds".toCharArray(),
		    "锟斤拷锟斤拷".toCharArray(),
		    "统锟斤拷".toCharArray(),

		   
		    
		    "确锟斤拷".toCharArray(),
		    "取锟斤拷".toCharArray(),
		    "锟斤拷锟斤拷".toCharArray(),
		    "锟斤拷锟斤拷".toCharArray(),
		    "刷锟斤拷".toCharArray(),

		   
		    

		    
		  };
		  
		  /** Image cache */
		  protected static Hashtable m_images = new Hashtable();
	 
	
	
	protected static final String[] IMGNAME_MAP ={
		    "back.png",
		    "back.png",
		    "back.png",
		  };
	 public static char[] getChars(int id)
	  {
	    return TEXTBUF[id];
	  }
	  
	  
	  public static String getString(int id)
	  {
	    return new String(getChars(id));
	  }
	  
	  
	  public static synchronized Image getImage(int id)
	  {
	    id -= OFFSET_IMG;
	    Image img = (Image)m_images.get(new Integer(id));
	    if (img == null)
	    {
	      try
	      {
			  
	        img = Image.createImage("/" + IMGNAME_MAP[id]);
			System.out.println("get image:" + IMGNAME_MAP[id]);
	        m_images.put(new Integer(id), img);
	      }
	      catch (Exception e)
	      {
	        System.out.println("Error getting resource img " + IMGNAME_MAP[id]
	           + ">>" + e.getMessage());
	        e.printStackTrace();
	      }
	    }
	    return img;
	  }
}

⌨️ 快捷键说明

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