|
Replies:
3
-
Last Post:
Nov 19, 2007 8:48 AM
by: terrencebarr
|
Threads:
[
Previous
|
Next
]
|
|
|
|
|
|
JME support for touch screen and vibration
Posted:
Nov 5, 2007 8:10 AM
|
|
|
Hi all, How are you? I need to develop a application for mobile phone, and it is going to use the mobile touch screen and vibration features. Does somebody know if there is an JME API, or JSR that provides access/control to Mobile's touch screen and vibration features? Does somebody know if it is feasible to do it using JME?
I appreciate any help you can give, thanks in advance, Roger
|
|
|
|
|
|
|
|
|
Re: JME support for touch screen and vibration
Posted:
Nov 13, 2007 11:43 AM
in response to: terrencebarr
|
|
|
Hi, thanks a lot for helping. I need to include the behavior described bellow to all Item subclasses: pointerPressed(int x, int y) pointerReleased(int x, int y) pointerDragged(int x, int y)
I've tried to create a CustomItem for each Item subclass with an attribute that It represents, for instance: class Test extends CustomItem{ Item obj;
protected void paint(Graphics arg0, int arg1, int arg2) { obj.paint() // ? } }
However, I don't know which Item's class method to call in order to paint it. Please, Do you have any idea on how I can do that??
thanks in advance, Roger
|
|
|
|
|
|
|
|
Re: JME support for touch screen and vibration
Posted:
Nov 19, 2007 8:48 AM
in response to: rogersilva
|
|
|
Sorry for the slow reply. I was hoping someone else could answer this.
The paint method in Item is package protected so you cannot call it directly. It is called from the MIDP subsystem on the paint thread as needed. This means that you can't use an Item as part of a CustomItem. A CustomItem contains elements that you implement yourself and you can paint yourself.
-- Terrence
|
|
|
|
|