org.ocap.environment
Class EnvironmentStateChangedEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.ocap.environment.EnvironmentEvent
          extended by org.ocap.environment.EnvironmentStateChangedEvent
All Implemented Interfaces:
java.io.Serializable

public class EnvironmentStateChangedEvent
extends EnvironmentEvent

The EnvironmentStateChangedEvent class indicates the completion of a state transition of an environment. The following steps SHALL happen before a change of selected environment is reported as completed:

Reporting a change of selected environment as having been completed SHALL NOT wait for the following steps: When any screen re-draws happen is implementation dependent and may be deferred until the new applications are ready to redraw themselves.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
EnvironmentStateChangedEvent(Environment source, EnvironmentState fromstate, EnvironmentState tostate)
          Create an EnvironmentStateChangedEvent object.
 
Method Summary
 EnvironmentState getFromState()
          Return the state the environment was in before the state transition was requested as passed to the constructor of this event.
 EnvironmentState getToState()
          Return the state the environment is in after the completion of the state transition as passed to the constructor of this event.
 
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

EnvironmentStateChangedEvent

public EnvironmentStateChangedEvent(Environment source,
                                    EnvironmentState fromstate,
                                    EnvironmentState tostate)
Create an EnvironmentStateChangedEvent object.

Parameters:
source - the Environment where the state transition happened
fromstate - the state the environment was in before the state transition * was requested
tostate - the state the environment is in after the completion of the state transition
Method Detail

getFromState

public EnvironmentState getFromState()
Return the state the environment was in before the state transition was requested as passed to the constructor of this event.

Returns:
the old state

getToState

public EnvironmentState getToState()
Return the state the environment is in after the completion of the state transition as passed to the constructor of this event.

Returns:
the new state