This Domain(Admin5.com) is for Sale:

J2ME中实现可伸展目录树TreeList

时间:2007-10-22  来源:不详  作者:林子

   if (arg0 == List.SELECT_COMMAND) {
    /**
     * Set Current List Selected status
    */
    this.currentSelectedIndex = this.getSelectedIndex();
    System.out.println(this.appearHookList);

    this.currentSelectedObject = (ExpandListItem) this.appearHookList.elementAt(currentSelectedIndex);

    int indexInItemList = this.itemList.indexOf(this.appearHookList.elementAt(this.getSelectedIndex()));
    System.out.println(" Selected: " currentSelectedIndex " " this.currentSelectedObject " indexInItemList:" indexInItemList);
    /**
    *
    */
    if (this.currentSelectedObject.getType() == ExpandListItem.GROUP) {
     if (this.currentSelectedObject.Ifselected() == false) {// Previous
      // item
      // status
      // is
      // contractive,
need
      // to be 内容来自dedecms
      // expanded.
      System.out.println(this.currentSelectedObject.Ifselected());
      this.itemList.removeElementAt(indexInItemList);
      this.currentSelectedObject.setIfselected(true);
      this.itemList.insertElementAt(currentSelectedObject,
      indexInItemList);
     } else {
      this.itemList.removeElementAt(indexInItemList);
      this.currentSelectedObject.setIfselected(false);
      this.itemList.insertElementAt(currentSelectedObject,
      indexInItemList);
     }
     this.Init();
     this.LoadList();
    } else {
     if (this.currentSelectedObject.getSelectImgPath() != null) {
      if (this.currentSelectedObject.Ifselected() == false) {
       Image icon = Util.getImage(this.currentSelectedObject.getSelectImgPath());
       System.out.println(this.currentSelectedObject.Ifselected());
       this.itemList.removeElementAt(indexInItemList);

看完这篇,您有何感觉呢?

文章评论

共有位Admini5网友发表了评论 查看完整内容