Class SplitLayoutPanel

java.lang.Object
All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, AnimatedLayout, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IndexedPanel, IndexedPanel.ForIsWidget, IsWidget, ProvidesResize, RequiresResize, Iterable<Widget>

public class SplitLayoutPanel extends DockLayoutPanel
A panel that adds user-positioned splitters between each of its child widgets.

This panel is used in the same way as DockLayoutPanel, except that its children's sizes are always specified in Style.Unit.PX units, and each pair of child widgets has a splitter between them that the user can drag.

This widget will only work in standards mode, which requires that the HTML page in which it is run have an explicit <!DOCTYPE> declaration.

CSS Style Rules

  • .gwt-SplitLayoutPanel { the panel itself }
  • .gwt-SplitLayoutPanel .gwt-SplitLayoutPanel-HDragger { horizontal dragger }
  • .gwt-SplitLayoutPanel .gwt-SplitLayoutPanel-VDragger { vertical dragger }

Example

public class SplitLayoutPanelExample implements EntryPoint {

  public void onModuleLoad() {
    // Create a three-pane layout with splitters. 
    SplitLayoutPanel p = new SplitLayoutPanel();
    p.addWest(new HTML("navigation"), 128);
    p.addNorth(new HTML("list"), 384);
    p.add(new HTML("details"));

    // Attach the LayoutPanel to the RootLayoutPanel. The latter will listen for
    // resize events on the window to ensure that its children are informed of
    // possible size changes.
    RootLayoutPanel rp = RootLayoutPanel.get();
    rp.add(p);
  }
}