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

📄 progressevent.java

📁 openmap java写的开源数字地图程序. 用applet实现,可以像google map 那样放大缩小地图.
💻 JAVA
字号:
// **********************************************************************// // <copyright>// //  BBN Technologies//  10 Moulton Street//  Cambridge, MA 02138//  (617) 873-8000// //  Copyright (C) BBNT Solutions LLC. All rights reserved.// // </copyright>// **********************************************************************// // $Source: /cvs/distapps/openmap/src/openmap/com/bbn/openmap/event/ProgressEvent.java,v $// $RCSfile: ProgressEvent.java,v $// $Revision: 1.3.2.1 $// $Date: 2004/10/14 18:26:46 $// $Author: dietrick $// // **********************************************************************package com.bbn.openmap.event;/** * An event that provides information on progress on a certain task. */public class ProgressEvent extends java.util.EventObject {    /**     * Progress event type, start process.     */    public static final int START = 0;    /**     * Progress event type, update of current process.     */    public static final int UPDATE = 1;    /**     * Progress event type, notification of process completion.     */    public static final int DONE = 2;    protected float finishedValue = 0;    protected float currentValue = 0;    protected String taskDescription = "";    protected int type = 0;    /**     * Construct a ProgressEvent.     *      * @param source Object     * @param finishValue the ending value     * @param currentValue the current value     */    public ProgressEvent(Object source, int type, String taskDescription,            float finishValue, float currentValue) {        super(source);        this.finishedValue = finishValue;        this.currentValue = currentValue;        this.taskDescription = taskDescription;        this.type = type;    }    /**     * Get the value that current will have to get to to be finished.     *      * @return finished.     */    public float getFinishedValue() {        return finishedValue;    }    /**     * Get the current value representing progress.     */    public float getCurrentValue() {        return currentValue;    }    /**     * Get a string describing what the task is.     */    public String getTaskDescription() {        return taskDescription;    }    /**     * Provide a percentage of progress completed, or -1 if no     * finished value has been provided.     */    public int getPercentComplete() {        if (finishedValue != 0) {            int ret = (int) (currentValue / finishedValue * 100f);            //          com.bbn.openmap.util.Debug.output("pe.percentComplete:            // " + currentValue + "/" + finishedValue + " = " + ret);            return ret;        } else {            return -1;        }    }    public int getType() {        return type;    }}

⌨️ 快捷键说明

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