mainPanel.setMonitorWindowResize(true);
mainPanel.setBorders(true);
setLayout(new BorderLayout());
mainPanel.setLayout(new BorderLayout());
HTML newLine = new HTML("<br>", true);
add(newLine, new BorderLayoutData(LayoutRegion.NORTH, 20.0f));
leftPanel = new LayoutContainer();
setPadding(leftPanel);
mainPanel.add(leftPanel, new BorderLayoutData(LayoutRegion.WEST, 110.0f));
leftPanel.setLayout(new RowLayout(Orientation.VERTICAL));
logo = new HTML("<img src='./images/logo.gif'/>");
leftPanel.add(logo);
LayoutContainer rightPanel = new LayoutContainer();
mainPanel.add(rightPanel, new BorderLayoutData(LayoutRegion.EAST, 200));
rightPanel.setLayout(new VBoxLayout());
rightPanel.add(nomLabel);
LayoutContainer linksPanel = new LayoutContainer();
// linksPanel.setWidth("100%");
TableLayout tl_linksPanel = new TableLayout(2);
tl_linksPanel.setWidth("100%");
// tl_linksPanel.setCellPadding(7);
tl_linksPanel.setCellHorizontalAlign(HorizontalAlignment.LEFT);
tl_linksPanel.setTableStyle("padding-left:45px");
linksPanel.setLayout(tl_linksPanel);
acceuilLink.addListener(Events.OnClick, new Listener<BaseEvent>() {
@Override
public void handleEvent(BaseEvent be) {
GuiUtil.gotoEcran(new AcceuilEcran());
}
});
linksPanel.add(acceuilLink, new TableData(HorizontalAlignment.RIGHT, VerticalAlignment.BOTTOM));
adminLink.addListener(Events.OnClick, new Listener<BaseEvent>() {
@Override
public void handleEvent(BaseEvent be) {
GuiUtil.gotoEcran(new AdminEcran());
}
});
linksPanel.add(adminLink, new TableData(HorizontalAlignment.RIGHT, VerticalAlignment.BOTTOM));
version = new HTML("", false);
version.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
version.setWordWrap(false);
ClientPropertiesServiceAsync.Util.getInstance().getVersionInfo(new AsyncCallbackWithErrorResolution<String>() {
@Override
public void onSuccess(String result) {
version.setHTML("<font size='1'>" + result + "</font>");
}
});
// linksPanel.add(version);
rightPanel.add(linksPanel);
LayoutContainer layoutBanner = new LayoutContainer();
LayoutContainer layoutVersion = new LayoutContainer();
layoutVersion.setLayout(new RowLayout(Orientation.HORIZONTAL));
layoutVersion.add(version, new RowData());
layoutVersion.setHeight(20);
layoutVersion.setWidth(50);
layoutVersion.setStyleAttribute("padding-bottom", "25px");
layoutBanner.setLayout(new TableLayout(2));
banner = new HTML("<img src='./images/banner-first.png'/>");
banner.setStyleName("actionHTML");
banner.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
GuiUtil.gotoEcran(new AcceuilEcran());
}
});
layoutBanner.add(banner, new TableData());
layoutBanner.add(layoutVersion, new TableData(HorizontalAlignment.LEFT, VerticalAlignment.BOTTOM));
mainPanel.add(layoutBanner, new BorderLayoutData(LayoutRegion.CENTER));
add(mainPanel, new BorderLayoutData(LayoutRegion.CENTER));
mainPanel.setStyleAttribute("border-color", "black");
setPadding(this);
mainPanel.setId("headerPanel");
rightPanel.setId("eastPanel");
setDefaultBackgroundColor(mainPanel);