org.jdesktop.jxlayer.item
Class LayerItemChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.jdesktop.jxlayer.item.LayerItemChangeEvent
All Implemented Interfaces:
java.io.Serializable

public class LayerItemChangeEvent
extends java.util.EventObject

LayerItemChangeEvent provides notification of changes to a LayerItem.

See Also:
LayerItem, LayerItemListener, Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
LayerItemChangeEvent(LayerItem source)
          Creates a new LayerItemEvent object.
 
Method Summary
 java.awt.Shape getClip(int width, int height)
          Since one LayerItemChangeEvent can be sent to multiple JXLayers, this method gives an opportunity for the subclasses of LayerItemChangeEvent to define the precise part of a JXLayer to be repainted.
 LayerItem getSource()
          Returns the LayerItem on which the event initially occurred.
 
Methods inherited from class java.util.EventObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LayerItemChangeEvent

public LayerItemChangeEvent(LayerItem source)
Creates a new LayerItemEvent object.

Parameters:
source - the object on which the event initially occurred.
Throws:
java.lang.IllegalArgumentException - if source is null.
Method Detail

getSource

public LayerItem getSource()
Returns the LayerItem on which the event initially occurred.

Overrides:
getSource in class java.util.EventObject
Returns:
the LayerItem on which the event initially occurred.

getClip

public java.awt.Shape getClip(int width,
                              int height)
Since one LayerItemChangeEvent can be sent to multiple JXLayers, this method gives an opportunity for the subclasses of LayerItemChangeEvent to define the precise part of a JXLayer to be repainted.

Parameters:
width - the current width of a JXLayer
height - the current height of a JXLayer
Returns:
the part ofa JXLayer to be repainted