Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Class java.awt.image.TileChangeMulticaster

java.lang.Object
    |
    +----java.awt.image.TileChangeMulticaster

public class TileChangeMulticaster
extends Object
A convenience class that takes care of the details of implementing the TileChangeListener interface. A BufferedImage or other implementation of the WritableRenderedImage interface will use this class by constructing a single instance and forwarding calls to the methods addTileChangeListener, removeTileChangeListener, getTileChangeListeners, getWritableTile, releaseWritableTile, getWritableTiles, and hasTileWriters. Except for getWritableTile and releaseWritableTile, there will rarely be any reason for the WritableRenderedImage to do any additional work.


Constructor Summary
 TileChangeMulticaster()
 
 

Method Summary
void  addTileChangeListener(TileChangeListener tcl)
Inform the multicaster of a new listener.
void  addTileWriter(WritableRenderedImage source, int tileX, int tileY)
Record a new getWritableTile request to a particular tile of a source image.
TileChangeListener[]  getTileChangeListeners()
Allow the multicaster to return its list of listeners.
Point[]  getWritableTiles()
Returns a Vector listing the tiles that are currently writable.
boolean  hasTileWriters()
Return whether any tile is currently checked out for writing.
boolean  isTileWritable(int tileX, int tileY)
Returns whether a particular tile has a current writer.
void  removeTileChangeListener(TileChangeListener tcl)
Inform the multicaster that a listener has dropped out.
void  removeTileWriter(WritableRenderedImage source, int tileX, int tileY)
Record a new releaseWritableTile request to a particular tile of a source image.
void  tileGrabbed(WritableRenderedImage source, int tileX, int tileY)
Multicast the tileGrabbed message.
void  tileReleased(WritableRenderedImage source, int tileX, int tileY)
Multicast the tileReleased message.
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TileChangeMulticaster

public TileChangeMulticaster()
Method Detail

addTileChangeListener

public void addTileChangeListener(TileChangeListener tcl)
Inform the multicaster of a new listener.

removeTileChangeListener

public void removeTileChangeListener(TileChangeListener tcl)
Inform the multicaster that a listener has dropped out.

getTileChangeListeners

public TileChangeListener[] getTileChangeListeners()
Allow the multicaster to return its list of listeners.

tileGrabbed

public void tileGrabbed(WritableRenderedImage source,
                        int tileX,
                        int tileY)
Multicast the tileGrabbed message.
Parameters:
source - the image that owns the tile being grabbed.
tileX - the X index of the tile.
tileY - the Y index of the tile.

tileReleased

public void tileReleased(WritableRenderedImage source,
                         int tileX,
                         int tileY)
Multicast the tileReleased message.
Parameters:
source - the image that owns the tile being released.
tileX - the X index of the tile.
tileY - the Y index of the tile.

addTileWriter

public void addTileWriter(WritableRenderedImage source,
                          int tileX,
                          int tileY)
Record a new getWritableTile request to a particular tile of a source image.
Parameters:
source - the image that owns the tile being grabbed.
tileX - the X index of the tile.
tileY - the Y index of the tile.

removeTileWriter

public void removeTileWriter(WritableRenderedImage source,
                             int tileX,
                             int tileY)
Record a new releaseWritableTile request to a particular tile of a source image.
Parameters:
source - the image that owns the tile being released.
tileX - the X index of the tile.
tileY - the Y index of the tile.

isTileWritable

public boolean isTileWritable(int tileX,
                              int tileY)
Returns whether a particular tile has a current writer.
Parameters:
tileX - the X index of the tile.
tileY - the Y index of the tile.

getWritableTiles

public Point[] getWritableTiles()
Returns a Vector listing the tiles that are currently writable.

hasTileWriters

public boolean hasTileWriters()
Return whether any tile is currently checked out for writing.

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.