AutoResizeColumnCommandFixture command = new AutoResizeColumnCommandFixture();
GCFactory gcFactory = command.getGCFactory();
IConfigRegistry registry = command.getConfigRegistry();
GC gc = gcFactory.createGC();
int col0MaxTextWidth = new TextPainter().getPreferredWidth(
new CellFixture("Longest Text"), gc, registry);
int col1MaxTextWidth = new TextPainter().getPreferredWidth(
new CellFixture("Elephant"), gc, registry);
gc.dispose();
int[] maxColumnWidths = MaxCellBoundsHelper.getPreferredColumnWidths(
registry, gcFactory, dataLayer, new int[] { 0, 1 });