ProjectUtil.java 文件源码

java
阅读 32 收藏 0 点赞 0 评论 0

项目:AndroidRobot 作者:
public static TreeItem importProject(String path,Tree tree,Display display) throws Exception{
    String project = readProjectName(path);
    Vector <IDeviceObject>vecDevices = readDevices(path);

    TreeItem root = new TreeItem(tree, SWT.NONE);
    root.setText(project);
    root.setImage(new Image(display, ClassLoader.getSystemResourceAsStream("icons/project.png")));

    TreeItem devices = new TreeItem(root, SWT.NONE);
    devices.setText("Devices");
    devices.setImage(new Image(display, ClassLoader.getSystemResourceAsStream("icons/devices.png")));

    for(int i =0;i<vecDevices.size();i++){
        TreeItem column = new TreeItem(devices, SWT.NONE);
        column.setText(vecDevices.get(i).name);
        column.setData("index",vecDevices.get(i).index);
        column.setData("sn",vecDevices.get(i).sn);
        column.setData("pixel",vecDevices.get(i).pixel);
        column.setData("name",vecDevices.get(i).name);
        column.setImage(new Image(display, ClassLoader.getSystemResourceAsStream("icons/disconn.png")));
    }
    return root;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号