Mercurial > projects > dwt-addons
comparison dwtx/ui/internal/forms/widgets/ImageSegment.d @ 104:04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
These new wrappers now use the tango.util.containers instead of the tango.util.collections.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 07 Aug 2008 15:01:33 +0200 |
parents | 26c6c9dfd13c |
children |
comparison
equal
deleted
inserted
replaced
103:2d6540440fe6 | 104:04b47443bb01 |
---|---|
21 import dwt.graphics.Image; | 21 import dwt.graphics.Image; |
22 import dwt.graphics.Point; | 22 import dwt.graphics.Point; |
23 import dwt.graphics.Rectangle; | 23 import dwt.graphics.Rectangle; |
24 | 24 |
25 import dwt.dwthelper.utils; | 25 import dwt.dwthelper.utils; |
26 import tango.util.collection.HashMap; | 26 import dwtx.dwtxhelper.Collection; |
27 | 27 |
28 /** | 28 /** |
29 * @version 1.0 | 29 * @version 1.0 |
30 * @author | 30 * @author |
31 */ | 31 */ |
32 public class ImageSegment : ObjectSegment { | 32 public class ImageSegment : ObjectSegment { |
33 alias HashMap!(String,Object) Hashtable; | |
34 public static const String SEL_IMAGE_PREFIX = "isel."; //$NON-NLS-1$ | 33 public static const String SEL_IMAGE_PREFIX = "isel."; //$NON-NLS-1$ |
35 | 34 |
36 public Image getImage(Hashtable objectTable) { | 35 public Image getImage(Hashtable objectTable) { |
37 return getImage(getObjectId(), objectTable); | 36 return getImage(getObjectId(), objectTable); |
38 } | 37 } |
52 String key = SEL_IMAGE_PREFIX ~ getObjectId(); | 51 String key = SEL_IMAGE_PREFIX ~ getObjectId(); |
53 Image image = getImage(key, objectTable); | 52 Image image = getImage(key, objectTable); |
54 if (image is null) { | 53 if (image is null) { |
55 image = FormUtil.createAlphaMashImage(selData.display, getImage(objectTable)); | 54 image = FormUtil.createAlphaMashImage(selData.display, getImage(objectTable)); |
56 if (image !is null) | 55 if (image !is null) |
57 objectTable.add(key, image); | 56 objectTable.put(key, image); |
58 } | 57 } |
59 return image; | 58 return image; |
60 } | 59 } |
61 /* | 60 /* |
62 private String getSelectedImageId() { | 61 private String getSelectedImageId() { |