Open maherdaoud opened 8 years ago
please help me if you can :)
Sorry but I am no longer supporting it, you can checkout the code from github though, it's public. On Mar 7, 2016 12:06 AM, "maherdaoud" notifications@github.com wrote:
please help me if you can :)
— Reply to this email directly or view it on GitHub https://github.com/singhalavi/graph-tree/issues/7#issuecomment-192957662 .
Ooh, i download the project from github, but my problem is, i can not detect the Main class when i create the JAR file to use it in another project. do you know the Main class of the project ?
Main class is GraphJsComponent
here is the sample code for your reference
GraphJSComponent graphJSComponent = new GraphJSComponent(); graphJSComponent.setNodesSize(120, 50); graphJSComponent.setLeftClickListener(new GraphJsLeftClickListener() {
@Override
public void onLeftClick(String id, String type, String parentId) {
System.out.println(id + " "+ type + " "+ parentId);
}
});
graphJSComponent.setImmediate(true);
String lhtml = "<div id='graph' class='graph' ></div>";//add
style='overflow:scroll' if required Label graphLabel = new Label(lhtml, Label.CONTENT_XHTML);
layout.addComponent(graphLabel);
layout.addComponent(graphJSComponent);
try {
graphJSComponent.addNode("fruits", "Fruits I Like", "level
1", null, null);//Give parent id as null for root node graphJSComponent.getNodeProperties("fruits").put("title", "Fruits I Like"); graphJSComponent.addNode("watermelon", "Watermelon", "level 2", null, "fruits");//first child of node with id fruits graphJSComponent.getNodeProperties("watermelon").put("title", "Its a very juicy fruit."); graphJSComponent.addNode("mango", "Mango", "level 2", null, "fruits");//second child of node with id fruits graphJSComponent.getNodeProperties("mango").put("title", "Katrina Kaif's favourite."); graphJSComponent.addNode("apple", "Apple", "level 2", null, "fruits");//third child of node with id fruits graphJSComponent.getNodeProperties("apple").put("title", "One apple a day, keeps the doctor away"); graphJSComponent.getNodeProperties("apple").put("fill", "#F00"); graphJSComponent.getNodeProperties("mango").put("fill", "yellow");
graphJSComponent.addNode("5", "Hapoos", "level 3", null,
"mango");//child of mango node graphJSComponent.getNodeProperties("5").put("title", "One of the best mangos");
graphJSComponent.addNode("6", "Green", "level 3", null,
"watermelon");//child of watermelon node graphJSComponent.getNodeProperties("6").put("title", "Green from outside, red inside"); graphJSComponent.getNodeProperties("6").put("fill", "#0F0");
//Another Tree in the same graph
graphJSComponent.addNode("fruitsnotlike", "Fruits I Dont
Like", "level 1", null, null);//Give parent id as null graphJSComponent.getNodeProperties("fruitsnotlike").put("title", "Another tree in the same graph"); graphJSComponent.addNode("lichy", "Lichy", "level 2", null, "fruitsnotlike");//first child of node with id fruitsnotlike graphJSComponent.getNodeProperties("lichy").put("title", "because its nto easy to eat it."); graphJSComponent.getNodeProperties("lichy").put("opacity", "0.2"); graphJSComponent.addNode("redlichy", "Red Lichy", "level 3", null, "lichy"); graphJSComponent.getNodeProperties("redlichy").put("title", "red lichy"); graphJSComponent.refresh();//Call refresh after you are done with your changes } catch (Exception e) { e.printStackTrace(); }//
On Mon, Mar 7, 2016 at 12:40 AM, maherdaoud notifications@github.com wrote:
Ooh, i download the project from github, but my problem is, i can not detect the Main class when i create the JAR file to use it in another project. do you know the Main class of the project ?
— Reply to this email directly or view it on GitHub https://github.com/singhalavi/graph-tree/issues/7#issuecomment-192964941 .
I download graph-tree project and i want to create jar file for it; my first question is : what is the Main class for graph-tree project. the second question is : using maven and vaadin-7.6.1 where is the new dependency for graph-tree project.