question: public DeferredImageReplacedElement ( ImageResource imageResource , RepaintListener repaintListener , int w , int h ) { this . _imageResource = imageResource ; _loaded = false ; this . repaintListener = repaintListener ; if ( w == - 1 && h == - 1 ) { _doScaleImage = false ; _targetHeight = 1 ; _targetWidth = 1 ; } else { _doScaleImage = true ; _targetHeight = Math . max ( 1 , h ) ; _targetWidth = Math . max ( 1 , w ) ; } _image = ImageUtil . createCompatibleBufferedImage ( _targetWidth , _targetHeight ) ; }
target:  Creates a new ImageReplacedElement and scales it to the size specified if either width or height has a valid value (values are > -1), otherwise original size is preserved. The idea is that the image was loaded at a certain size (that's the Image instance here) and that at the time we create the ImageReplacedElement we have a target W/H we want to use.