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

DisplayEvents

public interface DisplayEvents
These are the methods called by the default event handler.

Fields Summary
Constructors Summary
Methods Summary
public voidcallInvalidate(javax.microedition.lcdui.Item src)
Called by event delivery to process a Form invalidation

param
src the Item which may have caused the invalidation

public voidcallItemStateChanged(javax.microedition.lcdui.Item src)
Called by event delivery to notify an ItemStateChangeListener of a change in an item

param
src the Item which has changed

public voidcallSerially()
Called by event delivery to batch process all pending serial callbacks

public voidcommandAction(int id)
Called by event delivery when an abstract Command is fired. The parameter is an index into the list of Commands that are current, i.e. those associated with the visible Screen.

param
id The integer id of the Command that fired (as returned by Command.getID())

public voidinputMethodEvent(java.lang.String str)
Called by event delivery when an input method event is processed.

param
str The string from the input method.

public voidkeyEvent(int type, int keyCode)
Called by event delivery when a key event is processed. The type is one of EventHandler.PRESSED, EventHandler.RELEASED, or EventHandler.REPEATED.

param
type The type of event (press, release or repeat)
param
keyCode The key code for the key that registered the event

public voidpointerEvent(int type, int x, int y)
Called by event delivery when a pen event is processed. The type is one of EventHandler.PRESSED, EventHandler.RELEASED, or EventHandler.DRAGGED.

param
type The type of event (press, release or drag)
param
x The x coordinate of the location of the pen
param
y The y coordinate of the location of the pen

public voidrepaint(int x1, int y1, int x2, int y2, java.lang.Object target)
Called by event delivery when a repaint should occur

param
x1 The origin x coordinate of the repaint region
param
y1 The origin y coordinate of the repaint region
param
x2 The bounding x coordinate of the repaint region
param
y2 The bounding y coordinate of the repaint region
param
target The optional paint target

public voidresumePainting()
Called when the system is ready to give up its control over the screen. The application should receive a request for a full repaint when this is called, and is subsequently free to process paint events from Canvas.repaint(), Canvas.serviceRepaints() or internal paint methods on Displayable.

public voidsuspendPainting()
Called when the system needs to temporarily prevent the application from painting the screen. The primary use of this method is to allow a system service to temporarily utilize the screen, e.g. to provide input method or abstract command processing. This method should prevent application-based paints (i.e. those generated by Canvas.repaint(), Canvas.serviceRepaints() or some internal paint method on another kind of Displayable) from changing the contents of the screen in any way.