use of org.talend.designer.filemultischemas.data.EPropertyName in project tdi-studio-se by Talend.
the class SchemaDetailsColumnsProvider method getBackground.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.viewers.ITableColorProvider#getBackground(java.lang.Object, int)
*/
public Color getBackground(Object element, int columnIndex) {
if (element instanceof ColumnLineData) {
ColumnLineData lineData = (ColumnLineData) element;
final EPropertyName property = lineData.getProperty();
if (UIManager.isFirstForColumnModel(property)) {
return Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
}
if (columnIndex == 0) {
final int index = EPropertyName.indexOf(property);
if (index > -1 && index % 2 == 0) {
return Display.getDefault().getSystemColor(SWT.COLOR_INFO_BACKGROUND);
} else {
return Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
}
}
}
return null;
}
Aggregations