当前位置:首页 » 编程博文
开发技术指南» 文章正文
    引言: 在MIDP中没有提供Dialog组件,但是提供了一个Alert。
 

 

 ·mfc的子类化技术    »显示摘要«
    摘要: windows是一个基于消息的系统,消息在windows的对象之间进行着传递。子类化和windows的钩子机制存在于消息系统之中,我们可以利用这些机制来操纵、修改甚至丢弃那些在操作系统或是进程中传递的消息,以求改变系统的一些行为。子类化技术用来截取窗口或控件之间的消息,当然是消息在到达目的窗口之前完成的操作。这些被截获的消息既可以保留也可以修改它们的状态,之后就继续发送到目的地。子类化技术实现了......
    摘要:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 服务端\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\1.oracle中创建表 登陆system/manager create table customer( custid integer, custname varchar(20), memo varchar......


基于MIDP实现Dialog组件

      在midp中没有提供dialog组件,但是提供了一个alert.alert的功能有限,因此写一个dialog组件是非常有必要的.本文将提供一个基于midp的dialog组件,你可以在应用程序中使用它,功能强大且非常方便.

      首先我们写一个抽象类dialog,内容如下/* * created on 2004-7-10 * * todo to change the template for this generated file go to * window - preferences - java - code style - code templates */ 【程序编程相关:简单客户系统的权限控制实现

      当我们开发应用程序的时候,有的时候需要询问用户是不是要继续下面的操作,比如删除一个电话号码,然后根据用户的不同的动作进入不同的流程.这时候我们需要一个像样的dialog组件,很遗憾midp中并没有提供,但是我们可以用canvas自己写一个.下面将简单介绍这个组件的设计,然后给出测试的midlet的源代码.希望对读者有帮助! 【推荐阅读:编程手记之ANSI C篇-(一)通用连接

import javax.microedition.lcdui.*; 【扩展信息:如何建立一个带登陆页面及角色的Strut

/** * @author p2800 *  * todo to change the template for this generated type comment go to window - * preferences - java - code style - code templates */

//the base class for a set of general-purpose//dialogs. to use, create a concrete instance//of this class, set the dialog listener,//and then call display.

public abstract class dialog{    protected display display;    protected dialoglistener listener;    protected displayable restore;    private int eventid;

    protected dialog(display display)    {        this.display = display;    }

    /**     * @return returns the eventid.     */    public int geteventid()    {        return eventid;    }

    /**     * @param eventid     *            the eventid to set.     */    public void seteventid(int eventid)    {        this.eventid = eventid;    }

    // dismisses the dialog, restoring the old    // displayable, if any. this is normally done    // by the dialog itself in response to commands,    // but can also be called by the application    // in response to some other event, such as a    // timer expiration. the code is passed directly    // to the dialog listener, if any.


...   下一页
    摘要:1。用分隔符隔开的字符串表示节点路径信息(bcb)。思考原因,一些简单的参数,如果嵌套的比较深入的话,如果用一般xml处理的方法,逐步深入,需要定义好些变量,太麻烦。 假设xml文件为 <xnetconfig> <localname>ohahu</localname> <port>6800</port> <maxclient>......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE