< prev index next >

src/java.desktop/share/classes/java/awt/Component.java

Print this page
rev 57801 : XXXXXXX: Component.xxxImage cleanup
Reviewed-by: XXX

*** 1,7 **** /* ! * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1995, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 3631,3644 **** * @param producer the image producer * @return the image produced * @since 1.0 */ public Image createImage(ImageProducer producer) { - ComponentPeer peer = this.peer; - if ((peer != null) && ! (peer instanceof LightweightPeer)) { - return peer.createImage(producer); - } return getToolkit().createImage(producer); } /** * Creates an off-screen drawable image to be used for double buffering. --- 3631,3640 ----
*** 3750,3769 **** * @see java.awt.image.ImageObserver * @since 1.0 */ public boolean prepareImage(Image image, int width, int height, ImageObserver observer) { ! ComponentPeer peer = this.peer; ! if (peer instanceof LightweightPeer) { ! return (parent != null) ! ? parent.prepareImage(image, width, height, observer) ! : getToolkit().prepareImage(image, width, height, observer); ! } else { ! return (peer != null) ! ? peer.prepareImage(image, width, height, observer) ! : getToolkit().prepareImage(image, width, height, observer); ! } } /** * Returns the status of the construction of a screen representation * of the specified image. --- 3746,3756 ---- * @see java.awt.image.ImageObserver * @since 1.0 */ public boolean prepareImage(Image image, int width, int height, ImageObserver observer) { ! return getToolkit().prepareImage(image, width, height, observer); } /** * Returns the status of the construction of a screen representation * of the specified image.
*** 3822,3841 **** * @see java.awt.image.ImageObserver * @since 1.0 */ public int checkImage(Image image, int width, int height, ImageObserver observer) { ! ComponentPeer peer = this.peer; ! if (peer instanceof LightweightPeer) { ! return (parent != null) ! ? parent.checkImage(image, width, height, observer) ! : getToolkit().checkImage(image, width, height, observer); ! } else { ! return (peer != null) ! ? peer.checkImage(image, width, height, observer) ! : getToolkit().checkImage(image, width, height, observer); ! } } /** * Creates a new strategy for multi-buffering on this component. * Multi-buffering is useful for rendering performance. This method --- 3809,3819 ---- * @see java.awt.image.ImageObserver * @since 1.0 */ public int checkImage(Image image, int width, int height, ImageObserver observer) { ! return getToolkit().checkImage(image, width, height, observer); } /** * Creates a new strategy for multi-buffering on this component. * Multi-buffering is useful for rendering performance. This method
< prev index next >