This Domain(Admin5.com) is for Sale:

J2ME中实现可伸展目录树TreeList

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

  }
  public void setLabel(String label) {
   this.label = label;
  }
  public int getType() {
   return type;
  }
  public void setType(int type) {
   this.type = type;
  }
  public boolean Ifselected() {
   return ifselected;
  }
  public void setIfselected(boolean ifselected) {
   this.ifselected = ifselected;
  }
  public String toString() {
   return this.label " ";
  }
  public String getImagePath() {
   return imagePath;
  }
  public void setImagePath(String imagePath) {
   this.imagePath = imagePath;
  }
  public String getSelectImgPath() {
   return selectImgPath;
  }
  public void setSelectImgPath(String selectImgPath) {
   this.selectImgPath = selectImgPath;
  }
}

--------------------------------------------------------------------------------

package com.skystudio.ExpandList;

import java.util.Vector;

import javax.microedition.lcdui.Command;
copyright dedecms

import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.List;

import com.skystudio.ui.toolkit.Util;

/**
* @author
sky
*
*/
public class ExpandList extends List implements CommandListener {
  private Vector itemList = new Vector();

  private ExpandListItem currentSelectedObject = null;

  private int currentSelectedIndex = -1;

  private Vector appearHookList = new Vector();

  public ExpandList(String title, int type, Vector itemList) {
   super(title, type);
   this.itemList = itemList;
   this.setCommandListener(this);
   LoadList();
  }

  public void appendItem(ExpandListItem item, Image icon, boolean ifSub) {
   appearHookList.addElement(item);
   System.out.println("Add current display list:" item);

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

文章评论

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