javax.media.jai
Class RenderingChangeEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byjava.beans.PropertyChangeEvent
          extended byjavax.media.jai.PropertyChangeEventJAI
              extended byjavax.media.jai.RenderingChangeEvent
All Implemented Interfaces:
Serializable

public class RenderingChangeEvent
extends PropertyChangeEventJAI

Class representing the event that occurs when a RenderedOp node is re-rendered.

Since:
JAI 1.1
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
RenderingChangeEvent(RenderedOp source, PlanarImage oldRendering, PlanarImage newRendering, Shape invalidRegion)
          Constructs a RenderingChangeEvent.
 
Method Summary
 Shape getInvalidRegion()
          Returns an object which represents the region over which the the two renderings should differ.
 
Methods inherited from class javax.media.jai.PropertyChangeEventJAI
getOriginalPropertyName
 
Methods inherited from class java.beans.PropertyChangeEvent
getNewValue, getOldValue, getPropagationId, getPropertyName, setPropagationId
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RenderingChangeEvent

public RenderingChangeEvent(RenderedOp source,
                            PlanarImage oldRendering,
                            PlanarImage newRendering,
                            Shape invalidRegion)
Constructs a RenderingChangeEvent. The inherited getSource() method of the event would return the RenderedOp source; the inherited methods getOldValue() and getNewValue() would return the old and new renderings, respectively. If either the new rendering or the invalid region is null, the data of the node's rendering need to be re-requested.

The invalid region should be null if there is no area of the extant rendering which remains valid. If the invalid region is empty, this serves to indicate that all pixels within the bounds of the old rendering remain valid. Pixels outside the image bounds proper but within the bounds of all tiles of the image are not guaranteed to be valid of the invalid region is empty.

Method Detail

getInvalidRegion

public Shape getInvalidRegion()
Returns an object which represents the region over which the the two renderings should differ.

Returns:
The region over which the two renderings differ or null to indicate that they differ everywhere. An empty Shape indicates that all pixels within the bounds of the old rendering remain valid.