Fields Summary |
---|
private MIDletProxyList | midletProxyListMIDlet proxy list reference. |
private AutoMIDletInfoList | midletsInfoList of AutoMIDletInfo for MIDlet's we are interested in |
private AutoDisplayController | displayControllerDisplay controller |
private MIDletControllerEventProducer | midletControllerEventProducerEvents producer |
private static AutoForegroundStateController | stateControllerThe one and only AutoMIDletStateController instance |
Methods Summary |
---|
public void | foregroundMIDletChanged(MIDletProxy oldForeground, MIDletProxy newForeground)Called when foreground MIDlet is about to be changed.
if (oldForeground != null) {
AutoMIDletImpl midlet = midletsInfo.findMIDlet(oldForeground);
if (midlet != null) {
midlet.stateChanged(AutoMIDletForegroundState.BACKGROUND);
}
}
if (newForeground != null) {
AutoMIDletImpl midlet = midletsInfo.findMIDlet(newForeground);
if (midlet != null) {
midlet.stateChanged(AutoMIDletForegroundState.FOREGROUND);
}
}
|
static synchronized com.sun.midp.automation.AutoForegroundStateController | getForegroundStateController()Gets AutoMIDletStateController instance.
if (stateController == null) {
stateController = new AutoForegroundStateController();
}
return stateController;
|
public void | handleForegroundRequestEvent(int midletSuiteID, java.lang.String midletClassName)Processes AUTO_FOREGROUND_REQUEST event
MIDletProxy midletProxy = midletProxyList.findMIDletProxy(
midletSuiteID, midletClassName);
if (midletProxy != null) {
midletProxyList.setForegroundMIDlet(midletProxy);
}
|
void | switchTo(AutoMIDletImpl midlet, AutoMIDletForegroundState state)Initiates switching MIDlet to specified state.
MIDletProxy midletProxy = midletsInfo.findMIDletProxy(midlet);
if (midletProxy != null) {
if (state == AutoMIDletForegroundState.FOREGROUND) {
int suiteID = midletProxy.getSuiteId();
String className = midletProxy.getClassName();
midletControllerEventProducer.
sendSetForegroundByNameRequestEvent(suiteID, className);
}
}
|