当前位置:首页 » 编程博文
开发技术指南» 文章正文
    引言: 在SUN的技术文章里面有一篇文章讲述了如何基于MIDP1.0实现动画,个人觉得很不错。
 

 

    摘要:rwservlet command: help showenv showjobs showmap showmyjobs showjobid killjobid parsequery showauth delauth getjobid getserverinfo to get help on how to use rwservlet comman......
    摘要:今天抽了点时间,写了这个软件,希望对搞财务的有点帮助.在填写报销单时可能也用得上 ^_^ (一般有很大数字要报吗?) 这里我在示例程序里面计算了一个π值 我真不知道要把软件放到csdn的什么地方,唉... csdn的blog可不可以存放一般文件呢? ......


基于MIDP1.0实现动画效果
        在sun的技术文章里面有一篇文章讲述了如何基于midp1.0实现动画,个人觉得很不错.在midp1.0中并为直接对动画提供支持,如果我们明白动画的原理,熟悉timer与timertask的话实现动画并非很困难的事情.

       动画实际上就是一系列连续的帧,当他们变换的足够快的时候,我们人的眼睛就会觉得他是运动的.所以如果我们能够周期性的切换画面,从第一帧到第二帧到第三帧 ......那么我们就可以制作出动画的效果了.timer与timertask正好可以很好的帮我们完成这一功能,如果你还不熟悉这两个类可以参考使用java中的timer与timertask.我们首先扩展timertask实现animatedimage类,它的功能就是在特定位置画图

import javax.microedition.lcdui.*; 【程序编程相关:关键字:"存储过程分页&quo

import java.util.*; 【推荐阅读:指定选取textarea的特定行

// of images of equal size which are drawn in turn 【扩展信息:管理故事216之019-孤独夺去了他的生

// defines an animated image, which is just a set

// to simulate movement.

public class animatedimage extends timertask

{

    private canvas canvas;

    private image[] images;

    private int[][] cliplist;

    private int current;

    private int x;

    private int y;

    private int w;

    private int h;

    // construct an animation with no canvas.

    public animatedimage(image[] images)

    {

        this(null, images, null);

    }

    // construct an animation with a null clip list.

    public animatedimage(canvas canvas, image[] images)

    {

        this(canvas, images, null);

    }

    // construct an animation. the canvas can be null, but

    // if not null then a repaint will be triggered on it

    // each time the image changes due to a timer event.

    // if a clip list is specified, the image is drawn

    // multiple times, each time with a different clip

    // rectangle, to simulate transparent parts.

    public animatedimage(canvas canvas, image[] images, int[][] cliplist)

    {

        this.canvas = canvas;

        this.images = images;

        this.cliplist = cliplist;


...   下一页
    摘要:1. deploy a rep into report deployment path defined in sourcedir in <oracle_home>\reports\conf\<repserver>.conf 2. make sure the rep can print correctly 3. define two environment ids in ......
» 本期热门文章:

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