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

📄 bloglinesmobile.java

📁 J2me应用开发经典例子
💻 JAVA
字号:
// Copyright (c) 2005 Sony Ericsson Mobile Communications AB
//
// This software is provided "AS IS," without a warranty of any kind. 
// ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, 
// INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A 
// PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. 
//
// THIS SOFTWARE IS COMPLEMENTARY OF JAYWAY AB (www.jayway.se)
/*///////////////////////////////////////////////////////////////////////////////
//bloglinesMobileBuddy文档生成日期:2005.12.24
//
//(1)概述:
//类名称:BloglinesMobile
//类说明:
//	midlet的主入口。
  
//所在子系统:bloglinesMobileBuddy
//
//系统总描述:
	    我们提供的bloglines Mobile Buddy J2ME版本 就是这么一种概念:
		一个可以下载到手机(例如Nokia7610已经确实可以下载安装并运行)的Java应用程序。

	 子系统描述:
		下面介绍bloglines Mobile Buddy的功能列表:
			配置Bloglines帐户信息
	        My Feeds 
	        系统设置
	        关于
	        退出

//(2)历史记录:
//创建人: 郑昀(2005.12.24)
//联系我: Google Talk >> zhengyun@gmail.com
//Blogs:    http://blog.csdn.net/zhengyun_ustc/以及http://www.cnblogs.com/zhengyun_ustc

//(3)版权声明:
//我这个版本的j2me客户端代码受GPL协议保护,允许您自由修改,但不得用于商业用途,除非得到本人的授权。

//(4)相关资源:
1:《[J2ME]Bloglines手机伴侣 开源说明》
2: 下载手机客户端:
3:下载源代码:
////////////////////////////////////////////////////////////////////*/

package com.ultrapower;

import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.AlertType;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

/**
 * The BloglinesMobile MIDlet.
 * @author Peter Andersson
 */
public class BloglinesMobile extends MIDlet
{
  /** Initialization flag */
  protected boolean m_init = false;
  
  private Display display;
  
  /**
   * Initializes the Bloglines facade.
   */
  protected void startApp() throws MIDletStateChangeException
  {
    if (!m_init)
    {
		try
		{
		      m_init = true;
		      Bloglines.init(this, Display.getDisplay(this));
		}
		catch(Exception exc)
		{
			setCurrent(
				new Alert(
						"初始化错误", 
						"错误原因为:"
								+ exc.getMessage() + "/" + exc.getClass(),
								null, AlertType.ERROR));
		}
    }
  }

  protected void pauseApp() {}

  protected void destroyApp(boolean force) throws MIDletStateChangeException
  {
    // Try to save game before exiting
    //Bloglines.exitGame();
  }
  
  /**********************************************************
	//	 
	 * BloglinesMobile::setCurrent()
	//
	//	 Description:
	//	  设置当前显示的界面
	//
	//	 Parameters:
	//	 Return Values:
	//	 Author:
	//	      zhengyun@ultrapower 2005.12.22
	//
	**********************************************************/
	public void setCurrent(Displayable disp){
		display.setCurrent(disp);
	}	
	public void setCurrent(Alert alert, Displayable disp){
		display.setCurrent(alert, disp);
  }
	
	public Displayable getCurrent(){
		return display.getCurrent();
  }
}

⌨️ 快捷键说明

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