Refresh/Repaint screen or FieldManager

HY,

I have a big problem and it seems that I am not able to solve it! Hobe can someone help me with this problem.

I know that there a lot of discussion on repaint them the screen but I almost tried everything and nothing worked.

Maybe I do something wrong, I don't know

Here's the problem:

I have a VerticalFieldManager (vTimeBar) with a costum BitmapField and a thread that changes the position of a bitmap of every second.

So I have to paint, otherwise I am not able to see.

Here's the thread:

         updateTimeBar = new Runnable(){

              public void run(){                    position = position + 10;                 timeBar.setSliderPosition(position);                                  vTimeBar.invalidate();                                        //invalidate();                                  try {                     Thread.sleep(1000);                   } catch(InterruptedException e){

                  }                 }         };

invalid does not work, I also tried to delete the BitmapField costum and reinsert, but it does not work.

Help, please

Greetz

Hello

Think that you will need to acquire a lock for the event.

Search the Forum, and to focus on the API there are some methods in the UiApplication class.

Tags: BlackBerry Developers

Similar Questions

  • When I create a new folder in Windows Explorer, I hit F5 to refresh the screen, the file disappears.

    When I create a new folder in Windows Explorer, I hit F5 to refresh the screen, the file disappears. If I try to create the same again, I get a message that I already have a folder with that name. It is nowhere on my computer.  I've searched for it & he's not here.

    R.Click on the desktop, properties, desktop, customize, web, search & check

    "lock desktop items" closes when thru.

  • 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.

  • Create a background thread to consume a webervice and invalidate Manager to refresh the screen

    Hello

    I create an application that uses Web services to place objects on a VerticalFieldManager with the received information. What I'm trying to do is first tap on the screen and then consuming the Web service on the merits in order to refresh the screen while he receives the info. Right now my app uses the webservice from the preview screen, but it doesn't push the following until he finished consuming the WS.

    I read that you can create a background thread, and then syinchronize with the user interface refresh (invalidate()) screen, but I don't have all the tracks of where to start. Can someone help me please? Including creating a background thread?

    Thank you very much!

    The best way for your background screw to change your user interface within the constraints of the

    UiApplication.getUiApplication().invokeLater(new Runnable()
    {
        public void run()
        {
                     //your UI modifying code here
            }
    });
    
  • How to refresh a screen without making a new Instance of the class

    Hi all

    Please help me.

    I need to refresh a screen of components such as the text box, list etc without (pushing the new instance of the class) using the old instance.

    I use:

    UiApplication.getUiApplication () .invokeAndWait (new Runnable() {}

    public void run() {}

    invalidate ();

    }

    But it will not refresh the screen components.

    I need to change the label of the text box, choice of etc group on click on the Refresh button.

    Please suggest me

    Thank you

    Again, I agree with BBDeveloper, just wanted to add an alternative solution.  You must have the code that sets the values in those fields anyway.  You can separate the code that adds the fields to the screen of the code which sets the values in these fields, place the code that sets the fields into a separate routine and call this routine to during the construction of the screen and the screen refresh.

  • Satellite P300 - 20 H refresh the screen every 10 minutes and turn off during 3 sec

    Hey,.

    Basically, I bought my P300 Sat about a month previously and each time it runs, battery, the same error will occur...
    It will update the screen every 10 minutes or more and turn off for 2-3 seconds.

    This isn't a big problem, but it is annoying that I can not sort.
    I tried to run a check of problem to find a solution, but he says that he can not find a.

    Help, please
    Thank you.

    Hello!

    Can you please explain what you mean with refresh? And what exactly is happening?

    It is not easy to say what the reason is for this, but have tested an external monitor on the laptop? And you can determine if it s a problem with the internal display or not.

    In addition, you must make sure that you have installed the latest display driver and BIOS. The two you can find on the Toshiba site:
    http://EU.computers.Toshiba-Europe.com-online decision-making supported Downloads & => Download drivers

    If you installed a display driver Toshiba not you should remove it. These display drivers can often cause problems and don t have protection against overheating.

    Good bye

  • Satellite in the series C - need to continue to move mouse to refresh the screen

    When the laptop is on the internet and update/refresh of the screen, if I keep moving the mouse, the refresh is very slow or stops.

    This happens on another PC Toshiba laptop I know.

    I have windows 7.

    Clues? Thank you

    To be honest, I can't imagine what is happening with your laptop, but probably it's just a software issue...

    Perhaps you should simply close the no processes running in the background... more, you can try to clean and repair the system using the freeware called "CCleaner".

    After that restart the laptop, defragment the HARD drive and check the performance of the laptop.

    If this doesn't help, you can try recovery the laptop back to factory... not quite sure if it would be a real option for you, but in case of malfunction of the software, this should resolve the issue permanently.

  • stuck on the refresh database screen

    my brother gave me his used sensa, and I downloaded many songs I
    could, so I expected to take a long time the database 'Refresh '.
    screen, but I had all night, and it has not yet disappeared now. so
    Basically, its actualization is rest on the database for several days... I need help
    with that, I can turn it off and turn it on, but it remains on the
    update the database
    I searched on the internet and the faq, but nothing helped, so I
    have no idea what to do

    I even tried to use the thing, what he told me to download, but it does not work because my mp3player connects to the computer.

    Help, please

    found the solution on the web, just had to search on google, I think it's working now, I hope it explodes now<>

    This problem could be caused by file corruption or errors of system on the device.

    We should be able to fix your drive. Unplug the drive from the computer when it is connected.

    Please copy and paste the following link in your browser of web address bar, and then click OK or press your enter key. When you are prompted, choose the option to save the file on your desktop.

    http://www.SanDisk.com/assets/file/D...fw01.00.12.exe

    Once you have downloaded the file, please follow these instructions.

    (1) double click on 'My Computer' so that you can see on your screen.

    (2) turn off the player.

    (3) on top of the player is a Hold switch, move it to the right (toward the headphone jack) so you see Orange.

    (4) on the left hand side of the player is a 'Save' button, press and hold it when you connect the player to the computer. Continue to hold the record button until you see a new icon in "My computer" called 16 MB FORMAT. Once you see this icon, you can release the record button.

    5) double-click the file you downloaded earlier and run it. Follow all the on-screen instructions and when you get to the prompt where it asks you if you want to format, click Yes. Once this is done, click Finish.

    (6) disconnect the player and watch the screen. Several things will be displayed, and when you see Key Lock, system shutdown, move the Hold switch on the back upstairs to the left.

    (7) turn on the player and watch the screen. If you see a mistake to refresh database fail, you will need to follow steps 1 through 7 again until you do not get the error. If it doesn't work the first time, can be up to 3 times to make it work.

    Please inform about the results.

    If you have any other questions and concerns please let us know, it is our pleasure to help you.

    Best regards
    Kenneth Arthur v.
    SanDisk technical support

  • Refresh the screen when he became first on the stack

    Hello

    I have a Refresh function on my home screen, from the home screen, a user can change the options in the options screen. However to change the options will change the content on the home screen. How can I update the home screen when a user comes to change options? I thought it would update when it is first on the stack again because it would mean that the option screen has been removed from the battery... Any guidance would be appreciated!

    Thank you

    Ben

    As onExposed() is called in other circumstances, when a refresh is not necessary, I wouldn't recommend you do without some sort of filter to determine whether or not you should.  Review the Thread I pointed you to, in there, I suggest a suitable filter, you could use.  .

  • Refresh the screen problem

    Thanks for the reply.

    In my screen is getting refreshed every 30 seconds, if I use for single Labelfield setext it works fine, but if there are many Labelfield (that are created dynamically via a loop), it seems that the process does not work. Could you please let us know, what could have caused this.

    Here is my code...

    sample)
       
    VerticalFieldManager ListCol = new VerticalFieldManager()
    VerticalFieldManager TimeStatus = new VerticalFieldManager()
    lbl_timestart = new RaidersIconLabelBoxHa;)
    TimeStatus.add (lbl_timestart)
    Add (TimeStatus)
    bgthread. Start()
          
       
    class BackGroundThread extends Threa
       
    Channel HostContent
    Boolean condition

    public void run)
           
    If (status
                   
    RefreshScreen()
    }
    Try
                      
    Invalidate()
                      
    } catch (System.Exception e

    public void RefreshScreen)
         
    UiApplication.getUiApplication () .invokeLater (new Runnable()
    public void run)
              
    TR
    {
    lbl_timestart. SetText (modules. Hostedtimestart.ElementAt (0))
    Invalidate()
               
    catch (System.Exception e
               
    Logger.logEventInfo (try ())
               
              
    })

    Above code works very well

    The code of my problem is...

    sample)
       
    VerticalFieldManager ListCol = new VerticalFieldManager()
    VerticalFieldManager TimeStatus = new VerticalFieldManager()
    for (int i = 05; i ++)
               
    lbl_timestart = new RaidersIconLabelBoxHa;)
    TimeStatus.add (lbl_timestart)
               
    Add (TimeStatus)
    bgthread. Start()
          
       
    class BackGroundThread extends Threa
       
    Channel HostContent
    Boolean condition

    public void run)
           
    If (status
                   
    RefreshScreen()
    }
    Try
                      
    Invalidate()
                      
    } catch (System.Exception e

    public void RefreshScreen)
         
    UiApplication.getUiApplication () .invokeLater (new Runnable()
    public void run)
              
    TR
               
    for (int i = 0; 5; i ++)
                   
    lbl_timestart. SetText (modules. Hostedtimestart.ElementAt (i))
    Invalidate()
                   
              
               
               
    catch (System.Exception e
               
    Logger.logEventInfo (try ())
               
              
    })

    If it works...!

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

    feel free to click like button that is to the right of this message.

  • 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.

  • Refresh a screen with a KeywordFilterField

    How can I get the screen to refresh after deleting an entry in a KeywordFilterField?

    If I close the screen and then re-open it, it seems OK, but I want the screen to refresh as soon as the entry is deleted.

    If it were a ListField, I could call setSize and setCallback, but those who do not exist for a KeywordFilterField.

    I also tried invalid, but it does not work either.

    Thank you...

    For all who are iterested, the trick was explicitly to remove the entry from the list filtered using:

    Object selectedEntry = _keywordFilterField.getSelectedElement ();
    _filteredList.elementRemoved (_list, selectedEntry);
    _list. Remove (selectedEntry);

  • How to refresh a screen with fields update

    I am writing my first BB App trouble and having to refresh the objects on screen (among others).

    I have an application with a main screen that calls an options screen.  The Options screen allows the user to change the system of units, using a persistent store.

    Return to the main screen of calc, the calc main screen have updated the text to reflect the change of units.  I see other messages that I can use invalidate(), but I don't understand where to put invalidate() in code.

    During the initial load, the main screen must get the persistent metric indicator before set labels with SetUnitLabels() areas.

    The options in the menu pushes the options screen.

    Burst the options screen and pushing the calcscreen returns to the main screen and must call the SetUnitLabels() method to update the text in the field.

    It's the constructor in the CalcScreen, the main screen

    public CalcScreen() {}

    Super();

    boolIsMetric = myOptions.getBoolMetricFlag ();  retrieve the metric indicator to set the text on the screen
       
    addScreenItems(); Adding visual elements to the screen

    calcScreen = this.getScreen ();  I get the name of this screen for later use

    }

    This method pushes the options screen options:

    {} public void options()
    ClearScreen();
    UiApplication.getUiApplication () .popScreen (calcScreen);
    UiApplication.getUiApplication () .pushScreen (new OptionScreen (calcScreen));
    }

    This method goback in the screen options returns to the main calcscreen:

    public void goback() {}
    UiApplication.getUiApplication () .popScreen (this);
    UiApplication.getUiApplication () .pushScreen (toScreen);
    };

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    I tried to use the following executable invalidate(), but I don't know where to put it so that it is called.

    UiApplication.getUiApplication () .invokeLater (new Runnable() {}
    public void run()
    {
    SetUnitLabels();           Make changes to screen here.

    calcscreen. Invalidate();
    }
    });

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    I'm sure that the answer is something simple, but I just don't get it.

    Thanks for your help.

    The appearance of your code, when you exit the Options screen, you push a replacement, so the code that I have proposed may not work - she expects a different screen management technique.  .

    In general, I have a splash screen of the application, which is still there and then I push the next screen when the user has finished with this screen, I pop, which appears again the screen below.  You can have several layers of screens like that.

    Now when I go into my Options screen, processing code goes to just a pushModal, as you did, then the following modal push code will be executed when the screen Options ' pop so at this time, I can update all the values on the current screen.

    It is roughly what you suggested, but you have not need jump the calcScreen because you want she displayed when the Options screen is out, so he might as well stay on the display stack.

    Does make sense?

  • Pavilion dv6 6153 cl: refresh your screen 1366 x 768 to 1920 x 1080

    I looked into getting a laptop with a 1080 p screen when using ArchiCAD, but before tightening of my 4 years old HP, I thought I'd give the upgrade of the screen one go.

    I did some research and found HP Pavilion dv6 Notebook PC Maintenance and Service of Guide for my model, where I found a few spares FHD numbers that are easy to buy from HP on Amazon.

    Namely:

    15.6-inch, FHD, LED, anti-reflective display panel 665335-001

    Display cables 665305-001

    However, I know that the Pavilion dv6 6153 cl has never been offered in FHD. Parts are really it interchangeable?

    An upgrade of the screen is possible? I've seen a lot of questions like mine asked but no confirmation it is possible. Do I need anything else (such as a new bezel) other than the cable kit and display panel?

    Thank you.

    Hi there @itamspada

    Welcome to the Forums of HP Support! It's a good place to find the help you need, so many other users, the HP experts and other members of the support staff.

    In response to your question, yes it seems to me that you won't need these parts, and yes the parties within the series are mostly interchangeable.

    Assuming that there is no damage to the connector for the Billboard, the parties should work.

  • Presentation of the dynamic grid for version 4.7

    Hi all

    How can I create a dynamic grid presentation that is supported by version 4.7? I need to load images dynamically and they want to see as soon as they are done loading.

    Im trying to use a VerticalFieldManager and several HorizontalFieldManagers but I get a

    java.lang.IllegalStateException: field added to a Manager, while it is already apparent

    exception: when trying to add pictures to HorizontalFieldManager who is all ready displayed.

    Can someone please.

    D iscutez several times here.

    Refresh a screen with fields update

    Look at these links.

    http://supportforums.BlackBerry.com/T5/Java-development/how-to-refresh-current-screen/m-p/206670#M29...

    http://supportforums.BlackBerry.com/T5/Java-development/how-to-refresh-a-screen-with-updated-fields/...

    http://supportforums.BlackBerry.com/T5/Java-development/how-to-refresh-the-current-screen/m-p/328505...

    http://supportforums.BlackBerry.com/T5/Java-development/refreshing-repaint-screen-or-FieldManager/m-...

    And the presentation of the grid is for OS 5.0

    4.7, you need to do with the Manager.

    http://www.BlackBerry.com/developers/docs/4.7.0api/NET/rim/device/API/UI/Manager.html

    Hope this helps.

    ------------------------------------------------------------------------------------
    Kudo press to say thank you to the developer.
    Also, press accept it as a button when you got the Solution.

Maybe you are looking for