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

📄 systemparameter.java

📁 j2me实现的移动警务的大概框架
💻 JAVA
字号:
package PoliceSearch.Com;

import javax.microedition.lcdui.*;

import PoliceSearch.*;
import PoliceSearch.IntegratedInformation.*;

/**
 * <p>Title: 江西公安手机辅助查询系统</p>
 * <p>Description: 章桂华等</p>
 * <p>Copyright: Copyright (c) 2006</p>
 * <p>Company: 个人</p>
 * @author 章桂华等
 * @version 1.0
 */

public class SystemParameter
    extends Form
    implements CommandListener {

  StringBuffer propbuf;
  static boolean firstTime = true;
  IntegratedInfMenu parent;

  public SystemParameter(IntegratedInfMenu ppMenu) {
    super("系统参数结果");
    parent = ppMenu;
    try {
      jbInit();
    }
    catch (Exception e) {
      e.printStackTrace();
    }
  }

  private void jbInit() throws Exception {
    startApp();
  }

  /**
   * Show the value of the properties
   */
  public void startApp() {
    Runtime runtime = Runtime.getRuntime();
    runtime.gc();
    long free = runtime.freeMemory();
    if (firstTime) {
      long total = runtime.totalMemory();
      propbuf = new StringBuffer(50);
      append("Free Memory = " + free + "\n");
      append("Total Memory = " + total + "\n");

      append(showProp("microedition.configuration"));
      append(showProp("microedition.profiles"));
      append(showProp("microedition.platform"));
      append(showProp("microedition.locale"));
      append(showProp("microedition.encoding"));
      addCommand(Resources.Cmd_Back);
      setCommandListener(this);
//          firstTime = false;
    }
    else {
      this.set(0, new StringItem("", "Free Memory = " + free + "\n"));
    }
    Display.getDisplay(PoliceMain.instance).setCurrent(this);
  }

  /**
   * Show a property.
   */
  String showProp(String prop) {
    String value = System.getProperty(prop);
    propbuf.setLength(0);
    propbuf.append(prop);
    propbuf.append(" = ");
    if (value == null) {
      propbuf.append("<undefined>");
    }
    else {
      propbuf.append("\"");
      propbuf.append(value);
      propbuf.append("\"");
    }
    propbuf.append("\n");
    return propbuf.toString();
  }

  public void commandAction(Command c, Displayable d) {
    if (c == Resources.Cmd_Back) {
      parent.display();
    }
  }

  /**
   * 功能:显示当前页面
   */
  public void display() {
    Display.getDisplay(PoliceMain.instance).setCurrent(this);
  }
}

⌨️ 快捷键说明

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