/** * Erstelle das GUI zum Prozessschritt "Ausgabe" * * @author Florian Stier */ private void generateUi() { progressIndicator = new ProgressIndicator(); progressIndicator.setIndeterminate(true); progressIndicator.setEnabled(true); progressIndicator.setStyleName("bar"); progressIndicator.setCaption("Berechne.."); vl.addComponent(progressIndicator); vl.setComponentAlignment(progressIndicator, Alignment.MIDDLE_CENTER); this.setContent(vl); this.setStyleName("borderless light"); this.setSizeFull(); }
/** * Erstelle das GUI zum Prozessschritt "Ausgabe" * * @author Florian Stier */ private void generateUi() { progressIndicator = new ProgressIndicator(); progressIndicator.setIndeterminate(true); progressIndicator.setEnabled(true); progressIndicator.setStyleName("bar"); progressIndicator.setCaption("Berechne.."); addComponent(progressIndicator); setComponentAlignment(progressIndicator, Alignment.MIDDLE_CENTER); // addComponent(vl); setStyleName("borderless light"); setWidth(95, UNITS_PERCENTAGE); setHeight(100, UNITS_PERCENTAGE); setStyleName("projectDetailsLayout"); }
public void uploadStarted(StartedEvent event) { removeAllComponents(); // Visible components are replaced by a progress bar this.progressIndicator = new ProgressIndicator(); progressIndicator.setPollingInterval(500); addComponent(progressIndicator); setComponentAlignment(progressIndicator, Alignment.MIDDLE_CENTER); for (StartedListener startedListener : startedListeners) { startedListener.uploadStarted(event); } }
@Override public void shapeFileUploadedEvent(final String filename, final ByteArrayInputStream input) { final Window modal = new Window("Wait"); final Window mainWindow = (ExpressZipWindow) setupMapView.getApplication().getMainWindow(); final SetupMapPresenter presenter = this; Thread spinner = new Thread(new Runnable() { public void run() { ProgressIndicator pi = new ProgressIndicator(); pi.setCaption("Processing Shapefile..."); modal.setModal(true); modal.setClosable(false); modal.setResizable(false); modal.getContent().setSizeUndefined(); // trick to size around content modal.getContent().addComponent(pi); modal.setWidth(modal.getWidth(), modal.getWidthUnits()); mainWindow.addWindow(modal); VectorLayer uploadedShapeFile = setupMapModel.shapeFileUploaded(filename, input); if (uploadedShapeFile != null) { shapeFileLayer = uploadedShapeFile; mapModel.addVectorLayer(shapeFileLayer); setupMapView.updateShapeLayer(shapeFileLayer); mapModel.updateOpenLayersMap(); Bounds shpFileBounds = shapeFileLayer.getBoundsForLayer(mapModel.getCurrentProjection()); resetExtentLayer(shpFileBounds, presenter); map.addLayer(boundingBoxLayer); } mainWindow.removeWindow(modal); } }); spinner.start(); }