Cursor on the background Image

I have a complex series of customizable regions that is painted on the background of the screen in an application I'm building.  As I'm painting bitmaps on the screen, I capture the coordinates of each image to a global vector object.  The goal is to capture the X, Y of a user click to determine this graph that was clicked.

Paint works very well and the sets of vector up without any problems and I have a global navigationMovement and navigationClick both seized their appropriate events.

The first problem I have is that I can not understand how to make a cursor of any type appear on the screen, so I have no idea where the cursor is hoisted.

The next issue I'm facing is the X, the values of Y being produced are always 0,1-1,0 and 0,0-, which means that I don't get mouse movements on the screen.

I added a manager of vertical field on the screen (set to use the height and width), but that did not help.

Can someone please help?

The storm is actually a lot easier, because you don't need to keep track of your "position" - it is there where the person touched.  If you need to capture the TouchEvents

protected boolean touchEvent (TouchEvent message) {.}

and determine from the event where x and are and so where you draw your cursor.

The storm no is a little harder, you must override navigationMovement and move your cursor where it is, in the indicated directions.

Once you have determined that your cursor is over, invalidate() screen to redraw the it. This will force through the routine of painting.

Suppose you decide that your cursor is located at "cursorx" on the "superficial" and horizontal axis vertical.  Assume that your cursor is a Bitmap named _cursor (not very original I know).  The "slider" drawing is actually surprisingly easy.  Substitute paint in your screen as follows:

protected void paint (Graphics graphics) {}
Super.Paint (Graphics);

graphics.drawBitmap (cursorx, cursory, _cursor.getWidth (), _cursor.getHeight (), _cursor, 0, 0);

}

Job done.

Finally almost.  The above is simplified.  You will find that you might want to play wide speed real he of the movement, and if he moves directly to the point, or moving it slowly over a number of intervals (call invalidate() to force another refreshment).  You might also want to invalidate() only the area that you need to, so do not redraw the entire screen, just the area that had the slider to remove it and the area that the cursor has moved to.  Also cursorx and superficial in what precedes is the upper-left corner of the cursor, you can center the cursor over the point.

So much more to do, but I hope that you get!

Good luck.

Tags: BlackBerry Developers

Similar Questions

  • How can you save the background image contained in a Thunderbird e-mail message

    How can you save the background image contained in a Thunderbird e-mail message

    Have you read the instructions which preceded the right click? What of their suite?

  • How to change the background image of a newtab

    Hello

    I'm looking for a simple addon that will allow me to change the background image for my new tab page. I still want the empty bar url and the new tab to say "new tab". Just the simple ability to change the background image without changing anything else.

    Thanks in advance
    Niels

    Here's an add-on which may help! https://addons.Mozilla.org/en-us/Firefox/addon/customize-aboutnewtab/

  • How can I change the background image of an album?

    I'm trying to figure out how to change the background image of the album. I'm not trying to change the picture of the official album, but the background image for the album. Is there a way I can change it?

    Your screenshot is the section of the iTunes store. None of the graphics or text on the iTunes Store are under your control. You cannot change them.

  • Why change the background image of the dashboard of data crash the app?

    I'm changing the background image of my dashboard (on a third generation iPad).  Whenever I try to make the change, the data dashobard app breaks down just.  Even if I try to change to a color, the application crashes.  I can insert a picture without problem.  I guess it's just a bug or something but has anyone else seen this problem?

    I was able to reproduce this crash with the following steps:

    -Set up a background image of a page

    -Copy the dashboard somehow. You can reproduce the dashboard, share by email, export and re - import OR clouds, etc.

    -Open the copy of dashboard

    -From the copy, change the background image (for a solid color or another image)

    If you set a background image of a page, close and reopen your dashboard and then try to change the background to something else, you will encounter this error.

    Solution: If you have the original background image in your Camera Roll, you can fall as an image on the same page (Photo Palette, select in the library). Then you can remove this image and change the background also image.

    If you do not have the original image, you may need to start with a new dashboard. (For each page on the old dashboard, you can tap the bottom, select all, copy / paste on another dashboard).

    There is a similar problem with images removed, if you shared the dashboard and you work on a copy. In this case, the solution is to copy and paste the image before deleting. (Otherwise, you'll get a dialog error instead of an accident, but the image is not clear).

    I deposited cars for these issues internally. Sorry for the inconvenience.

  • Set the background image of a cluster? [LV 2013]

    Hello-

    Researcher, said, "why don" t you turn the image on the front panel and then decorate the image with the controls? See? Problem solved. "And the door closes.

    So, I take the picture, scaling properly and voila! It is now the background image.  Then add controls.

    The horizontal and vertical scroll bars to move controls... but the background image is not followed.  So if someone touches the scroll bars (they are required) then controls and image are aligned.  Worse yet, their modified track manually is a pain in the eye-hand control.

    I could put in a button titled "realign" and have it reset the position of the scroll bar. Or have the scrolling screen VI bar position (look at the FP zero spot) and some treatment to shift the image of the picture.  What is its painful.  Is there another way around the problem?

    HM. A cluster? Clusters follow the scroll bars. But I can't seem to put a background image a cluster. The background color can be changed... but I don't see a way to paste a picture.  I tried customizing the cluster control and attempted to use the same method to add an image as on the front panel (with the right button of the scroll bar, follow the instructions). This has changed the background of the typedef would control.  Saved.  Tried to use it. LabVIEW will > BEEP<  and="" nothing="">

    I really want to avoid building this complex picture of decorations.  Especially when the image has chemical compounds in the boxes: how to index and the letters and numbers?   That... and the image is one of these steps 'it's refinement... ».

    Thank you for your time.

    Mark

    You don't give enough information on how this actually looks like and I don't have any experience with background images, but I would simply say, you drag the image file in the public Service and use the command menu in the toolbar to move backward (Ctrl + Shift + J) and then it must maintain position relative to other objects. You can then use the same menu to lock, so that it is not moved accidentally. You can also place an image control in the back and load the image in the code if it changes a lot, but this isn't a recipe for positioning the elements properly.

    I also generally agree with Martins that scrolling is a flag. If you need to scroll, you look and see if there is a problem and other solutions.

  • Windows xp monitor does not display the background image

    My windows xp screen does not show the background image. Started when I changed the photos there twice. Now, the background image is only 1/4 of the image on the left 1/4 of the screen. The rest is white for 3/4 on the right side.

    Other images, all jpg files, are the same.

    Hi edwardo418,

    Check that your post office is set to stretch. Perform the following steps.

    1. Right-click on an empty space on the desktop.
    2. Select Properties.
    3. Select the Desktop tab
    4. Change the setting to Stretch under Position
    5. Click on apply
    6. Click OK

    Let us know if that helps.

  • Cascades: How to set the background image for the menu drop down and etc...

    Hello

    Is there an easy way to set the background image for the menu drop down and etc, current support only black as a background?

    Thank you

    Tom.

    Welcome to the forums!

    This is currently not supported unfortunately.

    I encourage you to save a feature for this request:

    https://www.BlackBerry.com/JIRA/secure/dashboard.jspa

    See you soon!

    Martin

  • How to add the background image to the screen

    Hi all

    I want to add the background image to the main screen how can I do it.

    On the main screen, I used

    -a manager of HorizontalFieldManagerField to view the bitmapField (horizontally).

    -a manager of VerticalFieldManagerField to view the bitmapField (vertically).

    already images of display screen (bitmap field) with Horizontal and Vertical Manager, but I also want to display the background image for the screen, how can I reach this help me please.

    Concerning

    Adkins

    Thanks for all the response, I tried and sloved logic here how I did

     VerticalFieldManager mainVerticalManager = new VerticalFieldManager(Manager.NON_FOCUSABLE|Manager.NO_HORIZONTAL_SCROLL|Manager.NO_VERTICAL_SCROLL){
                protected void paintBackground(Graphics graphics)
             {  
    
             }
             protected void sublayout( int maxWidth, int maxHeight )
             {
    
             }
            };
    
    then i added other to manager on to this
    

    My problem is sloved thank you for the reply

  • How can I change the background image for the lock screen?

    Hi, I just bought a new laptop and I got Windows 7 installed in the store, and I would like to change the background image for the lock screen.  When I went to activate my account, I found out that it has already been activated, but I can't find the settings-> settings more PC in the lower corner on the right.  Thank you!

    Lock screen?

    Are you referring to the login screen?

    Or wallpaper?

    Right-click on your desktop and select Personalize.

    Office link is at the bottom left and use a win-7 theme.

  • Whenever I have shut down my computer, it displays a popup saying to close the background image and then it stops.

    Original title:

    Whenever I have shut down my computer, it displays a popup saying to close the background image and then it stops. Should what settings I change so that does not happen?

    Hello

    1. What is the brand and model of the computer?

    2 have you made any changes to the computer, before the show?

    Method 1:

    Perform a clean boot and check.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    Note: Once you are done with the boot, follow step 7 of article to reset your computer to normal startup.

    Method 2:

    Change the wallpaper and check.

    Change your desktop background (wallpaper)

  • How to change the background image in a model.

    I have Startboot Business Casual open in DW.  It has a brick background.  I want to replace it with a few trees and clouds.  I did a picture of decent size and I've replaced the image, bg.jpg in files, but nothing has changed.  Do I have to change the code?  And if so, how?  Or should I remove the background image for each page and then replace it with the new image?

    Did you do a refresh of the page? You are testing in a real browser?

    Nancy O.

  • How to change the background image of the "submit" button

    Hi all

    I want to change the appearance of a submit button: instead of show a button with text 'Add', I want the button submit to be like an icon 'more'

    I tried to change the background image of the button submit like that, but it doesn't work. What is the ownership change?

          CSSStyle customCss = new CSSStyle();
          customCss.setProperty("background-image", "url('/OA_MEDIA/plus.png')");
          
          OASubmitButtonBean addSubmitButton = (OASubmitButtonBean)webBean.findIndexedChildRecursive("addSubmitButton");     
          addSubmitButton.setInlineStyle(customCss);
    

    Thank you

    Kind regards

    Afaf

    Why not try with just an Image and fireAction on it?

  • Change the background image on the login page (smarthphone theme)

    Hello

    I would like to know how to change the background image on my login page.

    Version of the apex is 4.2.4.
    The theme is jQuery Mobile Smartphone (topic 50).

    Pls remind me if I missed some important information.

    I have a model of customised area on this page. My user name text fields and password + "CONNECT" button is placed in this area.

    I also have an inline css that centers in my area. My dimensions of the region are also placed here.

    Not available to access the application today so bad im trying to provide the look of it with a drawing.

    Also I noticed that my experience has some white color.

    Ty for any information that you provide.

    0Ja9gNj.png

    Hi Para,

    Try the style of your page like

    
    

    But if trying to define for your application color gradients extract ThemeRoller to http://jquerymobile.com/themeroller

    to set the themes of all colors and gradients you want without doing custom overrides CSS jQM Apex definitions.

    Everything you have requested can be configured via the ThemeRoller.

    Also found what may be useful if you are going to customize your login

    http://orapedia.files.WordPress.com/2012/12/how_to_set_background_image_in_a_oracle_apex_login_page.PDF

    Kind regards

    Benjamin.

  • Why the title of movement causes the background image bounce?

    Why the title of movement (contemporary - GenerelLabel) cause the background image very briefly "bounce back" toward the end of the title when played?

    I use for the parameter background, freeze frame.  I'm 'Frozen Framing' photo.

    I realized what was causing the bounce.  The length of the title Motion was slightly longer that the duration of the playback control bar appears (at the bottom of the screen) when viewing in full screen.  So, whenever the playback control bar has disappeared, he did the title of movement (appear) to bounce.  In fact, the title of Motion was not bouncing back... it was just the screen bouncing / adjustment to the fact that the game-control bar disappeared.  I was not used to this because all other media players that I use don't behave this way.

Maybe you are looking for