List of usage examples for com.google.gwt.user.client.ui SplitLayoutPanel add
@Override public void add(Widget widget)
From source file:org.rstudio.studio.client.application.ui.RequestLogVisualization.java
License:Open Source License
public RequestLogVisualization() { overviewPanel_ = new LayoutPanel(); overviewPanel_.getElement().getStyle().setProperty("borderRight", "2px dashed #888"); scrollPanel_ = new ScrollPanelWithClick(overviewPanel_); scrollPanel_.setSize("100%", "100%"); scrollPanel_.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { detail_.setWidget(instructions_); }/*from ww w. j av a 2 s .com*/ }); SplitLayoutPanel outerPanel = new SplitLayoutPanel(); outerPanel.getElement().getStyle().setBackgroundColor("white"); outerPanel.getElement().getStyle().setZIndex(500); outerPanel.getElement().getStyle().setOpacity(0.9); detail_ = new SimplePanel(); detail_.getElement().getStyle().setBackgroundColor("#FFE"); instructions_ = new HTML(); instructions_.setHTML("<p>Click on a request to see details. Click on the " + "background to show these instructions again.</p>" + "<h4>Available commands:</h4>" + "<ul>" + "<li>Esc: Close</li>" + "<li>P: Play/pause</li>" + "<li>E: Export</li>" + "<li>I: Import</li>" + "<li>+/-: Zoom in/out</li>" + "</ul>"); detail_.setWidget(instructions_); outerPanel.addSouth(detail_, 200); outerPanel.add(scrollPanel_); initWidget(outerPanel); handlerRegistration_ = Event.addNativePreviewHandler(this); timer_ = new Timer() { @Override public void run() { refresh(true, false); } }; refresh(true, true); }
From source file:org.simpledbm.samples.forum.client.SimpleForum.java
License:Open Source License
/** * This is the entry point method./* www.j av a 2s . co m*/ */ public void onModuleLoad() { DockLayoutPanel outer = new DockLayoutPanel(Unit.EM); outer.addNorth(topPanel, 5); SplitLayoutPanel p = new SplitLayoutPanel(); p.addWest(forums, 192); p.addNorth(topics, 200); p.add(posts); outer.add(p); RootLayoutPanel root = RootLayoutPanel.get(); root.add(outer); requestProcessor.getForums(); }