|
Replies:
2
-
Last Post:
May 17, 2008 1:32 AM
by: terrencebarr
|
Threads:
[
Previous
|
Next
]
|
|
|
|
|
|
How to implement drag & drop with J2ME CDC
Posted:
May 15, 2008 1:15 AM
|
|
|
Hello I would like to use drag & drop in a PDA application. I would be using J2ME CDC, and I don't find on the J2ME javadoc the interfaces used on J2SE to implement the drag & drop (DragGestureListener, DropTargetListenner,...).
My question is : is there any way to implement the drag & drop using J2ME CDC, and if not how is implemented the drag & drop on the PDA applications (because it seems to me that it's a basic concept of the PDA programmation)?
Thanks in advance for your responses
|
|
|
|
|
|
|
Re: How to implement drag & drop with J2ME CDC
Posted:
May 15, 2008 8:30 AM
in response to: blackfrancis007
|
|
|
Hi,
So JavaME was designed for limited devices, as such incorporating large libraries to support the DnD type features was not included. A rule of thumb is if it wasn't in Java before 1.2 then it most likely isn't in JavaME CDC. I don't work in CDC but rather the CLDC, however you might see if the java.awt.datatransfer package is available to help with the transfer of information. The DnD really become a graphical management issue of working with mouse events. I found this example of the use of the java.awt.datatransfer package, and it looks like it doesn't have code that is outside the 1.1.8 spec. http://www.java2s.com/Code/Java/Swing-JFC/DroppershowFileDropTargetfromDragnDrop.htm
But if you have a JavaVM that support CDC, you might look at the Gnu ClassPath project, and see if you could use their implementation of the awt.dnd package. All of the bytecode opCodes should be in the VM to support the java portion of the package. If there is native code then you will have troubles.
Regards, -Shawn
|
|
|
|
|
|
|
|
Re: How to implement drag & drop with J2ME CDC
Posted:
May 17, 2008 1:32 AM
in response to: blackfrancis007
|
|
|
I am not an expert on DnD but platforms such as phoneME Advanced are CDC/FP/PBP/PP and as such most of the Java SE 1.4.2 functionality, including awt.datatransfer . You could certainly try that.
Hope that helps,
-- Terrence
|
|
|
|
|