public void complete() { delegate.progress(start + amount); progress = 100.0f; }
public void progress(float progress) { delegate.progress(progress); }
/** * @param progress * @param writer */ private void reportProgress(float progress, ImageWriter writer) { monitor.progress(progress); if (monitor.isCanceled()) writer.abort(); }
/** * @param progress * @param writer */ private void reportProgress(float progress, ImageReader reader) { monitor.progress(progress); if (monitor.isCanceled()) reader.abort(); } }
public void visitItem(Object item) { SimpleFeature feature = null; try { feature = (SimpleFeature) item; visitor.visit(feature); } catch (Throwable t) { progress.exceptionOccurred(t); String fid = feature == null ? "feature" : feature.getIdentifier().toString(); problem[0] = new IOException("Problem visiting " + fid + ":" + t, t); } finally { progress.progress(count / size); } } });
monitor.progress(progress);
public void complete() { delegate.progress( start + amount ); progress = 100.0f; } public float getProgress() {
public void progress( float progress) { delegate.progress( progress ); }
visitor.visit(feature); if (size > 0) { progress.progress(position++ / size);
monitor.progress(scale * counter++); result.add(feature);
while (reader.hasNext()) { SimpleFeature feature = null; if (size > 0) progress.progress(position++ / size); try { feature = reader.next();
monitor.progress(progress);
progressListener.progress(done / count);
@Override public void progress(final String pId, final Double progress) { if (pId.equals(pid)) { listener.progress(progress.floatValue()); } if (listener.isCanceled()) { doneSignal.countDown(); } }
monitor.progress(scale * counter++);
/** * @param progress * @param writer * */ private void reportProgress(float progress, ImageReader reader) { monitor.progress(progress); if(monitor.isCanceled()) reader.abort(); }
/** * @param progress * @param writer * */ private void reportProgress(float progress, ImageWriter writer) { monitor.progress(progress); if(monitor.isCanceled()) writer.abort(); }
public void visitItem(Object item) { try { SimpleFeature feature = (SimpleFeature) item; visitor.visit(feature); } catch (Throwable t) { progress.exceptionOccurred(t); } finally { progress.progress(count / size); } } });
@DescribeResult(name="result") public SimpleFeatureCollection execute(@DescribeParameter(name = "id") String id, ProgressListener listener) throws Exception { while (true) { Command command = getCommandQueue(id).take(); if (command.type == CommandType.Exit) { commands.remove(id); return (SimpleFeatureCollection) command.value; } else if (command.type == CommandType.SetProgress) { listener.progress(((Number) command.value).floatValue()); } else { ProcessException exception = (ProcessException) command.value; listener.exceptionOccurred(exception); throw exception; } } }
public void getNotification(ProcessingEvent event) { listener.setTask(new SimpleInternationalString(event.getMessage())); if (event.getPercentage() >= 0) { listener.progress((float) event.getPercentage()); } // stop requested? if (listener.isCanceled()) { oef.stopThread(); } }