FileDocCategorySizeDatePackage
DisplayManager.javaAPI DocJ2ME MIDP 2.06368Thu Nov 07 12:02:22 GMT 2002com.sun.midp.lcdui

DisplayManager

public interface DisplayManager implements DisplayEvents
This class works around the fact that public classes can not be added to a javax package by an implementaion.

Fields Summary
Constructors Summary
Methods Summary
public voidactivate(MIDletEventListener l, javax.microedition.midlet.MIDlet m)
Places the display of the given MIDlet in the list of active displays and registers an object to receive events on behalf of the MIDlet.

param
l object to notify with MIDlet events such as pause.
param
m MIDlet to activate

public voidaddSystemEventListener(SystemEventListener l)
Add a listener for system events.

param
l object to notify with system events such as shutdown

public DisplayAccesscreateDisplay(com.sun.midp.security.SecurityToken token, javax.microedition.midlet.MIDlet midlet)
Create a display and return its internal access object.

param
token security token for the calling class
param
midlet MIDlet that will own this display
return
new display's access object
exception
SecurityException if the caller does not have permission the internal MIDP permission.

public voiddeactivate(javax.microedition.midlet.MIDlet m)
Removes the display of the given MIDlet from the list of active displays and unregisters MIDlet's event listener.

param
m MIDlet to deactivate

public voiddonePreempting(java.lang.Object preemptToken)
Display the displayable that was being displayed before preemptDisplay was called.

param
preemptToken the token returned from preemptDisplay

public javax.microedition.lcdui.ImagegetTrustedMIDletIcon()
Get the Image of the trusted icon for this Display. Only callers with the internal AMS permission can use this method.

return
an Image of the trusted icon.
exception
SecurityException if the suite calling does not have the the AMS permission

public voidinitSecurityToken(com.sun.midp.security.SecurityToken token)
Initializes the security token for this class, so it can perform actions that a normal MIDlet Suite cannot.

param
token security token for this class.

public voidkillCurrent()
Kill the current foreground MIDlet and return to the AMS or "selector" to possibly run another MIDlet in the currently active suite. This is a system callback which allows a user to forcibly exit a running MIDlet in cases where it is necessary (such as a rogue MIDlet which does not provide exit capability).

Called by the system event handler within Display.

public java.lang.ObjectpreemptDisplay(com.sun.midp.security.SecurityToken token, MIDletEventListener l, javax.microedition.lcdui.Displayable d, boolean waitForDisplay)
Preempt the current displayable with the given displayable until donePreempting is called. The preemptor should stop preempting when a destroyMIDlet event occurs. The event will have a null MIDlet parameter.

param
token security token for the calling class
param
l object to notify with the destroy MIDlet event.
param
d displayable to show the user
param
waitForDisplay if true this method will wait if the screen is being preempted by another thread.
return
an preempt token object to pass to donePreempting done if prempt will happen, else null
exception
SecurityException if the caller does not have permission the internal MIDP permission.
exception
InterruptedException if another thread interrupts the calling thread while this method is waiting to preempt the display.

public voidreleaseSystemEventListener(SystemEventListener l)
Release the system event listener set during the call to getDisplayManger.

param
l object that was being notified with system events

public voidresumeAll()
Resume the currently suspended state. This is a result of the underlying system returning control to MIDP. Any previously paused foreground MIDlet will be restarted and the Display will be refreshed.

Called by the system event handler within Display.

public voidresumePrevious()
Resume the currently suspended state. This is a result of the underlying system returning control to MIDP. Any previously paused foreground MIDlet will be restarted and the Display will be refreshed.

Called by the system event handler within Display.

public voidscreenChange(javax.microedition.lcdui.Display parent, javax.microedition.lcdui.Displayable screen)
Called by event delivery when a screen change needs to occur.

param
parent parent Display of the Displayable
param
screen The Displayable to make current in the Display

public voidshutdown()
Shutdown all running MIDlets and prepare the MIDP runtime to exit completely.

public voidsuspendAll()
Suspend Pause all to allow the system to use the display. This will result in calling pauseApp() on the all of the active MIDlets. A subsequent 'resumeAll()' call will return the all of the paused midlets to active status.

Called by the system event handler within Display.

public voidsuspendCurrent()
Suspend the current foreground MIDlet and return to the AMS or "selector" to possibly run another MIDlet in the currently active suite. Currently, the RI does not support running multiple MIDlets, but if it did, this system callback would allow it.

Called by the system event handler within Display.