contentevent.java

来自「Java p2p程序设计2002年版」· Java 代码 · 共 55 行

JAVA
55 行
字号
/* * ContentEvent.java * * Created on September 2, 2001, 11:35 PM */package com.sams.jxta.updateCMS;/** * * @author  Daniel Brookshier turbogeek@cluck.com * @version  */public class ContentEvent extends java.awt.Event implements java.io.Serializable{   public static final int LOAD_FAIL = 1;   public static final int LOAD_DONE = 2;   public static final int LOAD_PROGRESS = 3;       protected int percentDone;    protected boolean failed;    protected boolean done;   /** Creates new Class */    public ContentEvent(Object target, int id, int percentDone, boolean failed, boolean done) {       super(target,id, null);        this.percentDone = percentDone;       this.failed = failed;       this.done = done;    }    public int getPercentDone(){      return percentDone;    }    public boolean isFail(){      return failed;    }    public boolean isDone(){      return done;    }    public int getId(){       return id;    }    public Object getSource(){       return target;    }    public String toString(){       String idName = null;       switch(getId()){          case LOAD_FAIL: idName = "LOAD_FAIL";break;          case LOAD_DONE: idName = "LOAD_DONE";break;          case LOAD_PROGRESS: idName = "LOAD_PROGRESS";break;       }       return "id:"+idName+", Failed:"+failed+", Done:"+ done;    }// end of  toString()}// end of class ContentEvent

⌨️ 快捷键说明

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