01: /* ImageLoader.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: May 21, 2007 5:10:52 PM, Created by henrichen
10: }}IS_NOTE
11:
12: Copyright (C) 2007 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.zkmob;
20:
21: import javax.microedition.lcdui.Image;
22:
23: /**
24: * ImageLoader that load image in another thread and setup associated {@link Imageable} item.
25: * @author henrichen
26: *
27: */
28: public class ImageRequest implements Runnable {
29: private Imageable _item;
30: private String _imagesrc;
31:
32: public ImageRequest(Imageable item, String imagesrc) {
33: _item = item;
34: _imagesrc = imagesrc;
35: }
36:
37: public void run() {
38: Image image = UiManager.loadImage(_imagesrc);
39: _item.loadImage(image);
40: }
41: }
|