2014-02-12 41 views

回答

1

要使用HTML標籤,您需要將HTML添加到標籤並將allowHtml選項設置爲true。我不熟悉Vaadin的實現,但基於演示,你可能想要這樣的事情:

OrganizationalChart oc = new OrganizationalChart(); 
oc.setSizeFull(); 
oc.setOption("size", "medium"); 
oc.setOption("allowCollapse", false); 
oc.setOption("allowHtml", true); 
oc.add("CEO", "", "<b>CEO</b> Bert Big"); 
oc.add("CIO", "CEO", "<b>CIO</b> Charly IT"); 
oc.add("CFO", "CEO", "<b>CFO</b> Funny Muny"); 
oc.add("Strategy", "CIO", "<b>Strategy</b> Willy Wonder");