final HorizontalLayoutContainer mainContainer = new HorizontalLayoutContainer();
viewport.add(mainContainer);
mainContainer.getElement().getStyle().setProperty("textAlign", "center"); // IE hack for center alignment
final BorderLayoutContainer mainBorderLayoutContainer = new BorderLayoutContainer()
{
@Override
protected void doLayout()
{
super.doLayout();
getElement().getStyle().setProperty("textAlign", "left"); // clear IE hack
getElement().getStyle().setProperty("marginTop", "0");
getElement().getStyle().setProperty("marginRight", "auto");
getElement().getStyle().setProperty("marginBottom", "0");
getElement().getStyle().setProperty("marginLeft", "auto");
getElement().getStyle().setPosition(Position.RELATIVE);
}
};
mainBorderLayoutContainer.setBorders(true);
layoutDataVerticalCenter = new HorizontalLayoutData(DkMain.model().isFullSize() ? 1 : DkMain.config()
.getApplicationWidth(), 1, null);
mainContainer.add(mainBorderLayoutContainer, layoutDataVerticalCenter);
// NORTH PANEL --------------------------------------------------------------------------
final VerticalLayoutContainer northPanel = new VerticalLayoutContainer();
northPanel.setBorders(false);
tb = new ToolBar();
updateMainToolBar(tb);
northPanel.add(tb, new VerticalLayoutData(1, -1));
final StringBuffer sb = new StringBuffer();
sb.append("<div class='application-title-container'>");
sb.append("<img src='" + GWT.getHostPageBaseURL() + DkMain.i18n().appIconPath()).append("'/>");
sb.append("<span class='app-title'>").append(DkMain.i18n().appTitle()).append("</span>");
sb.append("<span class='app-title-info'>").append(getAppInfoLabel()).append("</span>");
sb.append("</div>");
final HTML titlePanel = new HTML(sb.toString());
northPanel.add(titlePanel, new VerticalLayoutData(1, -1));
final BorderLayoutData northBorderLayoutData = new BorderLayoutData(63);
mainBorderLayoutContainer.setNorthWidget(northPanel, northBorderLayoutData);
// HYPERLINK FORM PANEL -----------------------------------------------------------------
hyperlinkCallerFormPanel = new FormPanel();
hyperlinkCallerFormPanel.setAction("");
hyperlinkCallerFormPanel.setMethod(Method.POST);
northPanel.add(hyperlinkCallerFormPanel);
hyperLink = new Anchor();
hyperLink.setVisible(false);
northPanel.add(hyperLink);
// SCREEN CONTAINER PANEL ---------------------------------------------------------------
final MarginData centerBorderLayoutData = new MarginData(4, 2, 1, 2);
screenContainerPanel = new SimpleContainer();
mainBorderLayoutContainer.add(screenContainerPanel, centerBorderLayoutData);
}