FileDocCategorySizeDatePackage
CldcForegroundController.javaAPI DocphoneME MR2 API (J2ME)3645Wed May 02 18:00:06 BST 2007com.sun.midp.main

CldcForegroundController

public class CldcForegroundController extends Object implements com.sun.midp.lcdui.ForegroundController
This class provides methods to abstract the central foreground control code from the the LCDUI library.

Fields Summary
private MIDletControllerEventProducer
midletControllerEventProducer
Cached reference to the MIDletControllerEventProducer.
Constructors Summary
CldcForegroundController(MIDletControllerEventProducer theMIDletControllerEventProducer)
Initializes this class.

param
theMIDletControllerEventProducer event producer


        midletControllerEventProducer = theMIDletControllerEventProducer;
    
Methods Summary
public javax.microedition.lcdui.DisplayableregisterDisplay(int displayId, java.lang.String ownerClassName)
Called to register a newly create Display. Must method must be called before the other methods can be called.

param
displayId ID of the Display
param
ownerClassName Class name of the that owns the display
return
a place holder displayable to used when "getCurrent()==null", if null is returned an empty form is used

        midletControllerEventProducer.
            sendDisplayCreateNotifyEvent(displayId, ownerClassName);

        return new HeadlessAlert(displayId, midletControllerEventProducer);
    
public voidrequestBackground(int displayId)
Called to request the background.

param
displayId ID of the Display

        midletControllerEventProducer.
            sendDisplayBackgroundRequestEvent(displayId);
    
public voidrequestForeground(int displayId, boolean isAlert)
Called to request the foreground.

param
displayId ID of the Display
param
isAlert true if the current displayable is an Alert

        midletControllerEventProducer.
            sendDisplayForegroundRequestEvent(displayId, isAlert);
    
public voidstartPreempting(int displayId)
Called to start preempting. The given display will preempt all other displays for this isolate.

param
displayId ID of the Display

        midletControllerEventProducer.
            sendDisplayPreemptStartEvent(displayId);
    
public voidstopPreempting(int displayId)
Called to end preempting.

param
displayId ID of the Display

        midletControllerEventProducer.
            sendDisplayPreemptStopEvent(displayId);