History.addValueChangeHandler(this);
}
public Widget asWidget() {
LayoutPanel outerLayout = new LayoutPanel();
HorizontalPanel contentLayout = new HorizontalPanel();
contentLayout.setStyleName("fill-layout-width");
contentLayout.getElement().setAttribute("style", "height:34px");
headlineContainer = new LayoutPanel();
headlineContainer.setStyleName("fill-layout");
contentLayout.add(headlineContainer);
/*HTML debugLink = new HTML("Debug");
debugLink.setStyleName("cross-reference");
debugLink.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Console.MODULES.getPlaceManager().revealPlace(
new PlaceRequest(NameTokens.DebugToolsPresenter)
);
}
});
contentLayout.add(debugLink);*/
/*HTML settingsLink = new HTML(Console.CONSTANTS.common_label_settings());
settingsLink.setStyleName("cross-reference");
settingsLink.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Console.MODULES.getPlaceManager().revealPlace(
new PlaceRequest(NameTokens.SettingsPresenter)
);
}
});
contentLayout.add(settingsLink);
//debugLink.getElement().getParentElement().setAttribute("width", "50%");
//debugLink.getElement().getParentElement().setAttribute("style", "text-align:right; padding-right:20px;color:#4A5D75");
settingsLink.getElement().getParentElement().setAttribute("width", "50%");
settingsLink.getElement().getParentElement().setAttribute("align", "right");
settingsLink.getElement().getParentElement().setAttribute("style", "text-align:right; padding-right:20px;color:#4A5D75");
*/
headlineContainer.getElement().getParentElement().setAttribute("width", "50%");
Widget logo = getLogoSection();
Widget links = getLinksSection();
LayoutPanel innerLayout = new LayoutPanel();
innerLayout.setStyleName("header");
//innerLayout.add(logo);
innerLayout.add(links);
//innerLayout.setWidgetLeftWidth(logo, 0, Style.Unit.PX, 50, Style.Unit.PX);
innerLayout.setWidgetRightWidth(links, 10, Style.Unit.PX, 100, Style.Unit.PCT);
innerLayout.setWidgetTopHeight(links, 0, Style.Unit.PX, 40, Style.Unit.PX);
outerLayout.add(innerLayout);
outerLayout.add(contentLayout);
outerLayout.setWidgetTopHeight(innerLayout, 0, Style.Unit.PX, 40, Style.Unit.PX);