Example usage for org.eclipse.jface.viewers ViewerCell getVisualIndex

List of usage examples for org.eclipse.jface.viewers ViewerCell getVisualIndex

Introduction

In this page you can find the example usage for org.eclipse.jface.viewers ViewerCell getVisualIndex.

Prototype

public int getVisualIndex() 

Source Link

Document

Get the current index.

Usage

From source file:net.ssehub.easy.producer.ui.productline_editor.configuration.AbstractConfigurationLabelProvider.java

@Override
public void update(ViewerCell cell) {
    Object element = cell.getElement();
    int index = cell.getVisualIndex();
    String text = getColumnText(element, index);
    cell.setText(text);/*from   w  w  w.ja  v  a2s .c  om*/
    cell.setImage(getColumnImage(element, index));
    if (ColumnType.ERROR == columType(index) && null != text) {
        cell.setForeground(ERROR_COLOR);
    } else {
        cell.setForeground(getForeground(element));
    }
    cell.setBackground(getBackground(element));
}