summaryrefslogtreecommitdiffstats
path: root/libjava/java/awt/image/BufferedImage.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/awt/image/BufferedImage.java')
-rw-r--r--libjava/java/awt/image/BufferedImage.java35
1 files changed, 33 insertions, 2 deletions
diff --git a/libjava/java/awt/image/BufferedImage.java b/libjava/java/awt/image/BufferedImage.java
index bf6c45cab99..5d72288f589 100644
--- a/libjava/java/awt/image/BufferedImage.java
+++ b/libjava/java/awt/image/BufferedImage.java
@@ -53,8 +53,8 @@ import gnu.java.awt.ComponentDataBlitOp;
*
* @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
*/
-public class BufferedImage extends java.awt.Image
- //implements java.awt.image.WritableRenderedImage
+public class BufferedImage extends Image
+ implements WritableRenderedImage
{
public static final int TYPE_CUSTOM = 0,
TYPE_INT_RGB = 1,
@@ -88,6 +88,8 @@ public class BufferedImage extends java.awt.Image
0x03e0,
0x001f,
DataBuffer.TYPE_USHORT};
+
+ Vector observers;
public BufferedImage(int w, int h, int type)
{
@@ -569,4 +571,33 @@ public class BufferedImage extends java.awt.Image
// FIXME: implement:
return super.toString();
}
+
+ /**
+ * Adds a tile observer. If the observer is already present, it receives
+ * multiple notifications.
+ *
+ * @param to The TileObserver to add.
+ */
+ public void addTileObserver (TileObserver to)
+ {
+ if (observers == null)
+ observers = new Vector ();
+
+ observers.add (to);
+ }
+
+ /**
+ * Removes a tile observer. If the observer was not registered,
+ * nothing happens. If the observer was registered for multiple
+ * notifications, it is now registered for one fewer notification.
+ *
+ * @param to The TileObserver to remove.
+ */
+ public void removeTileObserver (TileObserver to)
+ {
+ if (observers == null)
+ return;
+
+ observers.remove (to);
+ }
}
OpenPOWER on IntegriCloud