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

📄 helpdisplayform.java

📁 相册是J2me MIDLet 的一个demo程序
💻 JAVA
字号:
/*
 *  
 *  Filename: HelpDisplayForm.java
 *  - contains definition of the class HelpDisplayForm, which is a Form containing Help Info for user to see
 *  when Help function is selected. 
 *
 *  Application Name: Image Album Demo 
 *  Version: 2.0
 *  Release Date: 27th September, 2002
 *  Author:	Edmund Wong, Application Engineer, Metrowerks Hong Kong
 *
 *
 *  (c) Copyright. 2002. Metrowerks Corp. ALL RIGHTS RESERVED.
 *	This code is provided "AS IS" without warranty of any kind and subject to Metrowerks Sample Application
 *  End User License Agreement. NO EXTERNAL DISTRIBUTION OR COMMERCIALIZATION OF THE SOFTWARE IS PERMITTED 
 *  EXCEPT BY WRITTEN AGREEMENT OF METROWERKS."
 */

import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import java.util.*;
import java.io.*;


	

public class HelpDisplayForm extends Form implements CommandListener{

	ImageAlbum imageAlbumReference;
	
	/**
     * Create reference for ticker to be used in Help
     */
     
    public Ticker tickerHelp = new Ticker("Use UP and DOWN keys for browsing through the HELP information!");
     
	
	
	public HelpDisplayForm(ImageAlbum imageAlbumReference) {
	
	super("Help");
	
	this.imageAlbumReference = imageAlbumReference;
		
	    
		/**
     	* Add items for the Help Display Form
     	*/
     	
		append(new StringItem("Introduction","\n Image Album is a J2ME MIDlet demo program for allowing users to view image on J2ME enabled handset. It allows users to download PNG format images from web server over-the-air (OTA) and add their own descriptions to images. It also allows users to add their own PNG image files to the ablum by just including them in the ImageAlbum.jar file without the need of changing source code.\n\n"));
		
		append(new StringItem("How to download Image from web server?","\n User can select Download from specified URL Command from Main Menu to download PNG image from web server over-the-air (OTA). You can enter the URL (Universal Resource Locator) in the text box shown and choose 'Get Image' Command to start getting the image. You will then see the downloaded image on screen, you will need to choose 'Save Image' command in order to save image into the persistent storage on phone. When image is saved, the correspoding URL is saved as the default description for this image. You can edit the description to your own description in the text box in 'Image Save OK!' screen and choose 'Save description' Command to save it.\n\n"));
				
		append(new StringItem("How to add Image in JAR package?","\n Users can add PNG image files to the album by naming the files in numbers (i.e. 1.png,2.png,3.png,....) that are not used by other PNG image files, and then put them in the ImageAlbum.jar file (can be done by CodeWarrior Wireless Studio). The PNG files must be numbered in a consecutive sequence.\n\n"));
		
		append(new StringItem("View Album","\n You can select View Album from Main Menu to view the images one by one with pace at your control. You can browse through the Image Album forward and backward by pressing keys shown below or using the command shown on the menu. You can also scroll the image showing on screen using methods below:\n  on touch screen phone: scroll to view large image -  by pointer drag action, navigate to previous image - pressing navigation key UP or LEFT, navigate to next image - pressing navigation key DOWN or RIGHT\n on non-touch screen phone: scroll to view large image - using navigation key UP,DOWN,LEFT,RIGHT, navigate to previous image - pressing KEYPAD KEY '1', navigate to next image - pressing KEYPAD KEY '3'\n You can also choose command 'Edit description' on menu during viewing Album for editing description of currently showing image. Choose command 'Delete Image' to delete currently showing image. (Only image downloaded Over-the-air can be deleted, image in JAR package CANNOT be deleted.) \n\n"));
		
		append(new StringItem("Slide Show","\n You can select Slide Show from Main Menu to view the images in the Image Album one by one without the need to press any key. It will change to next image in the album automatically at the time interval that you can preset in 'Options'. You can also pause or continue the slide show using commands on screen \n\n"));
		
		append(new StringItem("Image Database Status Information","\n You can select this Command from Main Menu to see the following information:\n 1. Total no. of images stored in the Image Album.\n 2. No. of images in the Image Album JAR package.\n 3. No. of images saved in Record Store (persistent storage) of phone.\n 4. Memory of Record Store used for storing images.\n 5. Memory of Record Store used for storing descriptions.\n 6. Available memory in Record Store.\n\n"));
				
		append(new StringItem("Options","\n You can choose loop back to first image or not to loop back during navigating through the album by checking or unchecking the 'Looping?' check box. You can also preset the time interval between consecutive images during Slide Show here. Default is set to 3 seconds. \n\n"));
		
		append(new StringItem("About Image Album","\n You can check the Image Album version number by selecting this command."));
	
	
	   /**
     	* Add command and ticker for the Help Display Form
     	*/
     	
     	addCommand(ImageAlbum.mainMenuCommand);
     	
     	setCommandListener(this);
     	
     	setTicker(tickerHelp);
	
	}
	
	/**
     * Implementation for CommandListener
     */
     
    public void commandAction(Command c, Displayable s) {

	if (c==ImageAlbum.mainMenuCommand) {
	
	ImageAlbum.myDisplay.setCurrent(imageAlbumReference.selectList);
	
	}	
	
	}
} 

	

⌨️ 快捷键说明

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