brokerIp = Cookies.getCookie("broker_ip");
DockLayoutPanel myDockLayoutPanel = new DockLayoutPanel(Unit.EM);
// draw the environment
FloorPlanWidget floorPlan = new FloorPlanWidget(myDockLayoutPanel, null);
RootLayoutPanel rootPanel = RootLayoutPanel.get();
SimplePanel greenLateralPanel = new SimplePanel();
greenLateralPanel.setStyleName("lateral_panel");
SimplePanel borderpanel = new SimplePanel();
borderpanel.setStyleName("header_panel");
myDockLayoutPanel.addWest(greenLateralPanel, 10);
myDockLayoutPanel.addWest(borderpanel, 2);
final OMSVGSVGElement svg = images.logo_svg().getSvg();
SVGImage myImage = new SVGImage(svg) {
protected void onAttach() {
OMSVGRect viewBox = svg.getViewBox().getBaseVal();
if (viewBox.getWidth() == 0 || viewBox.getHeight() == 0) {
OMSVGRect bbox = svg.getBBox();
bbox.assignTo(viewBox);
}
svg.getStyle().setWidth(300, Unit.PX);
svg.getStyle().setHeight(130, Unit.PX);
super.onAttach();
}
};
myImage.setStyleName("logo");
SimplePanel logoPanel = new SimplePanel();
logoPanel.add(myImage);
logoPanel.setStyleName("header_panel");
myDockLayoutPanel.addNorth(logoPanel, 10.7);
myDockLayoutPanel.addNorth(new EnvListBox(floorPlan), 2);
SimplePanel footerPanel = new SimplePanel();
footerPanel.setStyleName("header_panel");
myDockLayoutPanel.addSouth(footerPanel, 4);
rootPanel.add(myDockLayoutPanel);
myDockLayoutPanel.add(floorPlan.getCanvas());
//Temporal hack to the configuration until we decide about it
brokerIp = com.google.gwt.user.client.Window.Location.getHostName();
init();