FileDocCategorySizeDatePackage
DisplayEventConsumer.javaAPI DocphoneME MR2 API (J2ME)5564Wed May 02 18:00:24 BST 2007com.sun.midp.lcdui

DisplayEventConsumer

public interface DisplayEventConsumer
This interface provides a set of methods to handle display-related events: user input, drawing, callbacks that are assosiated with displays. Implementor of this I/F shall be instance specific i.e. associated with a Display object instance (ex. Display.DisplayEventConsumerImpl class). Therefore it is assumed that target identification (displayId -> Display/DisplayAccess/DisplayEventConsumerImpl) is done before calling I/F methods in EventListener.

Fields Summary
Constructors Summary
Methods Summary
public voidhandleCallSeriallyEvent()
Called by event delivery to batch process all pending serial callbacks.

public voidhandleCommandEvent(int cmdId)
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. TBD: param screenId Id of the command target (Displayable)

param
cmdId command Id

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

param
inputText string to process

public voidhandleInvalidateEvent()
Called by event delivery to process a Form invalidation.

public voidhandleKeyEvent(int keyType, int keyCode)
Called by event delivery when a key press,release or repeate event needs to be processed.

param
keyType key press, release or repeate is one of EventConstants.PRESSED, EventConstants.RELEASED, EventConstants.REPEATED.
param
keyCode key code to process

public voidhandlePeerStateChangeEvent(int modelVersion, int itemPeerId, int hint)
Called by event delivery to notify an ItemLF in current DisplayableLF of a change in its native peer state.

param
modelVersion the version of the peer's data model
param
itemPeerId the id of the ItemLF's peer whose state has changed
param
hint some value that is interpreted only between the peers

public voidhandlePointerEvent(int pointerType, int x, int y)
Called by event delivery when a pointer press,release or drag event needs to be processed.

param
pointerType pointer press, release or drag is one of EventConstants.PRESSED, EventConstants.RELEASED, or EventConstants.DRAGGED.
param
x x-coordinate of the pointer event
param
y y-coordinate of the pointer event

public voidhandleRepaintEvent(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 voidhandleRotationEvent()

public voidhandleScreenChangeEvent(javax.microedition.lcdui.Displayable screen)
Called by event delivery when a screen change needs to occur.

param
screen The Displayable to make current in the Display

public voidhandleScreenRepaintEvent()