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

📄 transientpopulationresults.java

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

import javax.microedition.lcdui.*;

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

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

public class TransientPopulationResults
    extends Form
    implements CommandListener, ItemCommandListener {

  private final static String[] strTPopulTitle = {
      "暂住证号", "姓名","身份证号","外号","暂住证有效期", "暂住人员归属管辖辖区","暂住人员单位","重要经历", "照片", "其它"};
  private final static String[] strTPopulRst = {
      "A26534321", "王海","44030411041976050956153","无","20070101", "南昌市","铁道建工2处","", "", "无"};
  public final int[] intSpaPos = {
      7,8};

  Image bmpDriverKill = null;
  public String strDriverKillPic = "/img/TPopulfic/TPopulfic.png";
  Image bmpPolice = null;
  public String strPath = "/img/police.png";
  Form dispTishiForm = null;
  StringItem[] itemLinkPic = {
      null,null};
  public String[] strItemLinkInf = {
      "简介","照片"};
  IntegratedInfMenu parent;

  public TransientPopulationResults(IntegratedInfMenu ItemsCon) {
    super("暂住人口查询结果");
    parent = ItemsCon;
    try {
      jbInit();
    }
    catch (Exception e) {
      e.printStackTrace();
    }
  }

  private void jbInit() {
    try {
      bmpPolice = Image.createImage(strPath);
      this.append(bmpPolice);
    }
    catch (Exception e1) {
      e1.printStackTrace();
    }
    String strTemp = "";
    int k = 0;
    for (int i = 0; i < strTPopulTitle.length; i++) {
      strTemp = strTPopulTitle[i] + ":" + strTPopulRst[i];
      int j = 0;
      for (j = 0; j < intSpaPos.length; j++) {
        if (i == intSpaPos[j]) {
          break;
        }
      }
      if (j >= intSpaPos.length) {
        this.append(new StringItem(strTPopulTitle[i] + ":", strTPopulRst[i]));
      }
      else {
        strTemp = strTPopulTitle[i] + strTPopulRst[i];
        itemLinkPic[k] = new StringItem(strTemp, strItemLinkInf[k],
                                        Item.HYPERLINK);
        itemLinkPic[k].setDefaultCommand(Resources.Cmd_Help);
        itemLinkPic[k].setItemCommandListener(this);
        this.append(itemLinkPic[k]);
        k++;
      }
    }
    this.addCommand(Resources.Cmd_Back);
    setCommandListener(this);
  }

  public void commandAction(Command c, Item item) {
    if (c == Resources.Cmd_Help) {
      if (itemLinkPic[0] == item) { //"详情"
        dispTishiForm = new Form(strItemLinkInf[0]);
        try {
          dispTishiForm.append(bmpDriverKill = Image.createImage(strDriverKillPic));
        }
        catch (Exception e) {
          e.printStackTrace();
        }
        dispTishiForm.addCommand(Resources.Cmd_Queren);
        dispTishiForm.setCommandListener(this);
        Display.getDisplay(PoliceMain.instance).setCurrent(dispTishiForm);
      } //1
    } //end c ==
  }

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

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

}

⌨️ 快捷键说明

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