All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ocap.environment.EnvironmentStateChangedEvent.html Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version






EnvironmentStateChangedEvent














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:

  • the resource policy SHALL be changed to that of the new selected environment
  • applications in the environment not allowed to run in its new state SHALL have been killed
  • applications in the environment allowed to run but not allowed to show a user interface in its new state SHALL have that UI hidden, for OCAP-J applications this means the HScene SHALL be hidden with the same result as a call to setVisible(false).
  • reservations of application exclusive events for the old applications which are allowed to run in the new selected environment SHALL have been cancelled
  • if the newly selected environment has previously been in the selected or presenting state then all previously terminated applications have been re-started as described as part of the transition to the selected state (where re-started for Xlets mean the call to the initXlet method has completed)
  • returning to normal mode any running applications which are in cross-environment mode, background mode or paused mode
  • returning to the active state any pauseable applications which were paused when this environment last stopped being selected and which are still paused
Reporting a change of selected environment as having been completed SHALL NOT wait for the following steps:
  • completion of the re-starting of applications (where completion for Xlets means completion of calls to the startXlet method)
  • requesting HScenes be visible
  • requesting focus
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






© 2015 - 2024 Weber Informatics LLC | Privacy Policy