public class XWorkerTreeUtil
extends java.lang.Object
构造器和说明 |
---|
XWorkerTreeUtil() |
限定符和类型 | 方法和说明 |
---|---|
static org.eclipse.swt.graphics.Color |
getColor(java.lang.String th_nodeColor) |
static org.eclipse.swt.graphics.Color |
getColor(org.xmeta.Thing thing,
org.eclipse.swt.widgets.Tree tree,
org.xmeta.ActionContext actionContext)
返回事物对应的字体颜色。
|
static org.eclipse.swt.graphics.Font |
getFont(org.xmeta.Thing thing,
org.eclipse.swt.widgets.Tree tree,
org.xmeta.ActionContext actionContext)
返回事物对应的字体。
|
static org.eclipse.swt.graphics.Image |
getIcon(org.xmeta.Thing thing,
org.eclipse.swt.widgets.Control tree,
org.xmeta.ActionContext actionContext)
返回事物对应的图标。
|
static org.eclipse.swt.graphics.Image |
getIcon(org.xmeta.Thing thing,
org.eclipse.swt.widgets.Control tree,
org.xmeta.ActionContext actionContext,
boolean findSelfIcon)
返回事物对应的图标。
|
static org.eclipse.swt.graphics.Image |
getIconFolder(org.eclipse.swt.widgets.Tree tree,
org.xmeta.ActionContext actionContext)
返回目录的图标。
|
static void |
initItem(org.eclipse.swt.widgets.TreeItem treeItem,
java.lang.String th_font,
java.lang.String th_nodeColor,
java.lang.String icon,
org.xmeta.ActionContext actionContext) |
static void |
initItem(org.eclipse.swt.widgets.TreeItem treeItem,
org.xmeta.Thing thing,
org.xmeta.ActionContext actionContext)
根据事物显示一个树节点的文字和图片等。
|
static void |
initTree(org.eclipse.swt.widgets.Tree tree,
java.util.List<java.lang.String> paths,
java.lang.String rootPath,
org.xmeta.ActionContext actionContext) |
static void |
showThingsOnTreeByGroup(java.util.List<org.xmeta.Thing> things,
java.lang.Object treeOrTreeItem,
org.xmeta.ActionContext actionContext)
根据事物的分组显示到树或树节点上,注意该方法并不清空树的子节点以及子节点的子节点,需要时请自己清空。
|
public static void initTree(org.eclipse.swt.widgets.Tree tree, java.util.List<java.lang.String> paths, java.lang.String rootPath, org.xmeta.ActionContext actionContext)
public static org.eclipse.swt.graphics.Image getIconFolder(org.eclipse.swt.widgets.Tree tree, org.xmeta.ActionContext actionContext)
tree
- actionContext
- public static org.eclipse.swt.graphics.Image getIcon(org.xmeta.Thing thing, org.eclipse.swt.widgets.Control tree, org.xmeta.ActionContext actionContext)
thing
- tree
- actionContext
- public static org.eclipse.swt.graphics.Image getIcon(org.xmeta.Thing thing, org.eclipse.swt.widgets.Control tree, org.xmeta.ActionContext actionContext, boolean findSelfIcon)
thing
- tree
- actionContext
- findSelfIcon
- 是否先从thing上寻找icon属性public static org.eclipse.swt.graphics.Font getFont(org.xmeta.Thing thing, org.eclipse.swt.widgets.Tree tree, org.xmeta.ActionContext actionContext)
thing
- tree
- actionContext
- public static org.eclipse.swt.graphics.Color getColor(org.xmeta.Thing thing, org.eclipse.swt.widgets.Tree tree, org.xmeta.ActionContext actionContext)
thing
- tree
- actionContext
- public static org.eclipse.swt.graphics.Color getColor(java.lang.String th_nodeColor)
public static void initItem(org.eclipse.swt.widgets.TreeItem treeItem, org.xmeta.Thing thing, org.xmeta.ActionContext actionContext)
treeItem
- thing
- actionContext
- public static void initItem(org.eclipse.swt.widgets.TreeItem treeItem, java.lang.String th_font, java.lang.String th_nodeColor, java.lang.String icon, org.xmeta.ActionContext actionContext)
public static void showThingsOnTreeByGroup(java.util.List<org.xmeta.Thing> things, java.lang.Object treeOrTreeItem, org.xmeta.ActionContext actionContext)
things
- treeOrTreeItem
-