need some advice on TrackwheelListener and display screen

public class NewApplication extends UiApplication {
    private MainScreen mainScreen;
    private static RichTextField enteredText;

        public static void main(String[] args)
        {
                NewApplication theApp = new NewApplication();
                theApp.enterEventDispatcher();
        }

        public NewApplication()
        {

            mainScreen = new MainScreen();

            enteredText = new RichTextField("", RichTextField.NON_FOCUSABLE) {
                public void paint(Graphics graphics) {
                    graphics.setColor(Color.RED);
                    graphics.clear();
                    super.paint(graphics);
                }
            };

            LabelField title = new LabelField("Banner",
              LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH | LabelField.FIELD_HCENTER) {
                public void paint(Graphics graphics) {
                    graphics.setBackgroundColor(Color.BLACK);
                    graphics.setColor(Color.WHITE);
                    graphics.clear();
                    super.paint(graphics);
                }
            };

            mainScreen.setBanner(title);

            Font myfont1 = Font.getDefault().derive(Font.BOLD, 35);
            Font myfont2 = Font.getDefault().derive(Font.BOLD, 35);
            HorizontalFieldManager aahfm = new HorizontalFieldManager() {
                public void paint(Graphics graphics) {
                    graphics.setBackgroundColor(Color.BLACK);
                    graphics.clear();
                    super.paint(graphics);
                }
            };
            RichTextField blackaa = new RichTextField("user input -->    ", RichTextField.NON_FOCUSABLE | RichTextField.USE_TEXT_WIDTH) {
                public void paint(Graphics graphics) {
                    graphics.setColor(Color.WHITE);
                    graphics.clear();
                    super.paint(graphics);
                }
            };
            blackaa.setFont(myfont1);
            enteredText.setFont(myfont2);
            aahfm.add(blackaa);
            aahfm.add(enteredText);

            //Display the main screen
            pushScreen(mainScreen);

            //Create an instance of and display the custom dialog.
            EnterDialog textEntryDialog = new EnterDialog();
            textEntryDialog.show();

            mainScreen.setTitle(aahfm);
            mainScreen.add(new SeparatorField());
        }

        //Allow the Dialog to update the text by calling this method.
        public static void setText(String newText)
        {
                enteredText.setText(newText);
        }
}

How to add the horizontalManagerField after the data of user input?
the first screen was therefore only banner
then after the input display user data using the horizontalManagerField

class EnterDialog extends Dialog implements TrackwheelListener {
     private BasicEditField entryField;

     public EnterPinDialog()
     {
         super(Dialog.D_OK, "", 1, Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION), Manager.FOCUSABLE);
         entryField = new BasicEditField("Enter data : ", "", 8, BasicEditField.EDITABLE | BasicEditField.FILTER_PIN_ADDRESS);
         add(entryField);
     }

     public boolean keyChar(char key, int status, int time)
     {
         //Override key commands
         switch (key)
         {
            case Characters.ENTER:
                //Update main class with the entered text.
                if (entryField.getTextLength() < 8) {
                    Dialog.alert("must 8 character");
                    break;
                }
                blackkeygen.setText(entryField.getText());
                this.close();
                break;
                //Override the backspace key to delete the last character.
            case Characters.BACKSPACE:
                if (entryField.getTextLength() > 0) {
                    entryField.setText(entryField.getText().substring(0, entryField.getTextLength() - 1));
                }
                break;
                //Override the escape key to delete the last character.
            case Characters.ESCAPE:
                if (entryField.getTextLength() > 0) {
                    entryField.setText(entryField.getText().substring(0, entryField.getTextLength() - 1));
                }
                else if (entryField.getTextLength() == 0) {
                    System.exit(0);
                }
                break;
                //Enter the character the user typed into the EditFie
            default:
                entryField.setText(entryField.getText() + key);
                break;
         }
         return false;
     }
     ////////////////////////////////////////////
     /// implementation of TrackwheelListener
     ////////////////////////////////////////////
     public boolean trackwheelClick(int status, int time) {
         if (entryField.getTextLength() == 8) {
             blackkeygen.setText(entryField.getText());
             this.close();
         }
         else {
             Dialog.alert("must 8 caracter");
         }
         return false;
     }

     /** Invoked when the trackwheel is released */
     public boolean trackwheelUnclick(int status, int time) {
         return false;
     }
     /** Invoked when the trackwheel is rolled. */
     public boolean trackwheelRoll(int amount, int status, int time) {
         return true;
     }
}

trackwheelunclick n trackwheelclick works correctly, but the book didn't work? I already call the roll. I missed something?

im a beginner in programming java n blackberry...
Thanks before

My first advice is to get rid of TrackwheelListener. It was not a Blackberry made with a wheel for years.

It is replaced by navigationMovement().

Tags: BlackBerry Developers

Similar Questions

  • RV180 need some advice/Suggestion regarding the rules of access and Services

    Hi, I expected to get some advice or suggestion with a RV180 question.  I have a cable modem connection that connects to my port WAN RV180 and we have a single static IP address on the WAN port and everything works great.  We have an internal Exchange Server, so we have a few inbound rules access allowing for ports 443 and 25.  It all works.

    This is the question that I encounter.  We have now another service internal now needs outside inside access on port 443 (https), but I already have this configuration on the router for Exchange and when I have both sense, of course, it won't work correctly because the router just takes the first rules of access and use the one that works very well for traffic Exchange , but not my other service.

    Is there another way to get this job where I can have two internal services on port 443 and the router can forward traffic appropriate to each of them since my first IP? (it doesn't really matter if I had two IP addresses because it always hits the same access list for internal services)

    All advice or suggestion would be great

    Hi, yours is a general networking, not specific to RV180 problem.

    As you have only one IP public (on the WAN port), you only have a single port 443, you can support two services outside-to-inside.

    The cheapest solution is one of the services to another port, if the service permits.

    The most expensive solution is to have public IP addresses.

  • Need some advice on a motion graphics/editing PC build.

    Here's the deal. I was builing custom PC of for more than 20 years, but not a system anything close to that I intend to build then and need expert advice and information about a person to her. I'm looking to build a system designed for video editing, creating motion graphics and 3D modeling, and some argue more questions about which components would be best for my needs (mainly on the graphics card and hard drives).


    The first is the card video (s). And I say 'maps' because I don't know if I need more a card for what I am trying to accomplish. I have create many long 3D animations and complex using Blender and After Effects, in addition to changing a variety of projects in creation and you want the best bang for my money. My budget for this system is quite high ($5 k and 10 k $) and I know I can get amazing at this price performance if I get the right equipment. Thus, on the cards. From what I have gathered, briefly, Google search, is that I want a card with CUDA Nvidia for video editing. My main question in this area is, would be to dual graphic cards or using SLI quad be good in what I'm doing or is SLI mainly intended for improved game performance? From what I understand, I think that (at least the video, not sure about 3D animation) is done mainly using the CPU and GPU not; Although the help of CUDA. Basically, I need to know how useful it is. If I bought two or four GTX 980 see a significant improvement in After Effects, Blender or creation? I plan to get one of the top (if not the top) i7 CPU I can find, so it won't be a bottleneck of my CPU performance, so please does anyone suggest to put the money into the CPU rather than the GPU because I already put the maximum amount here.


    My other main question is regarding hard disks (or solid state). I'm doing a bit of editing and modeling 3D on a laptop and it's getting really well for projects bit, that I have worked so far, but as I started to work on projects that have strict deadlines, I'll need a system that can make it basically as fast as possible. My main question in this area is, should I use any sort of RAID array. I looked at several forums, but none of them specifically answered the question for my unique situation. Most other forums says ' well, if you will only use it for editing and not animation "etc but I'm going to do a 3D animation as well, so I need to know what the answer is in this case instead... I also know that the other messages regarding the change of systems, to recommend the use as three discs for things like "scratch disks". I have a feeling that I'll get a few recommendations here saying I need like seven discs for what I'm trying to make, which are the answers that I really can't wait to hear about. I mainly looked at RAID 5, 6, & 10 but do not fully understand them, and have in fact never implemented in any system I've built so far. From what little I understand, I think that RAID 10 would work better for my needs, which offers a great read & write speeds which is important and also provides redundancy, which IMO is even more important. I can't have the system down for an hour, or worse a week because one of my drives breaks down. My other question in this area is a table of the SSD would greatly improve performance in a RAID 10 array? Would it be profitable? I read in a post recently that drives hard actually handle more large files better than SSDs and worried to SSD in the test bench because they would not be able to handle larger video files and I'll use it frequently as well as hard drives would be. I guess I'll be shooting and editing many 4K projects soon and need a system that will handle this resolution well. If I have to use 4 hard drives in an array of RAID 10 for my OS (the RAID for speed and redundancy), drive a small SSD for a scratch disk and a large SSD or HARD drive for a player video output, please list the exact readers/configuration that you would suggest that I use and why. I am very interested in a bit of a discussion here to get the best possible configuration for the money and will respond to all sincere responses as quickly as possible.

    I know I already asked several complicated issues here but am hoping someone with a little more experience that I have in building editing systems can provide some advanced tips and help me and someone else who can try to build a similar system in the future. I know also that this issue is not specifically intended for the AE, but it has to do with this and because EI is editor and motion graphic, I'm find the best advice for a system that will edit video and create animations. Thank you 1 million (in advance) to anyone who provides a contribution instructed in answer to the questions that I have!

    simply 2xssd raid 1 (mirror) for the OS/applications.

    1 ssd for zero/previews

    second raid 6 or 10 with the hdd or ssd for the media.   (if you don't get a lot of drives to get the speed, you will want to use ssd.)

    No raid for backups. can use several disks hard, but in combination with off-site, such as cloud backup.

    Optional could be another ssd for cache/export. If the ssd scratch fails, it would be able to support.

    can take a look at the guides of storage here for more information.  Tweakers Page

  • Need some advice FC...

    .. .wondering if someone can give me some advice on fiber channel.

    We are running two without: a former EMC NS20 and a new HDS. Both have CF, but only to systems meeting some, Lun most are iSCSI. We have two switches Cisco MDS 9148 for HA. We currently have a c7000 using iSCSI to one of our SAN systems, all the blades in this system are running ESX 4. I would add this c7000 CF, but I am interested in refurbed 4 Gb CF because we are more expansion of this system (we have an another c7000 using FlexFabric for newer blades).

    I've been searching online trying to figure out what that HBA and interconnection modules would be appropriate. I ran in the QLogic QMH2462 HBAs, Emulex LPe 1105 and I wonder who works more own with ESX 4 and would play well with our switches. I also met a few IC modules options: the "HP 4 GB Virtual Connect Fibre Channel Module" and the "Blade switch Cisco MDS 9124e.

    So I wonder if anyone has any advice what may work better in my configuration. And what experiences anyone could have a similar setup.

    Thank you

    -Mike

    ... QLogic QMH2462 and Emulex LPe 1105 HBA...

    IMO, you can use one of the HBA without problems. I've never had problems with QLogic or Emulex no matter if used in servers in rack or blades.

    ... the "HP 4 GB Virtual Connect Module Fibre Channel" and the "Blade switch Cisco MDS 9124e '...

    The Virtual Connect module is only an option for a C7000 with Virtual connect Ethernet IC modules. I did not work with Virtual Connect from this so far (with the exception of the HP ASE training). I mainly use the Brocade or Cisco IC. In your case, I'd probably go with the Cicso (from the perspective of management), since you already have the switches DMS 9148 in place. However, as you may know, HP and Cisco are not best friends more

    André

  • Need some advice on the new computer from HP.

    I bought a new HP computer and it shipped just yesterday and delivery date is Thursday (12th).  I am new to HP computers, my other 2 desktops are Dell and Toshiba laptop of my wife. Laptop is Win 7 and desktop computers are Win XP. The most recent Win XP is:

    Windows XP Professional SP3 32-bit
    Intel Core 2 CPU 6300 @ 1.86GHz
    4 GB of Ram.

    Don't laugh, my other Dell XP desktop computer is simple core!  Laughing out loud

    These 2 computers will retire after I receive and configure the HP computer:

    HP Pavilion HPE h8 desktop PC - 1360t
    Windows 7 Home Premium 64
    3rd generation Intel Core i7-3770 to processor quad-core [3.4 GHz, 8 MB of shared cache]
    10GB DDR3 1333 MHz SDRAM [3 DIMMS]
    SATA 1 TB hard drive 7200 RPM.

    Do you think I'll note and difference? (I'm kidding) Laughing out loud

    1. is there a procedure for the implementation of the new computer? I'll be the only one to use it.

    2. I also want to do a recovery disk. Can I do this after having my computer account?

    3. the computer come with Service Pack 1 installed?

    HP Pavilion HPE h8 desktop PC - 1360t
    Win 7 x 64 ~ ~ SP1, IE11 ~ ~ FF i7 3770 3.40 GHz ~ 10 GB Ram ~ NIS 2014

    Congratulations for the excellent choice.

    1. is there a procedure for the implementation of the new computer? I'll be the only one to use it.

    With your experience, you probably won't have a problem. I strongly support you haven't set a password on it.

    You can always add a password later.

    2. I also want to do a recovery disk. Can I do this after having my computer account?

    Configuration of the computer and do what is required to complete the user account. It is advisable to only use DVD + R media. You will probably need 3-4 DVD + R and the usual CD - R disc repair system.

    3. the computer come with Service Pack 1 installed? This date should be. There will be updates.

  • new to the community of dell, who need some advice

    I'm new here, I just joined today after having been online with technical support. I have tried to post in the support forum and cannot find a way to do it, I do not have the link to start a new thread as on this page. Y at - it a reason for this, or if I am missing how to get and display somehow?

    squeen123

    It would be better to start a new thread, by using the new post feature in the upper right of this page.

    This thread has been locked, because of his age is 6 - + years

    Bev.

  • Need some advice on Satellite A100-998 and A100-049

    I am considering buying this laptop or maybe the a100-049... any thoughts or comments from the people?

    I heard the A100-998, you can't partition the hard drive... but I want just an overview of these laptops.

    If you compare the two units, you will see that the A100-998 has better equipment but comes with Windows Media Center Edition and A100-049 comes with Vista.

    I can't tell you anything on price but is perhaps the best solution A100-998. It is important that the material is good enough you can order Vista anytime. For about 17 euros, you can order Windows Vista Home Premium.

    On the partitions I can't tell you much, but I really can't believe that you can not do this. With the help of supplied recovery media, you can create partition (this works if you install OS again).

    Good bye

  • Just made anti-virus Malwarebyte s scan on my laptop and need some advice please...

    When the scan has finished a very long list of problems came, there was an option to remove the problems individually or completely, it would be safe just to delete the lot or it might cause problems, I would really advice you can give me...

    Malwarebytes' Anti-Malware is a reputable program that can be implicitly approved, just remove what it found.

  • Need some advice about the VPN between local Cisco router and remote Watchguard

    Hi all

    I am configuring a Cisco 887 to VPN router to a device of watchguard at the remote site.

    From what I understand, the VPN tunnel is in PLACE. I can ping to the remote server on the 192.168.110.0 of the network, but whenever I try to navigate to it on the local server, it wouldn't work.

    I ping the remote server via the IP address on the local server, but not on the Cisco router. Is - will this work as expected?

    --------------------------------------------------------------------------------------

    R5Router #sh crypto isakmp his

    IPv4 Crypto ISAKMP Security Association

    DST CBC conn-State id

    110.142.127.237 122.3.112.10 QM_IDLE 2045 ACTIVE

    IPv6 Crypto ISAKMP Security Association

    --------------------------------------------------------------------------------------

    R5Router #sh encryption session

    Current state of the session crypto

    Interface: Virtual-Access2

    The session state: down

    Peer: 122.3.112.10 port 500

    FLOW IPSEC: allowed ip 192.168.0.0/255.255.255.0 192.168.110.0/255.255.255.0

    Active sAs: 0, origin: card crypto

    FLOW IPSEC: allowed 1 192.168.0.0/255.255.255.0 192.168.110.0/255.255.255.0

    Active sAs: 0, origin: card crypto

    FLOW IPSEC: allowed 6 192.168.0.0/255.255.255.0 192.168.110.0/255.255.255.0

    Active sAs: 0, origin: card crypto

    FLOW IPSEC: allowed ip host 122.3.112.10 192.168.0.0/255.255.255.0

    Active sAs: 0, origin: card crypto

    Interface: Dialer0

    The session state: UP-ACTIVE

    Peer: 122.3.112.10 port 500

    IKEv1 SA: local 110.142.127.237/500 remote 122.3.112.10/500 Active

    FLOW IPSEC: allowed ip 192.168.0.0/255.255.255.0 192.168.110.0/255.255.255.0

    Active sAs: 2, origin: card crypto

    FLOW IPSEC: allowed 1 192.168.0.0/255.255.255.0 192.168.110.0/255.255.255.0

    Active sAs: 0, origin: card crypto

    FLOW IPSEC: allowed 6 192.168.0.0/255.255.255.0 192.168.110.0/255.255.255.0

    Active sAs: 0, origin: card crypto

    FLOW IPSEC: allowed ip host 122.3.112.10 192.168.0.0/255.255.255.0

    Active sAs: 0, origin: card crypto

    Crypto ACL 102, should really include only 1 line, that is to say:

    10 permit ip 192.168.0.0 0.0.0.255 192.168.110.0 0.0.0.255

    and you should have the image mirror on the remote end ACL line too.

    PLS, remove the remaining lines on 102 ACL ACL.

    I guess that the ACL 101 is NAT exemption, if it is pls include "deny ip 192.168.0.0 0.0.0.255 192.168.110.0 0.0.0.255" on top of your current line "license".

    Clear the tunnels as well as the NAT translation table after the changes described above.

  • Need some advice management on why and how I deliver ThinApp had in view the apps

    Why should I listen to apps? Is there a documentation out there to help?

    Please take a look at this document the performance of Streaming:

    http://www.VMware.com/files/PDF/VMware_ThinApp_Streaming_Execution_Mode_Information_Guide.PDF

  • Flash newbie needs some advice on a project

    Hey guys,.

    Thought I'd ask you guys to a general approach on a project I'm starting.  I have a background in computer science, so I lose patience with some of the beginner step by step tutorials that are out there online / in books.  What I lack, it is for you guys to let me know what will be important for me to learn what I want to do and what are the aspects of the Flash I can go without.

    I'm a grad student in Psych clinical and I want to build an interactive processing application.  Which basically translates to is that he will have a series of screens with text, sound, and video clickable icons that will show small films, I developed that my views on the principles of different treatment.  Anyway, I just wanted to know if you guys could give me advice on the best way to do it.  I can animate text and it's kind of basic, but I feel like I kind of sense in the dark right now and do not want to waste too much time on dead ends.  If you guys can give me an idea about the basic components of Flash, I'm going to need a solid understanding of creating a project like this, I would really appreciate it.  I'm sorry if it is vague, just trying to reduce the amount of time I spend of experimentation and if you guys could tell me precisely these modules/tools in the application that I have to use to do this I can take it from there.

    Thank you!

    -Ricky

    If you are looking for shortcuts, you're not likely to find.  The essential elements you need to know to start with the basics and expand from there.

    One essential thing you should learn is how to find and solve things by yourself using the Flash help documentation and a good search engine like Google.  Almost all the objects/classes have 3 basic elements (properties, methods, events) you need to understand how use/manipulate, and they are all identified in the help documentation.

    If you want to work with videos, start digging to learn the different ways that you can integrate... using a FLVPlayback component or the NetStream class.  If you want to learn how to work with audio, then dig learn how to use the Sound class.

  • Upgrade to DW8 to CS4. need some advice/info

    Since 1 year that I'm on DW8 (Studio 8) that I started doing websites with this program. (it is far much interesting as the progam that I had before).

    This year, I learned PHP and databases and dynamic Web sites.

    I think I have the CS4.

    Now, I have a few questions which I hope you can give me some info or advice:

    (1) can I upgrade only the DW8 off Studio 8 until CS4?

    (2) at - there a lot of difference between them.   The option is located somewhere else or buttons or are still in the same place?

    (3) can I still use my old page of DW8 in CS4?   Or should I convert or rebuild?

    (4) common bugs in CS4.  I wonder what I'm not technical to overcome a few bugs that seems easy to pro.

    Thanks in advance

    Kind regards

    Martine

    (1) can I upgrade only the DW8 off Studio 8 until CS4?

    # If you have 8 Studio, you must go to one of the suites which includes Dreamweaver.

    (2) at - there a lot of difference between them.   The option is located somewhere else or buttons or are still in the same place?

    Yes, there are a lot of changes, but you will find most of the things in the familiar places. Change that confuses many people when they first open CS4 is the Inspector is now an HTML view and a CSS view. However, once you go account links can only be created in HTML, most people display adjust pretty quickly.

    (3) can I still use my old page of DW8 in CS4?   Or should I convert or rebuild?

    HTML and CSS are the same, so you can use the pages without any update. If you have created all the PHP pages, you need to rebuild a lot of server behaviors unless you use Dreamweaver 8.0.2. If you use the version 8.0.2, all right.

    (4) common bugs in CS4.  I wonder what I'm not technical to overcome a few bugs that seems easy to pro.

    No software is perfect, but in my experience, Dreamweaver CS4 is very stable. There is a bug that annoying some dialog boxes, such as the dialog box insert Div don't remember what you choose in a drop for the first time. You must choose the same value again so he could stick.

    I'm sure you will find plenty of doomsayers who disagree as to the quality of CS4. The only way to choose is to try the demo version and see for yourself.

  • Need some advice on the best way to do specialized source distribution

    I need to give a customer a labview block, they can use our material in their own labview code that will read the (encrypted) data net senor off the coast and the flow of data in a form usable output.  I built a vi that can be used in a loop, a bit similar to the block of canned labview data acquisition that can be used to acquire data from products OR.

    There are many sophisticated (and secret) algorithms going on in the background which make sense data and translate them into a usable data table, but also configure the hardware itself. Accordingly the only final vi I prepared to distribute the client makes use of Subvi about 20. Almost none of these subvis could be ideally be reconverted in plain code in main vi, nor what I want to do this.

    The rules of the game is the following: I want to give him the block I created to use its own code, without him to see what's happening inside the vi.  I can deny him access to the block diagram/s, no problem, but I don't want to give him access to the subvis, to use, or even to know their names - preference they would be hidden or otherwise pre-compiled. Preferably I would just give him the main block only, perhaps with some support files that would be entirely opaque to him.

    Looking for advice on the best way to go. There is an elegant solution to this problem? For example, it would be better to compile the block as a .dll file, and then write a wrapper vi any?

    Have you thought of creating a packed library? You can also password protect your code. You can delete the distributed code block diagrams. You can use a combination of the above as well.

  • Home, indicators and display screen

    I use the 8820 model. my application uses display its main window. and when I opened the screen, it handles screen physical set, so his title covers the upper part of the main home screen, which contains indicators (GSM, then see the effective signal, battery level, etc.).  I want that part of indicators is visible. For example, as in the standard alarm application, which comes with the device. I would like as my main screen to occupy the lower part of the screen, and I would like to remove the title (instead, I intend to put a text in part of the indicators, which is another separate problem...). I would like if possible, avoid using contextual screens. I combed docs API, tried to play with the setting of the positions, etc. nothing works. could you give some directions please?

    Thanks in advance.

    You can emulate yourself the title bar. It is very difficult to imitate the original on all devices, but you can show some indications provided for in article http://www.jonathanhfisher.co.uk/b2/?p=19code (Yes, I stole this link http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=36011#M36011)

  • Satellite A200-1AH - need some advice for hard drive replacement

    Nice day

    I've been using a + A200-1AH + for three years. Unfortunately, I suffer from problem of free disk space. So, I decided to replace my drive with a new one.

    How can I know the HDD I buy will be suitable for my laptop?

    Can you please tell me what era the + key-points + I need to know when buying a new hard drive for my laptop?

    Post edited by: alicozgo

    I changed the subject, because it was so dumb. Why would I ask 'what hard drive buy' in a Toshiba forum :) what a forum administration...

    Hello

    Satellite A200 is a more recent series of laptops. This series of laptop use and support the SATA HDD controller and this means that you need a SATA HDD!

    The laptop runs the 2.5 hard drives. The speed of the HARD drive is not very important for compatibility so that you can choose 4200 RPM or other

    In addition the SATA controller has no limitation in size so THEORETICALLY, you should be able to use hard drives with 320 GB or more
    But in some cases rare BIOS would not be able to manage some HARD drive sizes, but this generally isn't the case

Maybe you are looking for