How can I configure this behavior of a field?

Hi guys,.

I have a class that extends LabelField. The behavior I want for this field is when someone focuses on it and then click on the trackball (navigationClick?) or presses ENTER, the field must have the attention and all events are to be charged to this field.

What I want to do is a kind of a counter. When someone click on the trackball or press ENTER on the counter, the user can scroll upwards or downwards or press on upwards or downwards to increase or decrease the number.

How can I do this?

I chose correctly LabelField for this?

Thank you

Try this

    LabelField lab22 = new LabelField("Count: ", LabelField.FOCUSABLE) {
        boolean _soakUpMovement = false;
        int counter = 0;
        protected boolean navigationMovement(int dx, int dy, int status, int time) {
            if ( _soakUpMovement ) {
                counter = Math.max(0,counter + dy);
                this.setText("Count: " + Integer.toString(counter));
                this.invalidate();
                return true;
            }
            return false;
        }
        protected boolean navigationClick(int status, int time) {
            _soakUpMovement = !_soakUpMovement;
            return true;
        }
    };

Tags: BlackBerry Developers

Similar Questions

  • OBIEE remove the spaces to the left. How can I change this behavior?

    Nice day.
    I have characteristic note OBIEE - it removes the spaces at beginning of data in the columns. But I need not in this function. I use spaces to format the name of hierarchy. How can I disable this OBIEE? It is East 10.1.3.4

    Hello.

    Similar:

    Empty values in responses (trim)
    Re: Empty values in responses (trim)

    Concerning
    Goran
    http://108obiee.blogspot.com

  • Firefox requires to activate Acrobat Reader for each web site. How can I stop this behavior?

    Whenever I opened a PDF Firefox makes me activate the plugin Acrobat reader. "Allow and remember ' recalls only on a site-by-site basis. How can I get Firefox to always allow Acrobat reader plugin?

    This behavior is really boring and too controlling. Although years ago the Acrobat plugin was buggy, it has been stable for a long time. I don't like the Firefox builtin pdf viewer and I want to continue to use the Adobe viewer.

    You can set the default behavior in Firefox/tools > Modules > Plugins.

  • How can I fix this behavior JavaScript/Ajax 'funny '?

    Hi all!

    I have this kind of funny problem or, well, strange results...
    The problem is almost solved tho, but it's just this strange behavior that I can't solve.

    You can see what I mean here:
    http://Apex.Oracle.com/pls/Apex/f?p=9949:101:1370355978553401
    Username: visitor
    Password: visitor

    Connect first, and then change the URL to access the 24 page (or just click on 'Web platform', then from the submenu, click on 'meals and the models', and then in the custom menu on the left click on 'Show models'.

    If you are finished, click one of the links in the report.
    You will see that all of a sudden, the whole page seems to be shown within another region (region named "Menu2", under the normal menu region).
    It's like... A page in a page. Pageception (creation... Pageception... Get it?).

    Now, all this is happening WITHOUT refreshing. Yes, I want it to be dynamic. My question is:
    How can I change my code in such a way that it does NOT display the entire page 24 inside this region menu2? I want to display a popup, not a page in a page...

    My code to do so is my Page attributes. In the JavaScript tab, I have the following code for the popup, and inside, you will find the code for these values in the elements of the page as well:
    $( function(){
      $('#ModalForm').dialog(
       {
         modal: true,
         autoOpen: false,
         width: 500,
         height: 350,
         buttons:{ Calculate: function(){calculateTotal();},
                   Close: function(){closeForm();}         
       }
      });
    });
    
    function openForm(pFoodTemplateId, pMealTypeId)
    {
    var getone = new htmldb_Get('shiny',&APP_ID., null, 24); // initialize get 
    getone.add('P24_TEMPLATEID', pFoodTemplateId);
    getone.add('P24_MEALID', pMealTypeId);
    gReturn = getone.get();
    getone = null;
    
    $('#ModalForm').dialog('open');
    }
    
    function closeForm()
    { $('#ModalForm').dialog('close');}
    
    $(document).ready(function() 
        {$('a.temppop').click(function() {openForm();});
    });
    "Brilliant" is the name of the ID in my region 'menu2 '.

    In which case I'm not clear (which I guess, since I'm in a rush):
    I have 2 page elements that get the value of foodtemplateid and mealtypeid of the selected line. The URL of the link column in my report is:
    javascript: openForm(#FOODTEMPLATEID#, #MEALTYPEID#); 
    So, in a nutshell, item: P24_TEMPLATEID Gets the value of the foodtemplateid that corresponds to the selected line and article: P24_MEALID Gets the value of the mealtypeid that corresponds to the selected line.

    Thank you for your time. I really appreciate it.


    Apex version: 4.1.1.00.23

    Hello

    I would create the application on the application MODEL of source process

    HTP.PRN('OK');
    

    And change the JavaScript

    var getone = new htmldb_Get(null,&APP_ID.,"APPLICATION_PROCESS=DUMMY",&APP_PAGE_ID.); // initialize get
    

    Kind regards
    Jari

    -----
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Yahoo seems to load with no style, but loads correctly in a private window. How can I fix this behavior? FF20.0.1

    Since FF20, yahoo.com and yahoo mail come appearing as if she does not use any style page. The logon fails. However, when I use a new private window, all is well for this web site (even if no link didn't get marked as visited - as expected).

    I would have maybe some preference switched or such? A search on the web these last shows no similar problems...

    Thank you.

    The instructions above have solved the problem. I finally had to disable Mozilla Labs: prospector - subject: trackers 2.

    I forgot this experience. Now it's over and the sites are restored.

    Thank you!

  • The new tab behavior is driving me crazy. It keeps re-centering on legs closest to the top of the list when I move a tab. How can I change this?

    The new tab behavior is driving me crazy. It keeps re-centering on legs closest to the top of the list when I move a tab. How can I change this?

    I don't want to download an application. I would rather add a new string in any config or just change those there to false. It makes my life as a rather hard work, to be forced to go all the way back at the end of my list after you move a tab just to have to do it again. I mean it's to the point where I could consider changing browsers if they had tab scrollbars.

    Edit: Now I will download any application. Please stop this stupid feature.

    I downloaded the beta version and it stopped. Thank you all for trying to help anyway. I probably didn't explain my problem very well in the first place, but you tried to help him. Thank you.

  • Error message: "the application failed to start because its side-by-side configuration is incorrect." How can I solve this problem?

    Program does not start. Error message "could not start because its side-by-side configuration is incorrect." How can I solve this problem?

    Program does not start. Error message "could not start because its side-by-side configuration is incorrect." How can I solve this problem?

    Solved!

    http://answers.Microsoft.com/en-us/windowslive/Forum/Messenger-wlinstall/the-application-has-failed-to-start-because-its/3f8a8186-9E97-4962-BE5D-b453b1597a78?tab=AllReplies#tabs

  • How can I configure the cell data format

    How can I configure data format of cell numbers: for example, I want to capture 123456.78 and need to be 12A3456.78?

    I tried to put #A # #. # format option, but it didn't work a few time and it became A123456.78.

    I also tried on excel and it worked very well, but I like the numbers better. is there a solution to this problem?

    Thank you

    HEY Chi - Lun,

    I don't think that this is possible as many number format. You should be able to insert A in a text string using a formula, but this would happen in a second cell, not that the number has been entered.

    "Assuming all the"numbers require the same inserted letter after the second number, this should do the work."number" entered in column A; the formula in column B. In the table below, your value as an example is A6.

    = Left (A, 2) & "A" & RIGHT (A, LEN (A) - 2)

    Kind regards

    Barry

  • How can I configure firefox to play a beep sound when my yahoo or gmail mails to the?

    How can I configure firefox to play a beep sound when my yahoo or gmail mails to the?

    Hi, you could try the add-on x - notify .

    If your question is resolved by this or another answer, please take a minute to let us know. Thank you.

  • How can I configure my Mozilla Thunderbird to me for new confirmed before leaving?

    I used to use Microsoft outlook. In outlook, we use the button 'close' at the top right of a mail to close this letter.
    In thunderbird, this 'x' is available on the top somewhere in the middle.

    To close a mail, I click on the upper right corner by mistake and the release of Thunderbird (which I didn't) by mistake.

    How can I configure my Mozilla Thunderbird to me for new confirmed before leaving?

    As far as I can see there is no easy way to do this. However, an easy option is to have the Thunderbird in the system tray on hitting the close instead of closing button. The add-on "Minimize on start and close" for Thunderbird accomplishes this mission and to close all what you need to do is right-click on the icon in the taskbar, and then click close to close actually it. I hope this helps.

  • How can I configure mobile android password manager copy all of my passwords from firefox to my office?

    How can I configure my new mobile password manager for my android phone copy all of my passwords from firefox to my office?
    Right now, I noticed there is only about 8 passwords listed.
    But my office saved password manager has about 50 listed.
    This makes me think that the android app is to choose only to remember what I saved directly with my android. I want to capture all my saved passwords from my desktop also.
    I tried recheck my firefox sync options, but only confirmed that I don't have this game automatically synchronize all my data (including passwords.)

    I found that I have to press the 'Menu' (three horizontal lines in a square) in the mobile view and connect until I'm able to meet Firefox on Android.

    Now that you're on your desktop: try passwords uncheck in synchronization preferences, wait a few seconds, then check again. Then on your phone, the settings of the open Android app, accounts & sync, choose your Firefox Sync account, then Menu > sync now.

  • How can I configure Windows XP Home for a Toshiba NB250?

    Hello

    I have a toshiba nb250 with a pre installed win7 starter.
    But I need a windows XP on this machine, and I can not configure it.

    How can I do this?

    Have you consulted the Toshiba download page if your machine is supported for Windows XP Home edition?

  • How can I configure numerical Lock ON when the computer starts?

    I have a new laptop HP G70.  In the User Guide HP G70 on keyboards - C01540939.pdf, paragraph 3 using keyboards & pointing devices, Page 8 there is a note "the function of the keyboard that is active when the computer is turned off is restored when the computer turns on.   This does not work on my computer HP G70.  It always starts up the number Lock OFF.   How can I configure my computer to set the digit Lock ON when the computer starts?  I always use the number keypad and never use page up/down - button on top/bottom/right/lelt arrow.

    Also, how can I configure my computer to set the touch mouse on the computer OFF for the start.  I always use an external mouse.

    Any help would be appreciated.  It is a simple thing, but the present operation HP G70 is most annoying.

    PLEASE DO NOT CONTINUE TO MEET THIS PROBLEM!

    THE HP G70 WAS FAULTY!   EACH HP G70 HAS THIS PROBLEM!

    HP REPLACED MY HP G70 WITH a HPdv7.  THE HPdv7 PERFORMED THE DESCRIBER NERMAU LOCK FUNCTION AS IN THE HP INCTRUCTIONS.

    .

    Bob_in_PGI

    I'm surprised that nobody knows how to set the Num Lock at startup before you connect.  Where is the help of HP?

    I now have Windows 7 64 bit.

    There must be someone who knows how to do this.

    Bob in PGI

  • How to create an animated title that scrolls like a classic title that is too large to fit on the screen of the iPod. How can I do this?

    I would like to create an animated title that scrolls like a classic title that is too large to fit on the screen of the iPod. How can I do this?

    < scratching head > long forgotten, how that will look like...?

    like in this video, around 00:40?

    https://Vimeo.com/11838765

    apply to your text moving or two keyframes and a mask behavior, I would say...

  • I have an iMac, the 27 "Office 2013.  Whenever I turn it on now the cooling fan begins to operate.  How can I stop this?

    I have an iMac, the 27 "Office 2013.  Whenever I turn it on now the cooling fan begins to operate.  How can I stop this?

    You must first check for any failure of equipment. Please use this section of Apple:

    Apple Diagnostics using - Apple Support

    to run the Diagnostics from Apple on your computer and reprot back here if there is no result.

    You can also do an SMC reset seeing weird fan behavior:

    Reset the management system (SCM) controller on your Mac - Apple Support

Maybe you are looking for