Commit 0058a7d8 by Thomas Fitzsimmons Committed by Thomas Fitzsimmons

GtkToolkit.java (checkImage): Inform image observer of image loading status.

2004-01-25  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GtkToolkit.java (checkImage): Inform
	image observer of image loading status.
	(getImage (String)): Start image production.
	(getImage (URL)): Likewise.

From-SVN: r76574
parent cff555dc
2004-01-25 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkToolkit.java (checkImage): Inform
image observer of image loading status.
(getImage (String)): Start image production.
(getImage (URL)): Likewise.
2004-01-25 Michael Koch <konqueror@gmx.de>
* java/lang/Class.java: Imports reworked, reformated.
......
......@@ -115,7 +115,15 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
public int checkImage (Image image, int width, int height,
ImageObserver observer)
{
return ((GtkImage) image).checkImage ();
int status = ((GtkImage) image).checkImage ();
if (observer != null)
observer.imageUpdate (image, status,
-1, -1,
image.getWidth (observer),
image.getHeight (observer));
return status;
}
public Image createImage (String filename)
......@@ -166,12 +174,18 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
public Image getImage (String filename)
{
return new GtkImage (new GdkPixbufDecoder (filename), null);
GdkPixbufDecoder d = new GdkPixbufDecoder (filename);
GtkImage image = new GtkImage (d, null);
d.startProduction (image);
return image;
}
public Image getImage (URL url)
{
return new GtkImage (new GdkPixbufDecoder (url), null);
GdkPixbufDecoder d = new GdkPixbufDecoder (url);
GtkImage image = new GtkImage (d, null);
d.startProduction (image);
return image;
}
public PrintJob getPrintJob (Frame frame, String jobtitle, Properties props)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment