I am trying to style a NatTable tree so that the indentation of non-decorated items matches that of decorated items. So items without children and items with children have the same indentation, basically.
The example that I am following using the following configuration:
public class PerfLogTreeConfiguration extends AbstractRegistryConfiguration {
private static final int fTreeIndent = 10;
private static final int fIconSpacing = 2;
private TreeImagePainter fTreeImagePainter = new TreeImagePainter(false,
GUIHelper.getImage("right"), //$NON-NLS-1$
GUIHelper.getImage("right_down"), null); //$NON-NLS-1$
private IndentedTreeImagePainter indentedTreeImagePainter = new IndentedTreeImagePainter(
fTreeIndent,
null,
CellEdgeEnum.LEFT,
fTreeImagePainter,
false,
fIconSpacing,
true);
private PaddingDecorator paddingDecorator = new PaddingDecorator(
indentedTreeImagePainter,
0,
5,
0,
5,
true);
private ICellPainter fTreeStructurePainter = new BackgroundPainter(paddingDecorator);
@Override
public void configureRegistry(IConfigRegistry configRegistry) {
configRegistry.registerConfigAttribute(TreeConfigAttributes.TREE_STRUCTURE_PAINTER, fTreeStructurePainter,
DisplayMode.NORMAL);
}
A is the intended layour and B is what I am currently getting.