about.java

来自「JAVA手机的电子书编辑器以及阅读器」· Java 代码 · 共 62 行

JAVA
62
字号
/* * @(#)About.java	1.18 03/12/11 * * Copyright (c) 2000-2003 Sun Microsystems, Inc. All rights reserved.  * PROPRIETARY/CONFIDENTIAL * Use is subject to license terms */package com.zmc.ebook.reader;import javax.microedition.lcdui.*;/** * Typical about box with a string and an image. * In this case the Sun copyright and logo. */public class About {    /** Copyright notice */    private static String copyright =        "Copyright 2004 ZMC. All rights reserved.\n"      + "电子书阅读器.\n";    /** the previous screen to go back to */    private Displayable previous;    /**     * Do not allow anyone to create this class     */    private About() {};    /**     * Put up the About box and when the user click ok return     * to the previous screen.     * @param display The <code>Display</code> to return to when the     *                 about screen is dismissed.     */    public static void showAbout(Display display) {	Alert alert = new Alert("About eBook Reader");	alert.setTimeout(Alert.FOREVER);	if (display.numColors() > 2) {	    String icon = (display.isColor()) ?		"/icons/JavaPowered-8.png" : "/icons/JavaPowered-2.png";	    try {	        Image image = Image.createImage(icon);		alert.setImage(image);	    } catch (java.io.IOException x) {		// just don't append the image.	    }	}	// Add the copyright	alert.setString(copyright);	display.setCurrent(alert);    }}

⌨️ 快捷键说明

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