Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>APPROACH I :</strong> <em>LWUIT 1.5</em> has a powerful <em>LWUIT4IO</em> library to address your problem.</p> <p>An excerpt from <a href="http://www.lwuit.com/2011/08/parsing-in-lwuit-lwuit4io.html" rel="nofollow">Shai's Blog link</a></p> <blockquote> <p>A feature in <strong>LWUIT4IO</strong> to which I didn't give enough spotlight is the cache map, its effectively a lean hashtable which stores its data using weak/soft references (depending on the platform) and falls back to storage when not enough memory is available. Its a great way to cache data without going overboard. One of the cool things about it is the fact that we use it seamlessly for our storage abstraction (which hides RMS or equivalent services) in effect providing faster access to RMS storage which is often slow on devices.</p> </blockquote> <p>Another useful link is <a href="http://www.lwuit.com/2010/08/introducing-lwuit-for-io-lwuit4io.html" rel="nofollow">here</a></p> <p>The idea is to delegate the Network IO functionality to a singleton to avoid any UI deadlocks, like the one you are facing.</p> <p>A very good video demo <a href="http://www.youtube.com/watch?v=FXhlghkgsHE" rel="nofollow">here</a> by vprise, explains how to bind GUI functionality to your netbeans. In this video at around 7:00 mins it explains the use of <code>ImageDownloadService</code> class which binds the component to its thumbnail url which will seamlessly fetch from the network and populate the Image.</p> <p><strong>APPROACH II:</strong> Difficult one of create custom logic</p> <ol> <li>Create a singleton that will interface with the network to fetch the data</li> <li>Use a queue to handle the sequential image download services</li> <li>Create a new thread for this singleton and wait on the queue.</li> <li>With each image download service bind a listener with the invoking component so that it easier to update the right component.</li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload