Showing the changes to java/pkg/awt/iImage.java (1 of 18352 files). Show all
Unified · Split
| @@ -0,0 +1,51 @@ | |||
| 1 | /* | ||
| 2 | * | ||
| 3 | * %W% - %E% | ||
| 4 | * | ||
| 5 | * Adapted from SunSoft's X11Image.java 1.7 97/02/24 | ||
| 6 | */ | ||
| 7 | package inferno.awt; | ||
| 8 | |||
| 9 | import java.awt.Component; | ||
| 10 | import java.awt.Graphics; | ||
| 11 | import java.awt.image.ImageProducer; | ||
| 12 | |||
| 13 | import sun.awt.image.ImageRepresentation; | ||
| 14 | |||
| 15 | class 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 | } | ||