当前位置: 首页>>代码示例>>Java>>正文


Java TreeRow类代码示例

本文整理汇总了Java中com.trollworks.toolkit.ui.widget.tree.TreeRow的典型用法代码示例。如果您正苦于以下问题:Java TreeRow类的具体用法?Java TreeRow怎么用?Java TreeRow使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TreeRow类属于com.trollworks.toolkit.ui.widget.tree包,在下文中一共展示了TreeRow类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: openSelection

import com.trollworks.toolkit.ui.widget.tree.TreeRow; //导入依赖的package包/类
@Override
public void openSelection() {
    List<TreeContainerRow> containers = new ArrayList<>();
    boolean hadFile = false;
    for (TreeRow row : mTreePanel.getExplicitlySelectedRows()) {
        if (row instanceof TreeContainerRow) {
            containers.add((TreeContainerRow) row);
        } else {
            open(((LibraryFileRow) row).getPath());
            hadFile = true;
        }
    }
    if (!hadFile) {
        for (TreeContainerRow container : containers) {
            mTreePanel.setOpen(!mTreePanel.isOpen(container), container);
        }
    }
}
 
开发者ID:richardwilkes,项目名称:gcs,代码行数:19,代码来源:LibraryExplorerDockable.java

示例2: collectRowsToOpen

import com.trollworks.toolkit.ui.widget.tree.TreeRow; //导入依赖的package包/类
private List<TreeContainerRow> collectRowsToOpen(TreeContainerRow parent, Set<String> selectors, List<TreeContainerRow> list) {
    if (list == null) {
        list = new ArrayList<>();
    }
    for (TreeRow row : parent.getChildren()) {
        if (row instanceof TreeContainerRow) {
            TreeContainerRow container = (TreeContainerRow) row;
            if (selectors.contains(((LibraryExplorerRow) row).getSelectionKey())) {
                list.add(container);
            }
            collectRowsToOpen(container, selectors, list);
        }
    }
    return list;
}
 
开发者ID:richardwilkes,项目名称:gcs,代码行数:16,代码来源:LibraryExplorerDockable.java

示例3: collectRows

import com.trollworks.toolkit.ui.widget.tree.TreeRow; //导入依赖的package包/类
private List<TreeRow> collectRows(TreeContainerRow parent, Set<String> selectors, List<TreeRow> list) {
    if (list == null) {
        list = new ArrayList<>();
    }
    for (TreeRow row : parent.getChildren()) {
        if (selectors.contains(((LibraryExplorerRow) row).getSelectionKey())) {
            list.add(row);
        }
        if (row instanceof TreeContainerRow) {
            collectRows((TreeContainerRow) row, selectors, list);
        }
    }
    return list;
}
 
开发者ID:richardwilkes,项目名称:gcs,代码行数:15,代码来源:LibraryExplorerDockable.java

示例4: collect

import com.trollworks.toolkit.ui.widget.tree.TreeRow; //导入依赖的package包/类
private static void collect(TreeRow row, String text, ArrayList<Object> list) {
    if (row instanceof LibraryExplorerRow) {
        if (((LibraryExplorerRow) row).getName().toLowerCase().contains(text)) {
            list.add(row);
        }
    }
    if (row instanceof TreeContainerRow) {
        for (TreeRow child : ((TreeContainerRow) row).getChildren()) {
            collect(child, text, list);
        }
    }
}
 
开发者ID:richardwilkes,项目名称:gcs,代码行数:13,代码来源:LibraryExplorerDockable.java

示例5: searchSelect

import com.trollworks.toolkit.ui.widget.tree.TreeRow; //导入依赖的package包/类
@Override
public void searchSelect(List<Object> selection) {
    List<TreeRow> list = new ArrayList<>();
    for (Object one : selection) {
        if (one instanceof TreeRow) {
            list.add((TreeRow) one);

        }
    }
    mTreePanel.setParentsOpen(list);
    mTreePanel.select(list);
    mTreePanel.requestFocus();
}
 
开发者ID:richardwilkes,项目名称:gcs,代码行数:14,代码来源:LibraryExplorerDockable.java

示例6: getField

import com.trollworks.toolkit.ui.widget.tree.TreeRow; //导入依赖的package包/类
@Override
public String getField(TreeRow row) {
    return ((LibraryExplorerRow) row).getName();
}
 
开发者ID:richardwilkes,项目名称:gcs,代码行数:5,代码来源:LibraryExplorerDockable.java

示例7: getIcon

import com.trollworks.toolkit.ui.widget.tree.TreeRow; //导入依赖的package包/类
@Override
public StdImage getIcon(TreeRow row) {
    return ((LibraryExplorerRow) row).getIcon();
}
 
开发者ID:richardwilkes,项目名称:gcs,代码行数:5,代码来源:LibraryExplorerDockable.java

示例8: getName

import com.trollworks.toolkit.ui.widget.tree.TreeRow; //导入依赖的package包/类
public static String getName(TreeRow row) {
	if (row instanceof TreeRowWithName) {
		return ((TreeRowWithName) row).getName();
	}
	return null;
}
 
开发者ID:Ayutac,项目名称:toolkit,代码行数:7,代码来源:TreeTestRow.java

示例9: getSecond

import com.trollworks.toolkit.ui.widget.tree.TreeRow; //导入依赖的package包/类
public static String getSecond(TreeRow row) {
	if (row instanceof TreeRowWithName) {
		return ((TreeRowWithName) row).getSecond();
	}
	return null;
}
 
开发者ID:Ayutac,项目名称:toolkit,代码行数:7,代码来源:TreeTestRow.java

示例10: getIcon

import com.trollworks.toolkit.ui.widget.tree.TreeRow; //导入依赖的package包/类
public static StdImage getIcon(TreeRow row) {
	if (row instanceof TreeRowWithIcon) {
		return ((TreeRowWithIcon) row).getIcon();
	}
	return null;
}
 
开发者ID:Ayutac,项目名称:toolkit,代码行数:7,代码来源:TreeTestRow.java


注:本文中的com.trollworks.toolkit.ui.widget.tree.TreeRow类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。