Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.wintindustries.pfserver.uploads; import com.vaadin.ui.ProgressBar; /** * * @author Admin */ public class PFUploadProgress { public final int kUPLOADPROGRESS_UNDEFINED = 1; public final int kUPLOADPROGRESS_IN_QUEUE = 2; public final int kUPLOADPROGRESS_UPLOADING = 3; public final int kUPLOADPROGRESS_DONE = 0; public final int kUPLOADPROGRESS_ERROR = -1; private ProgressBar progressbar; private float progress = 0; private int progressState; private String errmsg; private String Caption; public PFUploadProgress() { progressbar = new ProgressBar(); progressState = kUPLOADPROGRESS_UNDEFINED; Caption = ""; } public String getCaption() { return Caption; } public void setCaption(String Caption) { this.Caption = Caption; } public void setErrmsg(String errmsg) { this.errmsg = errmsg; } public synchronized ProgressBar getProgressbar() { return progressbar; } public synchronized void setProgress(float progress) { this.progress = progress; progressbar.setValue(progress); } public synchronized float getProgress() { return progress; } public synchronized void setProgressState(int progress) { this.progressState = progress; } public synchronized int getProgressState() { return progressState; } }