posts - 6, comments - 1, trackbacks - 0, articles - 0

          2008年9月19日

          public class NameManager implements INameManager {
                 private Set namePool = new HashSet();
                

              public String generateName(String nameType) {

                  if (!namePool.contains(nameType)) {
                 namePool.add(nameType);
                  return nameType;
            }

            int i = 1;
            while (namePool.contains(nameType + i)) {
             i++;
            }
            namePool.add(nameType + i);
            return nameType + i;
           }


          posted @ 2008-09-23 11:44 jr4e 閱讀(138) | 評論 (0)編輯 收藏

           ImageDescriptor temp = ImageDescriptor.createFromURL(url);

           org.eclipse.swt.graphics.Image image = temp.createImage();

          posted @ 2008-09-19 12:38 jr4e 閱讀(150) | 評論 (0)編輯 收藏

          主站蜘蛛池模板: 葵青区| 布尔津县| 东乡县| 庆城县| 监利县| 兴隆县| 京山县| 宝鸡市| 晋中市| 南漳县| 醴陵市| 芒康县| 岳池县| 石渠县| 乐都县| 昆明市| 巩义市| 东平县| 通河县| 木里| 图木舒克市| 龙胜| 南华县| 大余县| 平山县| 玉林市| 资溪县| 剑河县| 北宁市| 类乌齐县| 宁化县| 阿图什市| 中牟县| 南木林县| 浙江省| 宝丰县| 浠水县| 华宁县| 石河子市| 台南市| 太原市|