/** * Allow to update the progress status of the current component loading process. As the instance * of TPTLazyLoader is passed to your LazyLoader implementation, you may update the progress from * there. * * @param progress new progress. Must be specified from 0.0 to 1.0, which reflects 0% ... 100% * interval. If set to 0.0, a progress indicator will be swithced to indeterminate mode, * displaying an endless wheel. */ public void setLoadingProgress(float progress) { if (progress == 0.0f) { progressBar.setIndeterminate(true); } else { progressBar.setIndeterminate(false); progressBar.setValue(progress); } }
public UploadUnit( String url, String dbName, String driver, String userName, String password, User user, TabSheet mainTabs, TabSheet subTabs) { this.user = user; this.mainTabs = mainTabs; this.subTabs = subTabs; eh = new ExperimentHandler(url, dbName, driver, userName, password); this.updateComponents(this.user); auth = new Authenticator(url, dbName, driver, userName, password); pi.setValue(0f); pi.setCaption("Loading..."); pi.setVisible(false); }