Specifies the new image to set for a menu entry, NULL to delete the image. This method will cache the image if it needs to be resized to fit. @param imageFile the file of the image to use or null
(final File imageFile)
| 281 | * @param imageFile the file of the image to use or null |
| 282 | */ |
| 283 | public |
| 284 | void setImage(final File imageFile) { |
| 285 | this.unknownImage = imageFile; |
| 286 | |
| 287 | if (peer != null) { |
| 288 | realizeImageFile(); // imageResizeUtil is set in the 'bind' call (which is also when peer is assigned) |
| 289 | ((MenuItemPeer) peer).setImage(this); |
| 290 | } |
| 291 | } |
| 292 | |
| 293 | /** |
| 294 | * Specifies the new image to set for a menu entry, NULL to delete the image |