question: private void drawSelectionRectangle ( Graphics2D g2 ) { if ( this . selectionRectangle != null ) { if ( this . fillSelectionRectangle ) { g2 . setPaint ( this . selectionFillPaint ) ; g2 . fill ( selectionRectangle ) ; } else { g2 . setPaint ( this . selectionOutlinePaint ) ; g2 . draw ( selectionRectangle ) ; } } }
target:  Draws zoom rectangle (if present). The drawing is performed in XOR mode, therefore when this method is called twice in a row, the second call will completely restore the state of the canvas.