Using navigationMovement() as a trackpad/trackball mouse

Greettings and regards other developers.  a few quick details I use the blackberry JDE 5.0 on Eclipse Galileo, I created a method of mouse for pavers and balls.  Try to expand my horizons of sale, two possible losses haunt my thoughts.

side 1: the mouse works fine until you roll two directions at once, example left and upwards at the same time moves alone, he left or up not both.

side 2: the touchpad does not roll like the balloon, this method will probably fine work for the ball, but not the key.

This is the code for my navigationMovement() method

protected boolean navigationMovement(int dx,int dy,int status,int time)
    {
        super.navigationMovement(dx, dy, status, time);
        if (!mouseOn)                               //places mouse on first run but doesnt repeat
            {
            mouses.addElement(new Sprite(Utility.SCREEN_WIDTH / 2, Utility.SCREEN_HEIGHT / 2));
            mouseOn = true;
            }
        Sprite f = (Sprite) mouses.firstElement();           //sprite class updates x and y coordinates                                                                               //Focussing on the x/y of the mouse(i know using a vector is silly here)
        f.x+= (dx * 10);
        f.y+= (dy * 10);    //moves the mouse according to dx/dy input

        if((f.x + mouse.getWidth()) > Utility.SCREEN_WIDTH) f.x = Utility.SCREEN_WIDTH - mouse.getWidth();
        else if(f.x < 0) f.x = 0;
        if((f.y + mouse.getHeight()) > Utility.SCREEN_HEIGHT) f.y = Utility.SCREEN_HEIGHT - mouse.getHeight();
        else if(f.y < 0) f.y = 0;        //keeps the mouse from scrolling off screen

        invalidate();     //update screen
        return true;
    }

Is there a way to make the trackpad act as the trackball with this method, or it will be slow and jerky?  I know that the trackpads have magnitude and direction.  So I hope that's not too bad, it seems to work on the Simulator, but I need a tester phone or real app ready to try this for me.

More importantly, how do I get the mouse to move both directions if the ball goes both directions? I have some ideas on what may be an if statement to check if both directions are going at once, then run both directions.  But it seems that both must be running.

Thanks in advance.

-Andy

I just realized this post was a little out of place, thanks to blackberry api I got including this one.

Tags: BlackBerry Developers

Similar Questions

  • Cannot use double-click trackpad or mouse to open files, photos and videos

    MacBook Pro retina almost nine 15 ". It worked fine, but suddenly I can't open files with double-click on the trackpad or mouse Apple. I have to use the right click and then select open or open with. Go to system preferences, select the mouse options, then reduce the speed (speed of double click) does not solved the problem.

    Try to remove the trackpad and mouse .plists

    Removal of the preference of the system or another .plist file

  • I have a new Toshiba laptop and the keyboard is equipped with a blue trackball (mouse) in the middle of it and I'm looking to disable

    I have a new laptop Toshiba and when I type my cursor will move to a different place at random.  The keyboard is equipped with a blue trackball (mouse) in the middle of it, and I think that it may cause the problem.  How can I disable it?   I don't want to disable my mouse pad, just the blue ball.

    Thank you

    Georgette

    Hello

    Check with Toshiba Support, their drivers and documentation online and ask in the forums of Toshiba.

    Toshiba - Forums
    http://laptopforums.Toshiba.com/

    Toshiba - Contacts
    http://www.CSD.Toshiba.com/cgi-bin/TAIS/support/JSP/navShell.jsp?CF=su_contact

    Toshiba - drivers - access your model
    http://www.CSD.Toshiba.com/cgi-bin/TAIS/support/JSP/home.jsp?NAV=download

    Toshiba - Support
    http://www.CSD.Toshiba.com/cgi-bin/TAIS/support/JSP/home.jsp

    ========================================

    There may be a program that runs in the tray near the clock in the bottom right that controls the
    device. Some Toshiba models have the keys of the map at the top of the screen (move the mouse all the way to)
    up to see if your model has this feature) which allows control on some devices. Some models
    have (usually indicated on the key cards) shortcut keys that control input devices.

    If nothing else works, try Control Panel - double - mouse and other pointing devices - devices Manager
    Click the device - driver tab - Disable. I would use this as last resort than the other options possible
    allow you to activate and deactivate the device much easier.

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

  • After you have installed windows 10, I can't use apple wireless key board and mouse magic. any solution

    I am facing a strange situation. I used Win7 on BootCamp. Last week attempted to upgrade to Win10. After the upgrade is perfect, I could not connect to the wifi or wired internet. called the Apple support, Windows supports, no one would help you. Downgraded to Win7, after decommissioning, apple wireless key board and mouse magic does not work. Called Apple support, after nearly 90 minutes of interaction with them, ZERO, no solution result. Apple support told me that an Apple engineer will call me at my appointed time. A call came, but no one answered.

    So, today did a clean install of Win10 through BootCamp. All right, BUT I still can't use apple wireless key board and mouse magic. Can someone help me with this situation? Apple & Microsoft support engineers have failed to help out me. Thanks in advance.

    Have you installed the Boot Camp Windows Support software?

    If you do not see some Mac functionality if you are using Windows on your Mac - Apple Support

  • Impossible to use the Central ball on the mouse button to change the distance in plan spot view in FS9

    Fs9 views

    I'm unable to use the Central ball on the mouse button to change the distance in plan spot view in FS9. I've never had this problem before! can anyone help?

    Hello

    1. what operating system do you use?

    2 did you change on your computer?

    I suggest you to follow the links and check out them.

    How to solve the pointer display problems mouse in Microsoft games

    http://support.Microsoft.com/kb/309703

    I also suggest you check if the middle mouse button works with other applications

  • How to fix Logitech Trackball mouse pointer which turns in +?

    Suddenly, I started having problems with my mouse, turning it into a + and not allowing me to use my left click.  I have to click on left and right and sometimes have to click several times so he could afford to enter words in the input fields.  Sometimes I can only move by using the tab.  I changed my mouse to my old and still am having this same problem.

    My mouse is a Logitech Trackball T-BB18 wired.

    I appreciate help or direction, you can provide.

    Check your mouse settings and try to set the default value:

    Change the settings of the mouse
    http://Windows.Microsoft.com/en-us/Windows-Vista/change-mouse-settings

  • HP Mini Mie - disable the Trackpad as mouse button

    I come from the new edition of Mi and very impressed by it's slick interface and style. I've used Ubuntu for about two months on my home machine, that is why it is annoying me right now...

    How to turn the tap trackpad click... in other words, tapping the trackpad would not act as if a mouse button has been clicked.

    I feel like this should be easy, but I think that the problem lies in the fact the Sub settings - system - there is only a 'Mouse' and not a 'Trackpad' option, so there is no settings click on and outside...

    Any ideas?

    Go to, advanced settings, control parameters, do scroll down to system and find the synaptic package manager. You can search for gsynaptics and install it. It now appears in the Panel settings like "touch pad". Use it to "turn off the tap" on the second tab make sure "disable touchpad" on the first screen because you will need to track down a mouse usb at the end.

  • When using the right button of the mouse Yahoo mail inbox (Firefox 8.0.1, Win 7, Yahoo Mail Plus) the Firefox browser window (backwards, forwards etc.) is on the menu of messaging Yahoo (open, print, etc. answer...). This happens in both Firefox Safe mode

    This has happened also in Windows XP I used until recently.

    Yahoo email menu is there but the Firefox menu is above it. I tried Firefox in all off safe mode and the problem happened again. I tried Yahoo mail in IE 9, and the right button of the mouse works correctly.

    Options > content-> click Advanced for the right to activate JavaScript

    Make sure that disable or replace context menus is selected.

  • HP Pavilion Notebook 17.3 ": cannot use the buttons and moving the mouse

    Hello

    I'm a pretty heavy gamer and I recently I brought a HP Pavilion Notebook with windows 10 on it, and I expect to play games on it

    But the problem im getting is, if I hold one button, the mouse does not work, which, as you can tell, is unplayable.

    Is there any solution to this? his v19.0.12.97 of Synaptics Pointing Device running

    Thanks in advance

    Hello

    I tried the following on a machine not that different to yours and it seems to work.

    First, download the Synaptics driver on the link below and save it in your downloads folder.

    http://ftp.HP.com/pub/SoftPaq/sp63001-63500/sp63417.exe

    Disable your wireless card (should be f12).

    Open Control Panel, open programs and features, right click on the Synaptics driver and select uninstall.

    When you are done, reboot the laptop.

    When windows has reloaded, open your Downloads folder and launch the installer of Synaptics - when this is complete, restart the computer again.

    Open the Synaptics settings panel, disable SmartSense, then check if the touchpad works now with a key on the keyboard is pressed.

    If so, turn on your wireless card and use the utility on the following link to prevent Windows 10 to update automatically the Synaptics driver.

    https://support.Microsoft.com/en-GB/KB/3073930

    Kind regards

    DP - K

  • Can I use any receiver for Microsoft Wireless mouse 3500

    I have Microsoft 3500 Wireless mouse, couple weeks back I lost his nano-receiver, can anyone help figure out if I can use any other receiver for her or I have to buy new mouse collect them all?

    If you have a receiver to predict the "Microsoft Wireless Mouse 3500" you might be able to connect again - not positive on this one (some Logitech devices can be "trained" to use other receivers).

    In general though - if you lose the receiver, that the mouse is golden.

  • My mouse pointer moves in the opposite direction, I intend when I use the touchpad on my laptop. It works fine when I use my docking station and external mouse. How can I fix it?

    I'm using Windows Vista with a Sony Vaio laptop.  At the office, I have a docking station with keyboard and external mouse.  Everything works fine with this Setup.  But when I unplug the docking station and use the touchpad on the laptop, my mouse pointer moves in the opposite direction, that is my intention.  I move my finger and the pointer down.  I move to the right and the pointer goes left.  How can I fix?

    Go to start /Control Panel, and then double-click the icon '' mouse. '' When this window opens, select the tab "Touch Pad" at the top. There's a box near the bottom called "Touch sensitivity", click on that. Change the settings a little bit lower than what they are currently at.

  • Access to the context using the keyboard rather than the mouse menu?

    I'm back using Windows (7) to my new job after using the iOS for 15 years.

    Now I find I want to use the keyboard to do many things that you can do with the mouse on iOS.

     
    The "Accelerator" keys are very practical. So - if I type , then

    - then I activate the command paste in Word, for example.

    Access keys are also available via a context menu. However, the only way to access the context menu - I can find - is a right click with the mouse.

     
    So now I'm back using the mouse AND keyboard, which sort of defeats the purpose.
     

    I find no way to pop open a context menu by using the keyboard. Any ideas?

    Unfortunately, if it is not a "integrated" way, it won't help, because I can't make any changes by programming to my computer either. It's very tight here :(

    Thanks for any help.

    A quick search on Google reveals that it is the key to use - if your keyboard has it:

  • Possible to use the XBOX controller as a mouse in Windows 7?

    PC Xbox controller

    I just bought a xbox controller to play games on my laptop, but also use it as a mouse, I basically would like to simply my controller, that throw out there, I can't understand how to set up like this. I installed everything, through calibration and nothing. Please help :/

    If you can't do it with the XBOX controller, then get a Logitech.
    Software from Logitech lets you map each stick thumb to the axis of the mouse.

  • Whan I have install 4.0 version after some use of my stop scroll on mouse stop working. only with firefox... I'm trying to reboot but it's the same... only whan I restart its starts working. pls if you have some solutions answer me tnx.

    Whan I install firefox 4 release my problems start with stop scroll on mouse. It just stoped working after a while. In other programs, it works fine. I try to restart firefox, but nothing happened. Solutions that help restart the computer.

    So if you have a solution please help.

    TNX

    Hakalo, here is another suggestion, and it's what I have on my computer. First of all, I went to the download page of Firefox and downloaded Firefox version 3.6.17 on my desk. Then I went into Control Panel (cp) (start, Control Panel, add remove programs) and deleted firefox to my computer [uter. I have then closed cp and went on the desktop and installed 3.6.17 immediately all the problems of ff, I had, went.

    In fact when you download a program my computer put on the desktop because it's where I want it to be, your situation might be different. You can check this in tools, options, general.l;

    Guilbert

  • My back and forward buttong disappeared. I can use the right click on the mouse, but prefer the buttons. That's happened?

    Nothing much to add. Where is the rear button?

    See here:

    How to customize or rearrange the toolbar items

    find the next button and back and slide it

    Thank you

    Please check 'Resolved' the answer really solve the problem, to help others with a similar problem.

Maybe you are looking for

  • Will Firefox run on Apple iPhone or iPad

    BONES of Will Firefox run on iPhone or iPad mini

  • LD4235: Speakers for monitor LD4235

    I need speakers for a LD4235 monitor. Should what kind I buy? -- Eric

  • Pavilion p6-2427eb: upgrade my hp clubhouse

    Hello! I want to upgrade my gpu to a Gtx 750ti graphics card. I just want to know if it is possible without problems? Thank you! (this one: http://www.amazon.fr/Gigabyte-N750TOC-2GI-Graphique-GeForce-PCI-Express/dp/B00IGQ4UX8/ref=sr_1_1?ie=...)

  • HP 2709M 27 "monitor - Webcam issue

    HP bought 2709 m 27 '' LCD monitor with HP Pav. Elite HPE - 137c Desktop on 14/04/10 the Club of Sam. On the front, the upper left corner of the monitor, about 2 "down and 1/2" in, there is what appears to be a lens of the webcam.  My monitor has bee

  • Pavillion 500-056: memory

    My office has four ram slots. Two blue and two back. Right now I have 8 GB of ram in the blue slot of Babu. I'll add another 8 GB of ram. Should I put it in the second blue slot? Not sure if I use the blue or black slot or is it important.