org.apache.myfaces.trinidad.event
Class WindowLifecycleEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.apache.myfaces.trinidad.event.WindowEvent
          extended by org.apache.myfaces.trinidad.event.WindowLifecycleEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
WindowLifecycleNavigateEvent

public class WindowLifecycleEvent
extends WindowEvent

Event delivered when the LifecycleState of a Window changes. The cause indicates the cause ot the state change. The state diagram for theWindow LifecycleStates is

                      +-----------load---------------+
                      |                              |       ---expire---
                      V      /---unload----\         |      /            \
  ---open--->OPEN-----               ----->UNLOADED--              -->CLOSED
                      |      \--navigate---/         ^      \            /
                      |                              |       ---close----
                      +---------closing--------------+

 
The new LifecycleStates can be retrieved by calling getLifecycleState on the source Window or by calling the getNewLifecycleState convenience function on the WindowLifecycleEvent

See Also:
Window, Window.LifecycleState, Serialized Form

Nested Class Summary
static class WindowLifecycleEvent.Cause
          What caused the delivery of the WindowLifecycleEvent.
 
Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
WindowLifecycleEvent(Window source, WindowLifecycleEvent.Cause cause)
          Creates a WindowOpenEvent event for the specified Window and cause.
 
Method Summary
 boolean equals(Object o)
           
 WindowLifecycleEvent.Cause getCause()
           
 Window.LifecycleState getNewLifecycleState()
          Returns the new LifecycleState that the Window has moved to.
 int hashCode()
           
protected  boolean subclassEquals(WindowLifecycleEvent e)
          Called by subclass equals implementation to check the WindowEvent portion of equivalence.
 String toString()
           
 
Methods inherited from class org.apache.myfaces.trinidad.event.WindowEvent
getSource, subclassEquals
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WindowLifecycleEvent

public WindowLifecycleEvent(Window source,
                            WindowLifecycleEvent.Cause cause)
Creates a WindowOpenEvent event for the specified Window and cause.

Method Detail

getCause

public WindowLifecycleEvent.Cause getCause()
Returns:
the cause of the WindowOpen event.

getNewLifecycleState

public final Window.LifecycleState getNewLifecycleState()
Returns the new LifecycleState that the Window has moved to.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class EventObject

subclassEquals

protected final boolean subclassEquals(WindowLifecycleEvent e)
Called by subclass equals implementation to check the WindowEvent portion of equivalence.

Parameters:
e - Non-null WindowEvent to compare for equality
Returns:
true if the the WindowEvent satisfies the WindowEvent portion of equivalence.


Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.