IDEMPIERE-1199 No color on trees. Base on patch from Nicolas Micoud.

This commit is contained in:
Heng Sin Low 2013-08-07 21:14:06 +08:00
parent 1dc923273d
commit 5e1637dbff
1 changed files with 10 additions and 0 deletions

View File

@ -12,6 +12,7 @@
*****************************************************************************/
package org.adempiere.webui.component;
import java.awt.Color;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
@ -156,6 +157,15 @@ public class SimpleTreeModel extends org.zkoss.zul.DefaultTreeModel<Object> impl
tr.setDroppable("true");
tr.addEventListener(Events.ON_DROP, this);
}
// Color
final MTreeNode mNode = (MTreeNode) ((DefaultTreeNode<?>) node).getData();
Color color = mNode.getColor();
if (color != null){
String hex = ZkCssHelper.createHexColorString(color);
ZkCssHelper.appendStyle(tc, "color: #" + hex);
}
// End color
}else{
tr = ti.getTreerow();
tr.getChildren().clear();