History

My first initial commit with all of mine experimental changes.

Dmitry Kabak (userdima committed 13 years ago

Commit d37b88d1 parent 3f5b46618352 files · +2598093 −-8690Browse files

Showing the changes to java/pkg/awt/iImage.java (1 of 18352 files). Show all

Unified · Split

java/pkg/awt/iImage.java+51−0
@@ -0,0 +1,51 @@
1/*
2 *
3 * %W% - %E%
4 *
5 * Adapted from SunSoft's X11Image.java 1.7 97/02/24
6 */
7package inferno.awt;
8
9import java.awt.Component;
10import java.awt.Graphics;
11import java.awt.image.ImageProducer;
12
13import sun.awt.image.ImageRepresentation;
14
15class iImage extends sun.awt.image.Image {
16 /**
17 * Construct an image for offscreen rendering to be used with a
18 * given Component.
19 */
20 public iImage(Component c, int w, int h) {
21 super(c, w, h);
22 }
23
24 /**
25 * Construct an image from an ImageProducer object.
26 */
27 public iImage(ImageProducer producer) {
28 super(producer);
29 }
30
31 public Graphics getGraphics() {
32 throw new IllegalAccessError("getGraphics() only valid for images created with createImage(w, h)");
33 }
34
35 protected ImageRepresentation makeImageRep() {
36 // make Inferno ImageRepresentation - jfs
37 //return new ImageRepresentation(this, -1, -1, 0);
38 return new iImageRepresentation(this, -1, -1, 0);
39 }
40
41 protected ImageRepresentation getImageRep() {
42 return super.getImageRep();
43 }
44
45 // overridden strictly for tracing and debugging. - jfs
46 protected void initGraphics(Graphics g) {
47 System.out.println("iImage.initGraphics() this=" + this +
48 "\n g=" + g);
49 super.initGraphics(g);
50 }
51}