import org.eclipse.jface.window.DefaultToolTip;
import org.eclipse.jface.window.ToolTip;
import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.grid.data.DefaultColumnHeaderDataProvider;
import org.eclipse.nebula.widgets.nattable.layer.LabelStack;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
public class BulkEditorTooltip extends DefaultToolTip {
private NatTable natTable;
+ private DefaultColumnHeaderDataProvider colHeaderDataProvider;
- public BulkEditorTooltip(NatTable natTable) {
+ public BulkEditorTooltip(NatTable natTable, DefaultColumnHeaderDataProvider colHeaderDataProvider) {
super(natTable, ToolTip.NO_RECREATE, false);
this.natTable = natTable;
+ this.colHeaderDataProvider = colHeaderDataProvider;
}
@Override
else if(configLabels.hasLabel(BulkEditorE4Composite.LABEL_CANDIDATE)){
return Messages.BulkEditorTooltip_CANDIDATE;
}
+ int colIndex = this.natTable.getColumnIndexByPosition(col);
+ int rowIndex = this.natTable.getRowIndexByPosition(row);
+ if(rowIndex==0){
+ return colHeaderDataProvider.getDataValue(colIndex, rowIndex).toString();
+ }
return ""; //$NON-NLS-1$
}
|| configLabels.hasLabel(BulkEditorE4Composite.LABEL_TARGET)){
return true;
}
+
+ int rowIndex = this.natTable.getRowIndexByPosition(row);
+ if(rowIndex==0){
+ return true;
+ }
return false;
}