/** Draws the background annoations. */ private void draw( final ExecutionUnit process, final Graphics2D g2, final ProcessRendererModel rendererModel, final boolean printing) { if (!visualizer.isActive()) { return; } // background annotations WorkflowAnnotations annotations = rendererModel.getProcessAnnotations(process); if (annotations != null) { for (WorkflowAnnotation anno : annotations.getAnnotationsDrawOrder()) { // selected is drawn by highlight decorator if (anno.equals(model.getSelected())) { continue; } // paint the annotation itself Graphics2D g2P = (Graphics2D) g2.create(); drawer.drawAnnotation(anno, g2P, printing); g2P.dispose(); } } }
/** Draws the annotation for the given operator (if he has one). */ private void drawOpAnno( final Operator operator, final Graphics2D g2, final ProcessRendererModel rendererModel, final boolean printing) { WorkflowAnnotations annotations = rendererModel.getOperatorAnnotations(operator); if (annotations == null) { return; } for (WorkflowAnnotation anno : annotations.getAnnotationsDrawOrder()) { // selected is drawn by highlight decorator if (anno.equals(model.getSelected())) { continue; } // paint the annotation itself Graphics2D g2P = (Graphics2D) g2.create(); drawer.drawAnnotation(anno, g2P, printing); g2P.dispose(); } }