Search in sources :

Example 6 with EPropertyName

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;
}
Also used : EPropertyName(org.talend.designer.filemultischemas.data.EPropertyName)

Aggregations

EPropertyName (org.talend.designer.filemultischemas.data.EPropertyName)6 MultiMetadataColumn (org.talend.designer.filemultischemas.data.MultiMetadataColumn)3 ArrayList (java.util.ArrayList)2 Control (org.eclipse.swt.widgets.Control)2 CellEditor (org.eclipse.jface.viewers.CellEditor)1 ComboBoxCellEditor (org.eclipse.jface.viewers.ComboBoxCellEditor)1 TreeEditor (org.eclipse.swt.custom.TreeEditor)1 FocusAdapter (org.eclipse.swt.events.FocusAdapter)1 FocusEvent (org.eclipse.swt.events.FocusEvent)1 Point (org.eclipse.swt.graphics.Point)1 Tree (org.eclipse.swt.widgets.Tree)1 TreeColumn (org.eclipse.swt.widgets.TreeColumn)1 TreeItem (org.eclipse.swt.widgets.TreeItem)1 MultiSchemasMetadataColumn (org.talend.designer.filemultischemas.data.MultiSchemasMetadataColumn)1 SchemasKeyData (org.talend.designer.filemultischemas.data.SchemasKeyData)1 SchemaDetailsProvider (org.talend.designer.filemultischemas.ui.provider.SchemaDetailsProvider)1 SchemaDetailsColumnMouseAdapter (org.talend.designer.filemultischemas.ui.provider.column.SchemaDetailsColumnMouseAdapter)1 SchemaDetailsColumnsProvider (org.talend.designer.filemultischemas.ui.provider.column.SchemaDetailsColumnsProvider)1 SchemaDetailsCheckBoxCellEditor (org.talend.designer.filemultischemas.ui.provider.property.SchemaDetailsCheckBoxCellEditor)1 SchemaDetailsPropertiesCellModifier (org.talend.designer.filemultischemas.ui.provider.property.SchemaDetailsPropertiesCellModifier)1