1 package org.simantics.browsing.ui.nattable;
3 import org.eclipse.core.runtime.FileLocator;
4 import org.eclipse.core.runtime.Path;
5 import org.eclipse.nebula.widgets.nattable.painter.cell.BackgroundPainter;
6 import org.eclipse.nebula.widgets.nattable.painter.cell.TextPainter;
7 import org.eclipse.nebula.widgets.nattable.painter.cell.decorator.PaddingDecorator;
8 import org.eclipse.nebula.widgets.nattable.style.theme.ModernNatTableThemeConfiguration;
9 import org.eclipse.nebula.widgets.nattable.tree.painter.IndentedTreeImagePainter;
10 import org.eclipse.nebula.widgets.nattable.tree.painter.TreeImagePainter;
11 import org.eclipse.nebula.widgets.nattable.ui.util.CellEdgeEnum;
12 import org.eclipse.nebula.widgets.nattable.util.GUIHelper;
14 public class GENatTableThemeConfiguration extends ModernNatTableThemeConfiguration{
16 public GENatTableThemeConfiguration(GETreeData treeData, int style) {
18 this.oddRowBgColor = GUIHelper.getColor(250, 250, 250);
19 this.defaultCellPainter =
20 new GEStyler(treeData,
30 TreeImagePainter treeImagePainter =
33 GUIHelper.getImage("right"), //$NON-NLS-1$
34 GUIHelper.getImage("right_down"), //$NON-NLS-1$
35 GUIHelper.getImageByURL("transparent",
36 FileLocator.find(Activator.getDefault().getBundle(),
37 new Path("images/transparent.png"), null))); //$NON-NLS-1$
38 this.treeStructurePainter =
39 new BackgroundPainter(
41 new IndentedTreeImagePainter(
54 TreeImagePainter treeSelectionImagePainter =
57 GUIHelper.getImage("right_inv"), //$NON-NLS-1$
58 GUIHelper.getImage("right_down_inv"), //$NON-NLS-1$
59 GUIHelper.getImageByURL("transparent",
60 FileLocator.find(Activator.getDefault().getBundle(),
61 new Path("images/transparent.png"), null))); //$NON-NLS-1$
62 this.treeStructureSelectionPainter =
63 new BackgroundPainter(
65 new IndentedTreeImagePainter(
69 treeSelectionImagePainter,