Question of the development of EditField and LabelField in HorizontalFieldManager

I actually want a custom editfield (a label with a textbox), when he got focus on this textbox draws a border of climax, and I want the label got the same effect, however, I drew a border outside the text easily because of the text box could receive focus , here is my code:

public class MyTextField extends EditField
{
    public MyTextField()
    {
        super();
    }

    public void layout(int width, int height)
    {
        super.layout(width, height);
    }

    protected void paint(Graphics g)
    {
        if(g.isDrawingStyleSet(Graphics.DRAWSTYLE_FOCUS))
        {
            setBorder(BorderFactory.createRoundedBorder(new XYEdges(6, 6, 6, 6), 0x186DEF, Border.STYLE_SOLID));
        }else{
            setBorder(BorderFactory.createRoundedBorder(new XYEdges(6, 6, 6, 6), Color.GRAY, Border.STYLE_SOLID));
        }

        super.paint(g);
     }
}

And I use this code to show in screen

       HorizontalFieldManager hfm=new HorizontalFieldManager();
        LabelField label=new LabelField("something");
        MyTextField text=new MyTextField();

        hfm.add(label);
        hfm.add(text);
        add(hfm);

Is there a way to implement that when the textbox has got the update at the same time also changed the color of the text of the label.

set a Boolean flag that you record in paint, set it on the ground (from outside) and invalid call to redraw.

Tags: BlackBerry Developers

Similar Questions

  • Technical questions about the development on the BlackBerry PlayBook

    Hi, guys

    Hope this is the right place to post my thread...

    I was asked to develop an application on BB PlayBook (I'm an absolute beginner on this point, however), and now what I have to do is:

    place an image in my application, and tapping on the image, the application will open a. PDF file.

    However, I'm stuck here because I did some research on this one, looks like on BB PlayBook, the only way to open a. PDF file is to be opened with Adobe Reader (version BB). My 2 questions are:

    1. how to call the Adobe Reader to open a. PDF file in my application? I tried the "browseForOpen' from the 'File' class method, it opens a file picker in my application, and I can see the. PDF file here, however, when I select the file and click 'Open', it will not open the. File PDF... and, of course, it will not

    2. based on question 1, on BB OS tablet is it possible to open a file without showing up the "file selector"? I would like to have the opened file directly as long as I click on the image that links to the file.

    I would be grateful if you could give me a quick points up on this.

    PS: I use Adobe Flash Builder 4.5 as the dev. IDE and build up my app as a Flex app.

    See you soon!

    Terry

    Try the function navigateToURL (...). In addition, the class File (openWithDefaultApplication) and QNXApplication (openFile) class contains the methods to open applications preferred, based on a file.

    Before BBX 2.0 Beta, these two methods did the same thing (it didn't). It has been reported as a bug, but I'm not sure if that has been resolved. Need to try all 3 methods to see which works for your needs.

  • [^^ New here] Ask questions about the development of Blackberry GUI

    Hi everyone, im new here.

    (My English is not very good, but in any case I'll do my best to be understable).

    First of all, I'm going to introduce myself:

    My name is Díaz de Miguel (South America, Chile) and now I'm working with a team on what we called 'Santa Maria Mobile Challenge' here in my University (UTFSM, Universidad Tecnica Federico Santa Maria) and we have an app for phones mobile Blackberry... IM in charge of the User Interface of the application... so, here's my question:

    I conceive an idea of how it looks at the application (we are new to programming in java and J2ME for Blackberry), I designed in Photoshop, and with a few readings, I realize how can I do this on J2ME BB.

    In my research on J2ME and Clases de BB I think I can do this with HorizontalFieldManagers and VerticalFieldManagers... tie them a background image for each FieldManager (of course I have to divide my original and more image "images") and connect (or trigger) behaviour when he focused...

    The idea of this is to make each component of our application classes:

    IE: Where it says "task 1", which blocks will be a HorizontalFieldManager with 3 VerticalFieldManagers, one with the «!» Icon, the Second bearing the name of the task, in this example is "task 1", and the third will be the other information... and perhaps on the third HorizontalFieldManagers 2 more...)

    Well well... the idea of this post is to know if im on the right way to apply for ugly or there is a better way... I accept all the comments... I want to win this contest.

    Thank you!!

    Miguel Diaz

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

    Reach:

    This is the Image:

    Hi and welcome to the development of BlackBerry,

    You are on the right track... It is difficult to design a beautiful blackberry app but you can do what you want with methods of painting FieldManagers und ...

    If you need help others let me know...

    Also if you need help doing some work im a blackberry developer contractor who is happy to help you any time...

    Concerning

    Paul Haenel

  • A few questions about the use of data and Cliq

    I have the cliq, however I chose to not get 3G (so I bought full fare). So I have a few questions about the phone and the use of 3G / 2 G/Edge:

    1 - is possible to disable completely the 2G / 3 G/Edge? I know you can switch between them, but are anyway just tell the phone to stop using them altogether since I'm not subbed to the service?

    2. when the update takes place, I guess we'll have to reconnect motoblur and etc, but if I don't have 3 G will I have motoblur connection problems after the update? Or he keeps the latest wifi settings so that it would connect to wifi to connect. When I first got my phone it was not a problem b/c I had 3G for the first month.

    I hope that makes sense, thanks!

    To stop all the data, I would like to download an application called APNDroid. He cut them all down. When you log on to blur you have 3G or WIFI doe this without getting a timeout error. During the process of setting up your Blur account, you can press the menu button and set up your wifi to work, this will connect you to Blur and your phone will be connected to the blur. If I were you I would be rethinking to do a data plan since you are really losing out on most of your main features of phones. It's your choice, however.

  • Legal question on the use of PwDump and utilities inject NT hashes in an ad

    Hello, I want to be able to inject actually stored in an OpenLDAP in a Drectory Active NT hashes.
    However, I have not found any solution without knowing the user to clear the password (which is not an acceptable solution for me).

    I intend to use the sources of PwDump6 and his ability to inject code through 'lsass.exe' to be able to import NT hashes in Active Directory using the method "SamrSetInformationUser".
    My question is not on the virtue of technique, but the legality of this.

    If I managed to do, - is it legal to use Microsoft point of view? And distribute the source publicly?

    It is a forum for peer to peer, not Microsoft. You will need to contact them directly. Look for the coordinates on the microsoft.com site

  • Question about the browser inside "sandboxie" and download to save an attachment?

    Hello

    I am very new to sandboxie. So please excuse my ignorance.

    I have the browser open inside sandboxie where I'm going to my gmail. I have an email from my son with a photo attachment. I have no trouble to consider this picture.

    However, I just found out that I couldn't save this picture on my computer HD. In sanboxie E-mail when I chose to save it in a folder in my computer HD shows like saved but when I close the browser and open my folder where I saved the photo allegedly - I can't find anything...

    So I guess that's the protection offered by sandiboxie?.  So if I need to save items of all reliable e-mails, I open my browser off sandiboxie to run my download?

    Concerning

    Snow,

    Yes, one of the goals of Sandboxie is to keep isolated... things so that, if you have accidentally downloaded a virus, he would be stuck in the sandbox [rather than infect your real system].

    Right-click on Sandboxie icon in your system tray, select Show THE WINDOW, the sandbox SAND SANBOX SETTINGS tab, DEFAULT ZONE.   On the left, click on the + sign of RECOVERY, to develop to reveal a QUICK RECOVERY.   You should see several locations of files listed there... perhaps including DOWNLOADS, DOCUMENTS, FAVORITES, or DESKTOP (even though I think some of your own peut be different).    You can add other folders of your choice.   These 'Fast food' files indicate the main areas where you want THAT Sandboxie really save files on your drive.

    It is spirit, back to your email address and see if you can direct download of your photo accessory in one of these files in particular.   When you do, you should see a popup of Sandboxie, indicating that the file is eligible for recovery, which means that it can be moved out of (side) of the sandbox.   I said in general to recover in the same folder (on my real system, as it was tyring to save in the sandbox).   And click on the RECOVER button.   If get you there, it should do the trick.

    There may be other ways to do it... but this method works for me.

    Also (now that you know where are the settings), there should be a setting to ask you to empty the sandbox when you exit the program... and it should also let you know that you have lingering there files which will be lost if saved.

    EDIT: actually, I just closed my browser sanboxed, not through QUICK-picked UP a file... and I get a screen to DELETE the CONTENTS of Sandboxie, again reminding me that I can still get the file [or well, delete the content of the Sandbox].   Certainly, it's been a while since I have set up the program, so I don't remember if it was a default option, or something I've tweaked.

    Edit2: There is a short tutorial for using Sandboxie http://www.sandboxie.com/index.php?GettingStarted , which if you have the time, elaborates on this (in parts 4 and 5 of the tutorial).

  • Questions about the Extension of JavaScript and SQLite

    Hi all

    I worked with some my colleague on projects related to WebWorks applications, but there are technical issues that our developers want to know and seek professional advice.

    (1) extension JavaScript & PlayBook

    According to the literature, we know that BlackBerry WebWorks Application have the ability to integrate with data, characteristics and features of the development environment Java® underlying as well as the native phone smart BlackBerry® using special JavaScript® (Extension of JavaScript) objects. So, we should be able to create® for Java (JAR) libraries and program the WebWorks app for BlackBerry Java API to call in libraries. Now, we know that BlackBerry® PlayBook provide a SDK WebWorks (Beta) for us to develop apps for PlayBook WebWorks, also means that in the environment of the PlayBook we can also use the JavaScript Extension trick to call the Java API of BlackBerry?

    (2) SQLite on HTML5

    HTML5 standard offer of SQLite for us to store data in a SQLite database format. But the SQLite file seems limited only to be used in the Application of WebWorks. I wonder if there are ways we can read these file to another application (Application Java or other applications WebWorks) SQLite?

    In fact, what I want to know is the possibility of having a WebWorks Application capable of handling a SQLite file that is received from the server side on-the-fly, and then return the entire SQLite file to the server.

    It would be appreciated if some of you can give some tips about this, thank you.

    Wowzzz

    lasterra is right about these two points...

    We have not yet published the details on creating extensions in the AIR for WebWorks on PlayBook. We are currently working to finalize the open source on the WebWorks for PlayBook SDK so that we can download on github.  The complete source code for the platform will be available on github so that you can see what's going on under the hood.

    Creating extensions in the AIR for WebWorks is very different from Java. We started to use a new architecture that should be able to provide the URI and proceedings access to APIs and placing more procedural API code in JavaScript itself vs. the ScriptableObject Java code existing today.

    This new architecture will be a foretaste of the platform architecture WebWorks to proceed.

    It welcomes more details about creating extensions in the AIR... but currently the API underlying main platform on the BlackBerry PlayBook is AIR and the functionality of an extension will be limited to what is possible on the AIR platform and its extensions.

    In the development of the PlayBook options evolve, so too will be the architecture of the platform WebWorks... I can't really say much more than this now

  • Fresh paint - Questions on the mixture of colors and model packs

    Hi all

    I have 2 questions for fresh paint where I can not find an answer for.

    1. own models

    Fresh paint offers to buy packs of model that can be used for painting. I have a few models that I would use it as well. I know, it is possible to open an image and paint it, but there is a big difference. Models that are offered by the application itself have a big advantage - with a special button (showing a few mountains & Sun) to within the application, you can enable / disable the view to the model (which in fact becomes visible or hidden) as a kind of layer, so you can easily check your paint with and without the model. Is it possible to do both for own patterns / Images? When I used my own jpeg file 'mountains' button is not available.

    2 using the palette color mixing and putting them in one of the holes tiny 'color selector' on this issue - how is this possible and how can such color to delete as well?

    I would really like to know how the colors can be mixed / saved / deleted using (the Palette on). Sometimes, when I mixed 2 colors and used in my painting, the color is not yet available in the Palette itself for easy reuse, sometimes it will fill one of the spots on it, however for me ist currently unclear in this case - which makes it unpredictable. Will there be some indications on how to use the color scheme and its functions?

    Thank you very much

    André

    Hi all

    I have 2 questions for fresh paint where I can not find an answer for.

    1. own models

    Fresh paint offers to buy packs of model that can be used for painting. I have a few models that I would use it as well. I know, it is possible to open an image and paint it, but there is a big difference. Models that are offered by the application itself have a big advantage - with a special button (showing a few mountains & Sun) to within the application, you can enable / disable the view to the model (which in fact becomes visible or hidden) as a kind of layer, so you can easily check your paint with and without the model. Is it possible to do both for own patterns / Images? When I used my own jpeg file 'mountains' button is not available.

    2 using the palette color mixing and putting them in one of the holes tiny 'color selector' on this issue - how is this possible and how can such color to delete as well?

    I would really like to know how the colors can be mixed / saved / deleted using (the Palette on). Sometimes, when I mixed 2 colors and used in my painting, the color is not yet available in the Palette itself for easy reuse, sometimes it will fill one of the spots on it, however for me ist currently unclear in this case - which makes it unpredictable. Will there be some indications on how to use the color scheme and its functions?

    Thank you very much

    André

    Hello Andrew,.

    At this time, "Own Templates" are not supported.  This is a feature that is only supported for activity Packs that are published.

    Mixing of colors, custom colors mix you are only saved if you use somewhere in your paint.  Then, they are automatically saved in your palette.  Your custom palette is only applicable to an individual work you created with it.  There is no need to remove the colors we provide a long list, you can scroll through directly under the area of mixture.

    You can reposition your palette customized by drag-and - drop colors between the lodges on the palette.  This allows to reposition some colors in your well static tasks.  Well custom tasks will be to repopulate it based on the most frequently used colors.

  • Questions to the developer.

    Hi all

    I just want to share experiences, I met with our dev team. I want to know if this process is also faithful to your environment.
    What is a good Setup.

    Generally, our developers uses a DEV database which is a replica/clone of the PROD, but smaller data.
    When they finish to create a program. They generate and explain the plan and tkprof to each large requests for this program.

    Sample:
    Query 1
    SELECT COUNT (*)
    FROM CI_SA_SP
    WHERE SP_ID <> '1234567890'
    AND START_DTTM <= TO_DATE('01/01/2012')
    AND (STOP_DTTM IS NULL OR STOP_DTTM > TO_DATE('01/01/2012'))
    AND SA_ID = '1234567890'     
    Explain Plan
    Rows     Row Source Operation
    -------  ---------------------------------------------------
          1  SORT AGGREGATE (cr=2 pr=0 pw=0 time=0 us)
          0   TABLE ACCESS BY INDEX ROWID CI_SA_SP (cr=2 pr=0 pw=0 time=0 us cost=1 size=32 card=1)
          0    INDEX RANGE SCAN XM206S1 (cr=2 pr=0 pw=0 time=0 us cost=1 size=0 card=1)(object id 59822)
    Trace Statistics (TKPROF)
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        1      0.03       0.01          0          0          0           0
    Execute    1      0.00       0.00          0          0          0           0
    Fetch        2      0.00       0.00          0          2          0           1
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total        4      0.03       0.01          0          2          0           1
    They will give the docs for the DBA to interpret and tell if it will be approved to be implemented in the PROD system.
    My question is, how do you manage this kind of application in your company? Or do you also have this kind of process?


    Thank you very much

    Edited by: KinsaKaUy? March 14, 2012 19:52

    Ask all developers to read these three books,
    http://www.Amazon.com/scaling-Oracle8i-building-scalable-architectures/DP/0201325748/ref=sr_1_1?ie=UTF8&QID=1331807783&SR=8-1
    http://www.Amazon.com/practical-Oracle8i-building-efficient-databases/DP/0201715848/ref=sr_1_1?s=books&ie=UTF8&QID=1331807812&SR=1-1
    http://www.Amazon.com/effective-Oracle-design-Osborne-Oracle/DP/0072230657/ref=sr_1_1?s=books&ie=UTF8&QID=1331807839&SR=1-1

    HTH
    Aman...

  • Simple questions on the earphones of events and memory management

    I am brand new to AS 3.0 (have not coded in 10 years!) and I have a two part question on the management of event listeners.

    1. is it possible to use variables or loops to simplify the process of creating event listener? For example, I have a scene that animates the leaves when they are hit. There are 25 or more leaves, so I need to handlers of 25 and 25 functions, even if the animation is the same. Right now my code looks like this:

    leaf1.addEventListener (TouchEvent.TOUCH_BEGIN, animateLeaf1);
    leaf2.addEventListener (TouchEvent.TOUCH_BEGIN, animateLeaf2);
    leaf3.addEventListener (TouchEvent.TOUCH_BEGIN, animateLeaf3);

    etc. And then the functions all alike as well.

    function animateLeaf1(e:TouchEvent): void {}
    leaf1.gotoAndPlay ("animationStart");
    }

    function animateLeaf2(e:TouchEvent): void {}
    leaf2.gotoAndPlay ("animationStart");
    }

    etc. My instinct tells me there is an easier way to do this, but I don't know if it's just because I see a model and want to put it in a loop or if there is really a better way to do it. I have event listeners are doing right?

    2. How can I clean my waste? Each of my frames will have 100-300 earphones of events inside, for animations, etc., mainly because a single button can have 3-5 event listeners (touch Start, end touch, touch roll on, roll off touch, etc.). Is this too much for a mobile device to manage? When can I disable event listeners to make sure that they are the garbage collector to release the memory? I don't want memory leaks, but the event listeners must be active when the frame is active and destroyed when the setting is inactive; I don't know how to program which, or if such a garbage collection is already inherent in Flash.


    Thank you very much!
    Amber

    leaf1.addEventListener (TouchEvent.TOUCH_BEGIN, animateLeaf);

    leaf2.addEventListener (TouchEvent.TOUCH_BEGIN, animateLeaf);

    leaf3.addEventListener (TouchEvent.TOUCH_BEGIN, animateLeaf);

    leaf4.addEventListener (TouchEvent.TOUCH_BEGIN, animateLeaf);

    function animateLeaf(e:TouchEvent): void {}
    e.currentTarget.gotoAndPlay ("animationStart");
    }

  • Question about the guest of dashboard and column

    My question about the dashboard and column prompt:


    (1) prompt dashboard usually work with only for columns that are in the topic area. In my report, I have created some of the columns that are based on other columns. As I have the daysNumber column that is based on two other columns, because it calculates the difference between two dates. I can't find this column invites when I create dashboard. I need to make a guest on this column.

    (2) to one of the column, I have only two values 1 and 0. When I create a prompt for this column, is possible that falling of drop down it displays 'Yes' of 1 0 and 'No' and always filter the request?

    Hello...

    I forgot to tell you one thing... but performance wise... If you create the column in RPD itself, it is good and easy to maintain.
    If you want this feature also... once again you choose directly the column in the area of topic... ;)

    Thank you & best regards
    Kishore Guggilla

  • Equium P200-1ED - Question on the possible 2nd HD and RAM

    Hello

    I've got the Equium P200-1ED and in the manual (page with diagrams showing the characteristics of the laptop), it mentions a second hard drive.
    I know my P200 does not have a second mounted drive so does that say space to eventually mount a second drive?

    Also, is it true that the max supported ram is 2 GB?
    It would be nice to upgrade the standard 2 GB Ram.

    Thank you

    Hello

    Well, the second HDD depends on the single model.
    The second HARD drive Bay must be placed close to the first HARD drive Bay.
    You can remove the cover that secures the second HDD and can check if the necessary controller is available on your laptop.
    Please note that the second HARD drive Bay could be available but without the HARD necessary interface disc.

    Regarding the upgrade of memory;
    If your laptop was equipped with Intel 945 GM/PM Express chipset or higher, you can update the memory up to 4GB. If the laptop was equipped with an Intel 943GML Express chipset, you can upgrade the memory up to 2 GB.

    But note; 32-bit Windows system will recognize only 3GB due to the 32-bit Microsoft Windows operating system limitation.

    Best regards

  • Questions about the standard wireless keyboard and mouse on a h8 - 1360 t.

    Hi again,

    I have a h8 - 1360t with the standard wireless keyboard and mouse.

    1. where is information on the blue buttons 'connect' keyboard and mouse?

    2. the mouse has a power switch - do I really have to close each time, or is there a function of inactivity when the system is off?

    3 lets say that I have two exact systems within 5 feet of each other. Will the two keyboards and mouse conflict?

    Looking forward to your answers.

    Thank you

    BJ

    This document will show you how to sync mouse wireless and keyboard if they connect buttons.

    You don't need to turn off the wireless mouse. If you have problems with the batteries run out frequently, it might be useful, but I've never needed to do.

    Two different sets of wireless mice/keyboards are not usually a problem. If there is a conflict, go through the process of connection of each game.

  • LR 5 questions with the help of sorting and spot removal tool

    LR 5...  Same problems with the sorting, WinX 64... crashes.  Delay of about 5 seconds to select a thumbnail, if I click on one and it lag I can fly over another and he will choose the other.  He refuses to move files selected at least 3 attempts.  However, it doesn't seem to work better work out thumbnails of Strip below.  When it starts acting up a restart does not help.  Also there is a huge gap and the jumpy mouse pointer when you use the removal tool / clone spot.

    I only LR open so the computer overload is not the issue.  I Suite OnOne 7 also and ANDLr, also many other programs open and this program works perfectly.
    I have not had any problems with the LR 4 but LR 5 is a great advertisement of NOT getting a new version until the bugs are removed.  It drives me crazy, so go back to LR 4.  The tools in LR 5 but not the accidents of love.

    These are the few that I've met so am not treats using the version 5 There is no update as of July 18, 2013 so any suggestions using LR 4 or go for a long walk until these issues are addressed?  I'm annoyed say the least to upgrade and then get grounded when I have a load of work that is time based!

    Fred

    Have you seen this? http://helpx.Adobe.com/Lightroom/KB/Lightroom-5-crashes-editing-images.html

  • Question about the formula of Member and BegBalance

    I have a requirement where I need to calculate the value of '' suffering '' and need to save it somewhere so that I can use it to display on the dataforms.

    The logic of the last value Due must be--

    Suffering = year previous year Total + current (Jan: Prior month)

    I was planning to write a formula for this member. Can I use substitution variables, as title, etc. PriorMonth in the form of Member to achieve this?

    In addition, since we do not use BegBalance Member for purposes like the display on the dataform etc. can I use for this requirement where I can write the formula of the BegBalance member and give it an alias name 'Suffering' I can use to show on the dataforms. Is this possible?

    Please let me know. All entries are appreciated.
    ~ Hervé

    Hello
    Perhaps it should look like this:
    & priorYr-> YearTotal+@sum(jan:&currMonth);
    / * No need to specify the current year as it would be fixed in pov, column or page. If necessary, replace the sum with @sumrange(&currYr,jan:&currMonth) * /.

    See you soon,.
    Alp

Maybe you are looking for

  • How can I get my iPhone to recognize my phone number?

    Three days ago my iPhone 5s (who is one year old and a little cracked) said he was looking for a signal in areas I know I service, and where the other members of my plan had service, too (I'm on AT & T). I've tried the factory reset and reboot severa

  • After the restoration how to recover my sms and iMessages

    Hello I restored my iPhone using iTunes restore, but I lost my SMS and iMessage. I have the call history, but not messages. Nevertheless, I have messages in the application of Message from my Mac. Is it possible to retrieve this information in my iPh

  • Satellite Pro A210 - don't go to sleep mode

    I have an A210 Satellite with Windows installed XP Pro. For several months, I had the problem where I can not change the power scheme options. I made the changes would just go back to default after a certain period of time. When I recently tried to f

  • Server 2008 R2 disk is unknown (uninitialized)

    Hello, I have a basic disk Server 2008 R2 attached containing an NTFS volume and user data. This disc, I moved to another machine to Server 2008 R2, but it considers this as initialized and unknown disk in Disk Manager. If I boot the machine using a

  • Why my LCD screen is detected as a CRT?

    I have a LCD proview 19 inch screen that is detected as a CRT.  Of course, this translates a mediocre screen image.  I tried to uninstall the monitor and restart windows.  I tried updating the driver and windows tells me is already the best available