@Override public void put(final RenderingRequest e) throws InterruptedException { // for merge requests just collect the graphics objects and // associated composites if (e instanceof MergeLayersRequest) { final List<LiteFeatureTypeStyle> lftsList = ((MergeLayersRequest) e).lfts; final List<Pair<BufferedImage, Composite>> styleGraphics = new ArrayList<>(); final Graphics2D parentGraphics = ((MergeLayersRequest) e).graphics; for (final LiteFeatureTypeStyle lfts : lftsList) { if ((lfts.graphics instanceof DelayedBackbufferGraphic) && (lfts.graphics != parentGraphics)) { final DelayedBackbufferGraphic styleGraphic = (DelayedBackbufferGraphic) lfts.graphics; if (styleGraphic.image != null) { styleGraphics.add(Pair.of(styleGraphic.image, lfts.composite)); continue; } } // if no style graphic was added, add a null value as a // placeholder in the list styleGraphics.add(null); } compositeGroupGraphicsToStyleGraphicsMapping.put(parentGraphics, styleGraphics); } else if (e instanceof MargeCompositingGroupRequest) { compositeGroupGraphicsToCompositeMapping.put( ((MargeCompositingGroupRequest) e).compositingGroup.graphics, ((MargeCompositingGroupRequest) e).compositingGroup.composite); } else { super.put(e); } }
@Override public void put(RenderingRequest e) throws InterruptedException { if(!renderingStopRequested) { super.put(e); if(renderingStopRequested) { this.clear(); } } }
/** * Builds the blocking queue used to bridge between the data loading thread and * the painting one * @return */ protected BlockingQueue<RenderingRequest> getRequestsQueue() { return new RenderingBlockingQueue(10000); }
@Override public boolean add(RenderingRequest e) { // only really accepts vector paint requests, UTFGrid makes no sense with the other // types // of requests if (e instanceof EndRequest || e instanceof PaintShapeRequest) { return super.add(e); } else { return true; } } }
protected RenderingBlockingQueue getRequestsQueue() { return new RenderingBlockingQueue(1); } };
/** * Builds the blocking queue used to bridge between the data loading thread and the painting one * * @return */ protected BlockingQueue<RenderingRequest> getRequestsQueue() { return new RenderingBlockingQueue(10000); }
@Override public void put(RenderingRequest e) throws InterruptedException { if (!renderingStopRequested) { delegate.put(e); if (renderingStopRequested) { this.clear(); } } }