I am using Model–view–controller design pattern, I need a UI Viewer for my BST/AVL models ,I already developed the Model and controller logics, I just need the viewer, I do not need to deal with graphics right now, it would be useful if someone has a Viewer class with a method that takes the root of a tree and draws it, no need for advanced animation or effects
something like
SimpleBSTreeViewer.draw(myTree.getRoot());
node structure of the tree
public class NodeBST <T extends Comparable<T>> {
private T data;
private NodeBST<T> left;
private NodeBST<T> right;
private NodeBST<T> parent;
//other methods go here ...
}
this would be helpful to focus of coding the logic part,
I have searched and found other java applets that represents trees but they have the model-logic and view in same class , I am working in model-view-controller pattern (MVC pattern) , it is better to separate model from view as much as possible , I just want a viewer for my model
-Note: this is a sample of what i need (I already use JTree and it is not satisfactory.)