| Reply | « Previous Thread | Next Thread » |
|
Hi,
Does someone know what's the difference between high-level events and low-level events? Thanks in advance. |
|
High level events have a higher level of abstraction. They are specifically the Command-related and the Item-related events. You don't know exactly what key(or keys) on the phone the user pressed, you just know he has selected one of your Commands or edited a TextField or whatever....
Low level events are closer to the hardware: a key was pressed, the screen is being repainted, etc... shmoove |
|
Many thanks for the answer.
I saw that the interface "CommandListener" is used to receive the high-level events. Which interface is used to receive low-level events? Thanks. |
|
For low level events there is no interface needed, because the there is only one Displayable that can process these events: the Canvas.
So, for low-level events you just have to override the paint(), keyPressed(), keyReleased() and keyRepeated() when you subclass Canvas (these methods have an empty implementation in the original Canvas class). shmoove [edit] I forgot to mention there are also pointerPressed(), pointerDragged(), and pointerReleased() methods, that can also process low level events. You can use hasPointerEvents() and hasPointerMotionEvents() to find out if a device supports this type of input... [/edit]
Last edited by shmoove : 2003-05-14 at 17:16.
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|