use of org.talend.designer.gefabstractmap.figures.table.entity.TreeBranch in project tdi-studio-se by Talend.
the class XmlmapTreeNodeFigure method createEntityItems.
/*
* (non-Javadoc)
*
* @see org.talend.designer.newabstractmap.figures.table.entity.TableEntityFigure#createEntityItems()
*/
@Override
protected void createEntityItems(TableEntityElement entityElement) {
this.treeNode = getEntityManager().getModel();
boolean isLookup = false;
if (treeNode instanceof OutputTreeNode) {
isLookup = true;
} else {
TreeNode inputTreeNodeRoot = XmlMapUtil.getTreeNodeRoot(treeNode);
if (inputTreeNodeRoot != null && inputTreeNodeRoot.eContainer() instanceof InputXmlTree) {
isLookup = ((InputXmlTree) inputTreeNodeRoot.eContainer()).isLookup();
}
}
if (isLookup) {
expression = new ExpressionFigure();
expression.setText(treeNode.getExpression());
if (!XmlMapUtil.isExpressionEditable(treeNode)) {
expression.setOpaque(true);
expression.setBackgroundColor(ColorProviderMapper.getColor(ColorInfo.COLOR_EXPREESION_DISABLE));
} else {
expression.setOpaque(false);
}
entityElement.add(expression);
}
branchContent = new XmlmapBranchContent(getEntityManager());
TreeBranch treeBranch = new TreeBranch(branchContent, !isRoot());
entityElement.add(treeBranch);
}
Aggregations