All Packages  Class Hierarchy  This Package  Previous  Next  Index  

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 Index

 o TileChangeMulticaster()

Method Index

 o addTileChangeListener(TileChangeListener)
Inform the multicaster of a new listener.
 o addTileWriter(WritableRenderedImage, int, int)
Record a new getWritableTile request to a particular tile of a source image.
 o getTileChangeListeners()
Allow the multicaster to return its list of listeners.
 o getWritableTiles()
Returns a Vector listing the tiles that are currently writable.
 o hasTileWriters()
Return whether any tile is currently checked out for writing.
 o isTileWritable(int, int)
Returns whether a particular tile has a current writer.
 o removeTileChangeListener(TileChangeListener)
Inform the multicaster that a listener has dropped out.
 o removeTileWriter(WritableRenderedImage, int, int)
Record a new releaseWritableTile request to a particular tile of a source image.
 o tileGrabbed(WritableRenderedImage, int, int)
Multicast the tileGrabbed message.
 o tileReleased(WritableRenderedImage, int, int)
Multicast the tileReleased message.

Constructors

 o TileChangeMulticaster
public TileChangeMulticaster()

Methods

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

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

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

 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o getWritableTiles
public Point[] getWritableTiles()
Returns a Vector listing the tiles that are currently writable.

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


All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Submit a bug or feature