diff options
author | sgilbertson <sgilbertson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-25 19:02:29 +0000 |
---|---|---|
committer | sgilbertson <sgilbertson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-25 19:02:29 +0000 |
commit | 8c8125ea529bfedac13ece8d1769d2097760052b (patch) | |
tree | cf8eb4ec21e611ee7dbea198fd5f8dce39ee903d /libjava/java | |
parent | 8b8f063f8f15d11ec66d8cda853221827857706e (diff) | |
download | ppe42-gcc-8c8125ea529bfedac13ece8d1769d2097760052b.tar.gz ppe42-gcc-8c8125ea529bfedac13ece8d1769d2097760052b.zip |
* Makefile.am: added gnu/awt/xlib/XOffScreenImage.java.
* Makefile.in: re-generated.
* gnu/awt/j2d/IntegerGraphicsState.java
(ScreenCoupledImage): new interface.
(drawImage): detect ScreenCoupledImage instances.
* gnu/awt/xlib/XCanvasPeer.java (createImage) implemented.
* gnu/awt/xlib/XEventLoop.java
(createEvent): re-formatted, and rearranged to avoid null pointer.
* gnu/awt/xlib/XGraphics.java
(drawImage): added XOffScreenImage handling.
* gnu/awt/xlib/XOffScreenImage.java: new file.
* gnu/gcj/xlib/Drawable.java (getDepth): new native method.
* gnu/gcj/xlib/GC.java (copyArea): new native method.
* gnu/gcj/xlib/XAnyEvent.java
(TYPE_KEY_PRESS): new constant.
(TYPE_KEY_RELEASE): new constant.
(TYPE_MOTION_NOTIFY): new constant.
(TYPE_ENTER_NOTIFY): new constant.
(TYPE_LEAVE_NOTIFY): new constant.
(TYPE_FOCUS_IN): new constant.
(TYPE_FOCUS_OUT): new constant.
(TYPE_KEYMAP_NOTIFY): new constant.
(TYPE_GRAPHICS_EXPOSE): new constant.
(TYPE_NO_EXPOSE): new constant.
(TYPE_VISIBILITY_NOTIFY): new constant.
(TYPE_CREATE_NOTIFY): new constant.
(TYPE_DESTROY_NOTIFY): new constant.
(TYPE_MAP_REQUEST): new constant.
(TYPE_CONFIGURE_REQUEST): new constant.
(TYPE_GRAVITY_NOTIFY): new constant.
(TYPE_RESIZE_REQUEST): new constant.
(TYPE_CIRCULATE_NOTIFY): new constant.
(TYPE_CIRCULATE_REQUEST): new constant.
(TYPE_PROPERTY_NOTIFY): new constant.
(TYPE_SELECTION_CLEAR): new constant.
(TYPE_SELECTION_REQUEST): new constant.
(TYPE_SELECTION_NOTIFY): new constant.
(TYPE_COLORMAP_NOTIFY): new constant.
(TYPE_MAPPING_NOTIFY): new constant.
* gnu/gcj/xlib/natDrawable.cc (getDepth): new method.
* gnu/gcj/xlib/natGC.cc (copyArea): new method
* java/awt/Component.java (createImage): changed to use peer method.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70776 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/awt/Component.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libjava/java/awt/Component.java b/libjava/java/awt/Component.java index 98511ef7c6e..11663a7d122 100644 --- a/libjava/java/awt/Component.java +++ b/libjava/java/awt/Component.java @@ -1866,12 +1866,17 @@ public abstract class Component * @param height the height of the image * @return the requested image, or null if it is not supported */ - public Image createImage(int width, int height) + public Image createImage (int width, int height) { - if (GraphicsEnvironment.isHeadless()) - return null; - GraphicsConfiguration config = getGraphicsConfiguration(); - return config == null ? null : config.createCompatibleImage(width, height); + Image returnValue = null; + if (!GraphicsEnvironment.isHeadless ()) + { + if (isLightweight () && parent != null) + returnValue = parent.createImage (width, height); + else if (peer != null) + returnValue = peer.createImage (width, height); + } + return returnValue; } /** |