use of org.talend.designer.xmlmap.figures.treesettings.XmlMapFilterContainer in project tdi-studio-se by Talend.
the class InputXmlTreeFigure method createTreeSettings.
/*
* (non-Javadoc)
*
* @see org.talend.designer.xmlmap.figures.AbstractInOutTreeFigure#createTreeSettings(org.eclipse.draw2d.Figure)
*/
@Override
protected void createTreeSettings(Figure parent) {
if (getInputXmlTree().isLookup()) {
settingContainer = new InputTreeSettingContainer(getMappManager());
parent.add(settingContainer);
filterFigure = new XmlMapFilterContainer(getMappManager(), (Composite) getMappManager().getEditPart().getViewer().getControl());
parent.add(filterFigure);
globalMapContainer = new GlobalMapContainer(getMappManager());
parent.add(globalMapContainer);
}
}
use of org.talend.designer.xmlmap.figures.treesettings.XmlMapFilterContainer in project tdi-studio-se by Talend.
the class OutputXmlTreeFigure method createTreeSettings.
/*
* (non-Javadoc)
*
* @see org.talend.designer.xmlmap.figures.AbstractInOutTreeFigure#createTreeSettings(org.eclipse.draw2d.Figure)
*/
@Override
protected void createTreeSettings(Figure parent) {
settingContainer = new OutputTreeSettingContainer(getTableManager());
parent.add(settingContainer);
filterFigure = new XmlMapFilterContainer(getTableManager(), (Composite) getTableManager().getEditPart().getViewer().getControl());
parent.add(filterFigure);
}
use of org.talend.designer.xmlmap.figures.treesettings.XmlMapFilterContainer in project tdi-studio-se by Talend.
the class SearchZoneMapper method setEntryState.
public void setEntryState(MapperManager mapperManager, EntryState entryState, Figure entry) {
if (entry != null) {
if (entry instanceof XmlmapTreeNodeFigure) {
XmlmapTreeNodeFigure xmlMapTreeNodeFigure = (XmlmapTreeNodeFigure) entry;
if (xmlMapTreeNodeFigure != null) {
if (xmlMapTreeNodeFigure.getExpressionFigure() != null && matcher.matches(xmlMapTreeNodeFigure.getExpressionFigure().getText())) {
xmlMapTreeNodeFigure.getExpressionFigure().setOpaque(true);
xmlMapTreeNodeFigure.getExpressionFigure().setBackgroundColor(entryState.getColor());
}
if (xmlMapTreeNodeFigure.getTreeNode() != null && matcher.matches(xmlMapTreeNodeFigure.getTreeNode().getName())) {
if (XmlMapUtil.isSubElementOfDocument(xmlMapTreeNodeFigure.getTreeNode())) {
if (!xmlMapTreeNodeFigure.getTreeNode().getName().endsWith("(choice)")) {
xmlMapTreeNodeFigure.getBranchContent().setOpaque(true);
xmlMapTreeNodeFigure.getBranchContent().setBackgroundColor(entryState.getColor());
}
} else {
xmlMapTreeNodeFigure.setOpaque(true);
xmlMapTreeNodeFigure.setBackgroundColor(entryState.getColor());
xmlMapTreeNodeFigure.setOpaque(false);
if (xmlMapTreeNodeFigure.getExpressionFigure() != null && !matcher.matches(xmlMapTreeNodeFigure.getExpressionFigure().getText())) {
// xmlMapTreeNodeFigure.getExpressionFigure().setOpaque(true);
// xmlMapTreeNodeFigure.getExpressionFigure().setBackgroundColor(EntryState.NONE.getColor());
}
}
}
}
} else if (entry instanceof VarEntityFigure) {
VarEntityFigure varEntityFigure = (VarEntityFigure) entry;
if (varEntityFigure != null) {
if (varEntityFigure.getExpression() != null && matcher.matches(varEntityFigure.getExpression().getText())) {
varEntityFigure.getExpression().setOpaque(true);
varEntityFigure.getExpression().setBackgroundColor(entryState.getColor());
}
if (varEntityFigure.getVarName() != null && matcher.matches(varEntityFigure.getVarName())) {
varEntityFigure.setOpaque(true);
varEntityFigure.setBackgroundColor(entryState.getColor());
if (varEntityFigure.getExpression() == null || !matcher.matches(varEntityFigure.getExpression().getText())) {
varEntityFigure.getExpression().setOpaque(true);
varEntityFigure.getExpression().setBackgroundColor(EntryState.NONE.getColor());
}
varEntityFigure.getTypeFigure().setOpaque(true);
varEntityFigure.getTypeFigure().setBackgroundColor(EntryState.NONE.getColor());
}
}
} else if (entry instanceof XmlMapFilterContainer) {
XmlMapFilterContainer filterText = (XmlMapFilterContainer) entry;
if (filterText != null && filterText.getTextArea() != null) {
filterText.getTextArea().setOpaque(true);
filterText.getTextArea().setBackgroundColor(entryState.getColor());
}
}
}
}
Aggregations