※ Reporting bugs or issues will help me improve the plugin and help others.
CustomTreeUI
● This plugin is designed to simplify the implementation and usage of TreeUI.
● By implementing the object-pooling-technique with sliding window, I confirmed that even hundreds of thousands of Tree Items can be displayed without any issues.
● Feel free to customize or use it as you wish. You can refer to the provided examples for guidance.
● Once again, I ended up making a resource that ㅠㅠ nobody seems to like.
● You can easily implement a tree structure with just a few lines of code, as shown below.
● Three different SkinModes are supported.
- Basic Vam Skin
- White Skin
- Black Skin
● Provides a dynamic tree structure with support for adding and removing nodes.
● Hierarchical tree structures can also be loaded.
● To integrate with the existing hierarchical system architecture, you can use the internally defined bind function to establish the connection.
● File system loading is of course supported. This is an example of loading a sub-file system from VaM.
● Typically, pressing F5 triggers a refresh, and this is especially noticeable when working within the file system..
● Loading of JSON structures is also supported in the demo. Naturally, it's read-only?modification and deletion are not allowed.
CustomTreeUI
● This plugin is designed to simplify the implementation and usage of TreeUI.
● By implementing the object-pooling-technique with sliding window, I confirmed that even hundreds of thousands of Tree Items can be displayed without any issues.
● Feel free to customize or use it as you wish. You can refer to the provided examples for guidance.
● Once again, I ended up making a resource that ㅠㅠ nobody seems to like.
● You can easily implement a tree structure with just a few lines of code, as shown below.
C#:
{
CustomTreeUI<String>tree = new CustomTreeUI<String>(this, "TreeBasic")
.newHalfLineUI(CreateUIElement, true).setHeight(330)
.setColorSet(CustomTreeUI<String>.UI_SKIN_BASIC)
.addSelectClickCallback(selectClickEvent)
.addDoubleClickCallback(doubleClickEvent)
.addExpandClickCallback(expandClickEvent);
setdata(tree);
}
public static void setdata(CustomTreeUI<String>tree)
{
tree.removeAll();
TreeItem<String>item1 = tree.add("Fruit");
item1.add("Apple");
item1.add("Banana");
item1.add("Grape");
item1.add("Pineapple");
TreeItem<String>item2 = tree.add("Car");
TreeItem<String>item2sub1 = item2.add("Sedan");
TreeItem<String>item2sub2 = item2.add("Trucks");
item2sub1.add("Hyundai");
item2sub1.add("Chevrolet");
item2sub1.add("Toyota");
item2sub1.add("Jaguar");
item2sub1.add("Tesla");
item2.find("Trucks").add("Ford");
item2.find("Trucks").add("Chevrolet");
item2.find("Trucks").add("GMC");
item2.find("Trucks").add("RAM");
}
● Three different SkinModes are supported.
- Basic Vam Skin
- White Skin
- Black Skin
● Provides a dynamic tree structure with support for adding and removing nodes.
● Hierarchical tree structures can also be loaded.
● To integrate with the existing hierarchical system architecture, you can use the internally defined bind function to establish the connection.
C#:
// Defined binding structure
public class TreeSystem : TreeItem<Tree>
{// sup_tree : parent(super) treeitem
// this_obj : thiz object, you want to handle will be this
// tree_dep : depth of the hierarchical structure
public TreeSystem(TreeItem<Tree>sup_tree, Tree this_obj, int tree_dep = 0) : base(sup_tree, this_obj, tree_dep) {}
public override String getName(Tree o)
{
return o.nme;
}
public override String getDisplayName(Tree o)
{
return getName(o);
}
public override String getPath(TreeItem<Tree>sup_tree, Tree o)
{
String sup_path = is_root() ? "/" : sup_tree.treepath + "/";
return sup_path + getName(o);
}
public override List<Tree>getChild(Tree o)
{
List<Tree>list = new List<Tree>();
list.AddRange(o.child);
return list;
}
}
// An example of a tree-structured system to be integrated.
public class Tree
{
public Tree sup;
public String nme;
public object obj { get; set; }
public List<Tree>child = new List<Tree>();
public Tree(String nme)
{
this.nme = nme;
}
public Tree parent()
{
return sup;
}
public Tree add(Tree t)
{
t.sup = this; child.Add(t); return t;
}
public Tree find(String n)
{
if (nme.Equals(n)) return this;
for (int i = 0; child != null && i < child.Count; i++) { Tree t = child[i].find(n); if (t != null) return t; }
return null;
}
}
● File system loading is of course supported. This is an example of loading a sub-file system from VaM.
● Typically, pressing F5 triggers a refresh, and this is especially noticeable when working within the file system..
● Loading of JSON structures is also supported in the demo. Naturally, it's read-only?modification and deletion are not allowed.
● TreeItem can also serve as a trigger target.
● It’s currently under preparation...