- if ((value == null && b.image == null) ||
- (value != null && b.image != null && value.equals(ImageDecoder.imageToNameMap.get(b.image)))) return;
- String s = value == null ? null : value.toString();
- if (s == null || s.equals("")) b.image = null;
- else {
- if ((b.image = ImageDecoder.getPicture(s)) == null) {
- if (Log.on) Log.logJS(Box.class, "unable to load image " + s);
- } else {
- b.minwidth = b.image.getWidth();
- b.minheight = b.image.getHeight();
- MARK_FOR_REFLOW_b;
- }
+ //if (image != null) System.out.println("hit");
+ if (value == null) {
+ b.image = null;
+ } else if (value instanceof Res) {
+ b.image = Picture.fromRes((Res)value);
+ } else {
+ // FIXME