Refresh the screen after the change of Focus

I'm trying to color the background of the complete handler, when one of its fealds leaf receives focus. I am against the version 4.3 programming.

For this, I replaced the paint for this method (the m_ prefix designates a member of the object variable):

 public void paint(Graphics graphics) {
        Field focussed = getLeafFieldWithFocus();
        if ((focussed != null && m_RootHighlighter) || m_Highlight) {
            graphics.setBackgroundColor(Color.CYAN);

            if (m_RootHighlighter) {
                for (int i = 0; i < getFieldCount(); i++) {
                    Field curField = getField(i);
                    if (curField instanceof SubHighlighter) {
                        ((SubHighlighter)curField).triggerHighlight();
                    }
                }
            } else if (m_Highlight) {
                m_Highlight = false;
            }

        } else {
            graphics.setBackgroundColor(m_BackgroundColor);
        }

        graphics.setColor(m_ForegroundColor);
        graphics.clear();
        super.paint(graphics);
    }

A Manager on stack Manager (the one the bottom should change color) says he's the marker of root and call the method "triggerHighlight" on all the managers of his children, which is implemented as follows:

 public void triggerHighlight() {
        m_Highlight = true;

        for (int i = 0; i < getFieldCount(); i++) {
            Field curField = getField(i);

            if (curField instanceof SubHighlighter) {
                ((SubHighlighter)curField).triggerHighlight();
            }
        }
    }

Each highlighter root has a child a (away from him by a few more layers Manager) exact sheet that can receive the focus.

Now I have a strange behavior: when I press a screen filled with managers of root highlighter on the stack of the screen, the first Director, whose the focusable child sheet gets automatically put emphasis, change its background. When I scroll down, the next Manager does not change its background, although I see in debug mode focus wanders to his field focusable. When I reached a manager not completely on the screen, which triggers a scroll of the overlying Manager, the color change takes place again.

I thought this might be a screen refreshing problem, so I added the following to my custom manager class:

   protected void onFocus(int arg0) {
        super.onFocus(arg0);

        getScreen().doPaint();
    }

Now, a kind of artifact of changing background color appears (a small spot of color, which does not disappear when the focus leaves the Manager) until I reach a part of the screen where the screen scrolls, how everything behaves as it should.

Can someone tell me whan makes a still image without scrolling attention change different a change of focus scrolling and what I can do to fix this? Thank you.

You must call the method Screen.invalidate instead of Screen.doPaint.

Tags: BlackBerry Developers

Similar Questions

  • Can I turn off the change of focus from one object to another?

    Hello.

    I have a game where i control a MC with the arrows on the keyboard, when I click outside of the application flash and back in the MC loses focus. The focus moves to a button in the scene. What I have observed, is that Flash Player has a built-in control, which moves the focus from one element to the other with the arrow keys.

    Is there a way I can disable the change of focus from one object to another?

    Thank you.

    Why you need such a thing...

    Is it true that you lose the focus of your video clip and that's your keyboard listeners do not work?

    And you want to work.

    For this situaton I ideally add my Council key on the stage event listeners and the rest of the creation of the logic accordingly.

  • How to detect the change of focus between applications

    LV2013, Win7

    I have a long operation that so I have to.  Let's call it a "scan".

    I start to a particular folder on the disc and look for files within this framework and in those folders, etc.  I am looking for a particular file (*.lvlibp).  When I find one, I need to open it, look for particular screw it contains and check them for executability (broken) and fix the ConnPane, etc.  I put all the elements of qualifications in a menu (in the menu bar) as the submenus and submenus, etc..

    I do the scan in a separate thread, is not as if I'm blocking anything either, but it takes away CPU time that I would rather not use.

    If I do the scan only once, then the user can go to the Explorer, move a file in place, or rename a folder and come back and I miss the changes.

    Right now, I do whenever the single window happens (the one to which applies the menu).  But this means that round in my application of switching windows causes the scanner again, when there is no chance of a new file that appears.

    I would like to do this scan only when it is necessary, that I define as when I come back from another program (WIndows Explorer for example) this single window in my LabVIEW application.    I am ready to accept the fact that Scripts Windows or remote operations may sneak a file in there.  I don't mean to be bulletproof, just accommodating the more common scenarios.

    I don't want to make a kind of vote - the entire application is event-driven, and I want to keep it like that.

    So, how can I do this?

    If I look at the ACTIVATION VI event, it looks like it happens for ALL VI have activated.  I can attach a name-comparison and detect when the right window is coming forward, but again, simply because this window comes forward does not mean that I need to analyze.

    If I look at the event of ACTIVATION of the APP, it seems to be NEVER called. Even in an EXE file, the event seems never to occur.

    If I had an event to DISABLE the APP, I could set a flag when it happened, and the next time that the right window comes up, I could check the indicator and scan if necessary.

    But I did none of this case.

    Any ideas on how to do this?

    I think what I'll do is just watch the LAST MOD TIME of the parent folder.

    When I do a scan, I hide the LMT of the parent.

    Then, whenever the WINDOW is enabled, I'll check the LMT to the case against my hiding place.

    If it is different, then I scan again.

    Check the LMT takes about 50 uSec on my system, a relatively small price to pay.  And I do it when the window comes up to the top, so I will not notice every little detail of what you do, and I don't have to dig into .NET and assemblies and versions and unnecessary and other error messages.

  • Change the GUI on the underside of the screen after onsavepromt

    I have a screen of settings with the editfields, boxes and everything. When I change something on the screen and press ESC key box a dialog box will appear with save, throw and the Cancel button. I want to save the data entered in the recordstore. So I replace the onsavepromt method and I am able to save data successfully. The problem is I want to change the graphical interface of the screen just below the sreen of parameters with respect to the changed data.  I tried to push the screen below that programmatically. But he returned exception. How do I moify the screen below him register promt?

    The best way to proceed is to use a pushModal on your screen settings, then the code after the pushModal will be called after the your setting screen closed.  So, you can refresh your GUI.

  • CSS refresh after javascript DOM change (tab Ajax control) and also refresh the list of objects of Navigation

    Hi all

    When I access a Web page, that I created in the browser or Widget that uses an ASP.NET Ajax Control Toolkit Tabs the action of switching between tabs works well but the tab header does not reflect the change to display the active tab.

    In a standard browser of the tab header will be change / light tone based on the css classnames active Ajax control for settings changes dynamically in the DOM when switching between tabs and I was wondering if maybe the BB browser will not reflect/refresh css when changes on the client side affect the DOM? If that's the case (?) is there a way to force that change somehow?

    Also in the same direction and on the similar question I posted yesterday on switching between Navigation power user mode in a Widget, so javascript client-side dynamically is change the 'x-blackberry-focus' of a DOM object possible to have the change reflected in the Navigation objects? Or is the list of objects that can be traversed only generated load initial page and cannot change without a new post?

    Thank you

    Derek

    I solved the problem with the Ajax Control Toolkit TabContainer uisng having to do a "dummy" DOM change in the TabHeader after that the tab is passed between the tabs then forcing the refresh and repaint the tab headers.

  • I can't refresh the files that I opened on a server to FireFTP after I change them (HTML, PHP, etc.).

    For weeks I've been editing files on a remote web host (via FireFTP) that are also open in Firefox. From late in the evening, I can isn't just refresh the Firefox tab once I changed the file on the server. On the contrary, I have to close the file and re-open it completely. When I have the remote file open in a local editor time, date and size on the server as expected so I know this subject works.

    The url indicates the location of the remote as file:

    file:///C:/users/{account_name}/APPDATA/local/Temp/{filename.ext}

    and if I check this location on disk the file is there. Also note the file: Protocol that may or may not be standard.

    Firefox and FireFTP copy of the file in the directory of the user and displaying only the version of the file? The association with the remote/hosted file somehow does not work?

    I checked the Firefox command line options and do not see anything that looked like it might make a difference. I rebooted several times. I checked against viruses and malware and also perform several operations of registry cleaning.

    Still, it worked until a few hours and I have not installed or changed something that I know.

    Any suggestions?

    OK, I'm a complete jerk. The behavior I described is exactly what it should be. I was able to do a quick update when I was working with files * already on the local disk *, which is what I actually did most of this time. The view on the Web option is the only way to access a direct view of the file.

    The downside is that view on the Web looks like that it only works with the default browser. It would be nice to be able to select the browsers to use if more than one is available, but it's a niggle (or a feature request) for another day.

    Now you can beat me in the face with a crowbar. After that I'm done, of course.

  • A Message in a rectangular box "Messages Agent wants to use the 'Local products' kenchain. appearing on the screen and ask for Keychain password password.  This started after I changed the password of Apple resulting for the purchase of a new iPhone

    A Message in the box 1. "Message agent wants to use the 'Local products' kenchain. "is appearing on the screen and ask for Keychain password password.  This started after I changed the password of Apple resulting for the purchase of a new iPhone.

    My iPhone 5 has been damaged and the screen was not visible.  As a result, I couldn't open the iPhone.  I bought 5 s iPhone and when I got to connect with the iCloud

    I remember the answers to security questions.   The seller must change the password and enter new answers to security questions, I did.  This happened in Bangalore.  When I'm home in Ernakulam, Kochi (India), where I has the Air of Mac, Ipad and my wife had another iPhone and laptop computer Dell, these problems began to come up on the screen and blocks the screen.

    Four Messages are appearing: the first is on the top.

    Other messages are:

    2. ' cloudd wants to use the kenchain 'local products '. '

    appearing on the screen and ask for Keychain password password.

    3. ' com.apple.iCloudHelper.xpc wants to use the kenchain 'local products '. appearing on the screen and ask for Keychain password password.

    4. ' cloudpaired wants to use the kenchain 'local products '. ' is appearing on the screen and ask for Keychain password password.

    It of an upheaval and please suggest how to solve this problem

    Hello remy!

    I see that you are either prompted by iCloud Keychain with various alert messages.  I know it's important to have iCloud Keychain works correctly and I am pleased to offer you an article that should help you.  Please follow the instructions in the following support article:

    If your Mac keeps asking for the password in the keychain

    Thank you for using communities of Apple Support.

    See you soon!

  • How do I resize my screen after that that a program has changed the size of the screen?

    I used a program to connect to a projector, which made the screen smaller. After that I turned it off, it wouldn't return to normal size.

    Hello

    There are a number of things to try:

    try going to your graphic card manufacturers site or computer and are looking for the driver download section

    Search your computer or graphics card model number based on what you have and download and install the latest graphics drivers for vista

    then try to make the screen of solution of problems

    http://Windows.Microsoft.com/en-us/Windows-Vista/change-screen-resolution

    Change the screen resolution

    __________________________________________________________

    or try a restore of the system before this happened

    http://www.windowsvistauserguide.com/system_restore.htm

    If necessary do in safe mode

    Windows Vista

    Using the F8 method:

    1. Restart your computer.
    2. When the computer starts, you will see your computer hardware are listed. When you see this information begins to tap theF8 key repeatedly until you are presented with theBoot Options Advanced Windows Vista.
    3. Select the Safe Mode option with the arrow keys.
    4. Then press enter on your keyboard to start mode without failure of Vista.
    5. To start Windows, you'll be a typical logon screen. Connect to your computer and Vista goes into safe mode.
    6. Do whatever tasks you need and when you are done, reboot to return to normal mode.
  • Refresh the screen after the removal of the UI elements

    Hello world

    I create a screen in which I use listfield to display data online as a way each line has a button Delete. I want to know how to refresh the screen after the deletion of data or a row of the screen?

    Because you actually using a HorizontalFieldManager to display each line, to remove it, you must remove the information in the underlying data store and then delete it HFM of his Manager.  That's it, removing the HFM will refresh the screen.

  • What is the best way to catch the change event of Focus of the field on the screen.

    Hi all

    I want to trace the change event of focus field, since my setFieldChangeListener and FocusChangeListener domain for a specific use. I can't put that kind of receiver.

    I want to use fieldChaneNotify, however, it does not call at the level of the screen.

    Is there a better way to track field focus change listener?

    I tried fieldChangeNotify and moveFocus... negative screen level...

    Thank you

    Sorry not sure I understand this.

    From what I understand, your problem seems to be that your field only supports a FocusChangeListener, so you can not add another.  Extend the scope to take in charge several FocusChangeListeners and is not your problem solved?  This seems a more elegant way that attempts to manipulate a change mechanism.

  • Windows 7 splash screen will not change after the vista update

    After updating vista 32 bit to windows 7 32 bits, the splash screen will not change and he showed the vista boot. I read a lot of forum and the web page, but this solution:

    «.. . the dummies and bad start screen for Windows 7 is due to the locale entry in the startup folder, which could not be set when editing or rebuilding the BCD. When the locale is not found, Windows boot loader doesn't know what local startup folder to look for the animated bootscreen. Thus, in order to fix the boot screen so that the splash screen can be re-established, restored or reset to original animated Windows 7 boot screen, just run one of the following commands at the prompt with administrator rights:

    bcdedit/set {current} settings regional en-US

    or

    BCDboot % WinDir % / l en

    Change the US to the language version of Windows 7 installed, as ja - JP, en - us, es - ARE, pt - BR, zh - CN, zh - TW, fr - FR, fi - FI and etc.

    Restart the computer after running the command to see the new boot UI (user interface) be used again. To check if the locale has been entered properly, just run the bceedit command in the command prompt that is running as an administrator... »

    not solved my problem and also know for many users... after updating vista in windows 7 splash screen stay the same...

    Thanks for your help
    Hispanico hispanico

    Hi hispanico,

    Thank you for visiting Microsoft Answers.

    I suggest you do a repair from WinRE (Windows Recovery Environment) system using a Windows 7 installation disc. Follow these steps:

    1. turn on your computer, insert the Windows installation DVD, and then restart your computer.

    2. Press any key when prompted to do so and follow the instructions that appear.

    3. when the Windows Installer page, click repair your computer to access system recovery options.

    4. follow the instructions.

    Please visit these links for more information on the Startup Repair:

    1. http://windows.microsoft.com/en-us/windows7/Startup-Repair-frequently-asked-questions

    2. http://windows.microsoft.com/en-US/windows7/What-are-the-system-recovery-options-in-Windows-7

    Kind regards
    Amal-Microsoft Support.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How in the form of refresh/reload after having changed entry point?

    Hello

    My version of the apex is: Application Express 4.2.5.00.08

    My problem is: I can't as a reload/Refresh (ID = "f_details") after the point of page (NAME = "P14_SEARCH") value?

    My step is:

    1. change sql source to join:P14_SEARCH element of page in the code...

    select 
    "ID",
    "ID" ID_DISPLAY,
    "PROJECT_ID",
    "CREDIT",
    "DEBIT",
    "SECTION_ID",
    "ACC_ID"
    from "#OWNER#"."T_PROJECTS_DETAILS"
    where "CREDIT" = nvl(:P14_SEARCH,"CREDIT")
    

    x3.PNG

    2 - I have created dynamic action on the item page P14_SEARCH...

    Event = change, Action = fire on loading the Page, run the JavaScript Code = No, the selection Type = region, affected items = Tabular_proj_details

    My JS code is:

    $('#f_details').trigger('apexrefresh');
    

    3-change Enable partial Page Refresh on 'YES '.

    Now I can not filter data in the form of depend on P14_SEARCH value, because under the form of not refresh/reload the new data..! 

    That's my problem.

    Sorry for the mistake of language.

    Help me please,

    So f_details is the static ID for the report?  You can replace your real action with action to refresh and select the correct region.

    Also, did you include P14_SEARCH in the field "Items to submit Page" located right underneath the Source SQL?

    Oh and one thing, without doubt the most important, turn on "Partial Page Refresh" under the report attributes. I think that it is set to no by default on the Forms tab (but I didn't test it).

    Thank you

    -Jorge

  • Bridge does not refresh the thumbnails after changes in ACR.

    Bridge does not refresh the thumbnails after changes in ACR. Cultures made in ACR do not show more. I think it started after new ACR update. I have the last bridge and ACR and Photoshop.

    I thought about it. I have reset the settings of the bridge by pressing Command-Option-shift and then started bridge on my Mac. I lost my sight, I got but should display what I want to see again. But it solved the problem of the bridge not updated after modified ACR.

  • Table not refreshing after the cancellation of the changes.

    Dear friends Jdev.

    We head to the last stages of the migration of our desktop application for the web app adf based and serious problems come lately.

    We use arrays of the ADF to alter data in the form of bulk... When we made changes in the editable fields and the user cancels them ADF operating tables are not updated. I mean the changed data of the iterator are indicated in the tables and the original data are displayed when I click on the next record in the table or reload the page.

    I'm pasting my code.

    {} public void onCancelListener (ActionEvent actionEvent)

    setDmlMode (null);

    Links DCBindingContainer = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();

    DCIteratorBinding pmIter = bindings.findIteratorBinding("AgeingParamsIterator");

    pmIter.getCurrentRow (.refresh (Row.REFRESH_UNDO_CHANGES));

    pmIter.executeQuery ();

    AdfFacesContext adfctx = AdfFacesContext.getCurrentInstance ();

    adfctx.addPartialTarget (tblAgeing);

    adfctx.addPartialTarget (socModule);

    }

    my table is 'tblAgeing' and the component inside the table, I'm editing is "socModule".

    for the iterator, I set CacheResult to false.

    I wonder even after execution of the iterator again why the data is not updated?

    Ashraf

    Have you tried tag?

  • Firefox does not display the changes on the site after the remote host; Refresh does not work

    I recently had to reinstall Windows 7 on my machine, and since it has been wiped off I installed CS5, reconfigured my Dreamweaver site and made changes to our page index.html (so far).  After you put the files on my remote server, I noticed that Firefox does not display the changes I made to this file - it is to show the page previously recorded on my CS4 version.  Thinking it was a cache problem, I emptied, refreshed/reloaded several times, restarted Firefox - nothing has worked.

    I checked the page in IE8 and all changes are not displayed correctly.  I used BrowserLab to display a preview in IE, Firefox (same version 3.6 which I use) and Safari, and all 3 display correctly version update of the page.  Visualization in 'live' of Firefox seems to be the problem, and I've looked everywhere for answers. Help is needed and appreciated!

    It is possible that you redefined the site incorrectly and put the files to the wrong address on the server. Carefully check both your local and remote sites definitions.

Maybe you are looking for

  • Discrete cards compatibility with HP ENVY h8-1403es

    Hello My friend wants to change his 640gt included in a HP ENVY h8-1403es for another graphics card. He wants to install a 770gtx but it seems impossible because of lower power, not enough distance to place it in the pc box and has problems with moth

  • Laptop HP 15-R084NG: decommissioning of 8.1 Windows x 64 to Windows 7 Ultimate x 64

    Hello and thanks in advance for the help given to this question. I searched the Forum before posting, but I noticed that this question is very specific to each PC model because the necessary specific drivers for the downgrade to work. I then decided

  • Audio peaks

    Dell XPS 8300 Map its Creative Labs X - Fi Titanium HD Graphics ATI 4600 Latest drivers for both The PC had no problem until 2 weeks ago when I started to have spikes short sound/image (sound distortion and image) This occurs very randomly when you p

  • Cannot download AMD HD Graphics Driver

    The link is broken for sp55032.exe I can't download the driver. http://h10025.www1.HP.com/ewfrf/wc/softwareDownloadIndex?softwareitem=ob-100070-1&cc=us&DLC=&LC=en&o...

  • Smartphones blackBerry - sent Messages BB Messenger still exist in the text field

    Hello. Question: After typing and sending a message to a contact through Blackberry Messenger, the message persists in the area in which the text of the message is such that if I press back, I can continue to send the message repeatedly. I'm only abl