Java Doc for MIDletProxy.java in » 6.0-JDK-Modules » j2me » com » sun » midp » main » Java Source Code / Java DocumentationJava Source Code and Java Documentation
Represents the state of a running MIDlet and its Display so that objects
do not have to be shared across Isolates. The states in this object are
updated by the MIDletProxyList upon receiving a notification event.
This class also provides methods for asynchronously changing a MIDlet's
state.
Field Summary
final public static int
MIDLET_ACTIVE Constant for active state of a MIDlet.
MIDLET_PAUSED Constant for paused state of a MIDlet.
boolean
wasNotActive Indicates that the midlet was just created.
Constructor Summary
MIDletProxy(MIDletProxyList theParentList, int theExternalAppId, int theIsolateId, int theSuiteId, String theClassName, String theDisplayName, int theMidletState) Construct a new MIDletProxy.
Method Summary
public void
activateMidlet() Asynchronously change the MIDlet's state to active.
public void
destroyMidlet() Asynchronously change the MIDlet's state to destroyed.
MIDletProxy(MIDletProxyList theParentList, int theExternalAppId, int theIsolateId, int theSuiteId, String theClassName, String theDisplayName, int theMidletState)(Code)
Construct a new MIDletProxy.
Parameters: theParentList - parent MIDlet proxy list Parameters: theExternalAppId - ID of given by an external application manager Parameters: theIsolateId - ID of the Isolate the MIDlet is running in. Parameters: theSuiteId - ID of the suite MIDlet Parameters: theClassName - Class name of the MIDlet Parameters: theDisplayName - Display name of the MIDlet to show the user Parameters: theMidletState - MIDlet lifecycle state.
Asynchronously change the MIDlet's state to active.
This method does NOT change the state in the proxy, but
sends a activate MIDlet event to the MIDlet's Display.
The state in the proxy is only update when the MIDlet sends
a MIDlet activated event to the proxy list.
Asynchronously change the MIDlet's state to destroyed.
This method does NOT change the state in the proxy, but
sends request to destroy MIDlet event to the AMS.
The state in the proxy is only update when the MIDlet sends
a MIDlet destroyed event to the proxy list.
Initialize the MIDletProxy class. Should only be called by the
MIDletProxyList.
Parameters: theForegroundEventProducer - reference to the event producer Parameters: theMIDletEventProducer - reference to the event producer
Check if the MIDlet has not set a displayable in its display.
Used by foreground selector to determine if the MIDlet it is
about to put in the foreground will draw the screen.
true if the MIDlet has no displayable.
Notify the midlet's display of a foreground change. Called by
the MIDlet proxy list to notify the old and new foreground displays
of a foreground change.
Parameters: hasForeground - true if the target is being put in the foreground
Asynchronously change the MIDlet's state to paused.
This method does NOT change the state in the proxy, but
sends a pause MIDlet event to the MIDlet's Display.
The state in the proxy is only update when the MIDlet sends
a MIDlet paused event to the proxy list.
Set the MIDlet cycle state. Called by the
MIDlet proxy list when it receives an event from the MIDlet
to update this value.
Parameters: newMidletState - new MIDlet state
Set the wants foreground state in the proxy. Called by the
MIDlet proxy list when it receives an event from the MIDlet's
display to update this value.
Parameters: newWantsForeground - new wants foreground value. Parameters: isAlert - true if the displayable requesting the foreground,is an Alert, this parameter is ignored if newWantsForegroundis false