mainContainer.setWidget(0, 0, firstWidget);
mainContainer.setWidget(0, 1, divider);
mainContainer.setWidget(0, 2, secondWidget);
CellFormatter cellFormatter = mainContainer.getCellFormatter();
cellFormatter.setHorizontalAlignment(0, 0, HasAlignment.ALIGN_LEFT);
cellFormatter.setVerticalAlignment(0, 0, HasAlignment.ALIGN_TOP);
cellFormatter.setStyleName(0, 1, "SplitPaneDividerField");
cellFormatter.setHorizontalAlignment(0, 1, HasAlignment.ALIGN_CENTER);
cellFormatter.setVerticalAlignment(0, 1, HasAlignment.ALIGN_MIDDLE);
cellFormatter.setHorizontalAlignment(0, 2, HasAlignment.ALIGN_LEFT);
cellFormatter.setVerticalAlignment(0, 2, HasAlignment.ALIGN_TOP);
} else {
mainContainer = new Grid(3, 1);
mainContainer.setWidget(0, 0, firstWidget);
mainContainer.setWidget(1, 0, divider);
mainContainer.setWidget(2, 0, secondWidget);
CellFormatter cellFormatter = mainContainer.getCellFormatter();
cellFormatter.setHorizontalAlignment(0, 0, HasAlignment.ALIGN_LEFT);
cellFormatter.setVerticalAlignment(0, 0, HasAlignment.ALIGN_TOP);
cellFormatter.setStyleName(1, 0, "SplitPaneDividerField");
cellFormatter.setHorizontalAlignment(1, 0, HasAlignment.ALIGN_CENTER);
cellFormatter.setVerticalAlignment(1, 0, HasAlignment.ALIGN_MIDDLE);
cellFormatter.setHorizontalAlignment(2, 0, HasAlignment.ALIGN_LEFT);
cellFormatter.setVerticalAlignment(2, 0, HasAlignment.ALIGN_TOP);
}
mainContainer.setStyleName("SplitPane");
mainContainer.setCellPadding(0);
mainContainer.setCellSpacing(0);