< prev index next >

modules/javafx.web/src/main/java/com/sun/javafx/webkit/PasteboardImpl.java

Print this page

        

*** 64,85 **** content.putString(text); content.putHtml(html); clipboard.setContent(content); } ! @Override public void writeImage(WCImageFrame wcImage) { Object platformImage = WCGraphicsManager.getGraphicsManager(). toPlatformImage(wcImage.getFrame()); Image fxImage = Toolkit.getImageAccessor().fromPlatformImage(platformImage); if (fxImage != null) { ClipboardContent content = new ClipboardContent(); content.putImage(fxImage); try { ! File imageDump = File.createTempFile("jfx", ".png"); imageDump.deleteOnExit(); ImageIO.write(UIClientImpl.toBufferedImage(fxImage), ! "png", imageDump); content.putFiles(Arrays.asList(imageDump)); } catch (IOException | SecurityException e) { // Nothing specific to be done as of now } --- 64,85 ---- content.putString(text); content.putHtml(html); clipboard.setContent(content); } ! @Override public void writeImage(WCImageFrame wcImage, String fileExt) { Object platformImage = WCGraphicsManager.getGraphicsManager(). toPlatformImage(wcImage.getFrame()); Image fxImage = Toolkit.getImageAccessor().fromPlatformImage(platformImage); if (fxImage != null) { ClipboardContent content = new ClipboardContent(); content.putImage(fxImage); try { ! File imageDump = File.createTempFile("jfx", "." + fileExt); imageDump.deleteOnExit(); ImageIO.write(UIClientImpl.toBufferedImage(fxImage), ! fileExt, imageDump); content.putFiles(Arrays.asList(imageDump)); } catch (IOException | SecurityException e) { // Nothing specific to be done as of now }
< prev index next >