Java Reference
In-Depth Information
protected void pointerPressed(int x, int y)
{
pressed.x = x;
pressed.y = y;
// TODO: handle event accordingly
// Call super.pointerPressed(x, y) otherwise, depending on the UI
// platform, keyPressed(int code) might not be invoked
super.pointerPressed(x, y);
}
protected void keyPressed(int code) {
// TODO: handle key-event
}
4.6.4 Interacting with Graphical Elements
You should also consider the size and location of the graphical elements
with which the user interacts. Users don't always use a stylus - they may
use their fingers. If you render a button which the user will touch, the
button has to be of sufficient width and height to allow the user to press it
comfortably. Also, the gap between adjacent interaction elements should
be sufficient to ensure that the user cannot accidentally press more than
one element at a time.
4.6.5 Opportunities of Platform Input Mechanisms
Platform input mechanisms also provide a developer with good oppor-
tunities. If there is touch-screen support, you can add swipe interaction
to your application. If you are using high-level LCDUI widgets, you have
free access to all the native text-entry mechanisms, such as predictive
text, handwriting recognition, and a virtual on-screen keyboard. Such
input mechanisms remain transparent to your code, which receives the
usual high-level events, without any additional cost.
The single common Java ME platform on a large number of Symbian
smartphones mitigates the problem of Java ME key code fragmentation.
The same Java ME key codes are used in the majority of Symbian
smartphones, even from different phone manufacturers.
4.7 Handling Diverse Multimedia Formats and Protocols
The multimedia support in MMAPI is quite openly defined. The general-
purpose design of MMAPI implies that the supported set of protocols and
content formats is not mandated and is left for the Java ME implementation
to define. Because of the lack of a mandatory set, MMAPI also cannot
specify which content types should work on top of which protocol.
In Java ME on Symbian OS, the definition of MMAPI content types
and protocol support is derived from the native Symbian OS Multimedia
 
Search WWH ::




Custom Search