public void setBufferedImage ( BufferedImage img , String statusMessage ) { legend = statusMessage ; centerWhenScaled = true ; Dimension dim = getSize ( ) ; sclPic . setScaleSize ( dim ) ; SourcePicture source = new SourcePicture ( ) ; source . setSourceBufferedImage ( img , statusMessage ) ; sclPic . setSourcePicture ( source ) ; if ( ! scaleToFit ) sclPic . setScaleFactor ( 1.0 ) ; sclPic . scalePicture ( ) ; repaint ( ) ; }
sets the buffered image directly .