GWT SplitLayoutPanel

GWT SplitLayoutPanel is similar to the GWT DockLayoutPanel, except its children sizes are always specified in absolute value. Its child widget has splitter in between each widget which help user to drag widget accordingly.

GWT SplitLayoutPanel Class Declaration

Let's see the declaration of com.google.gwt.user.client.ui.SplitLayoutPanel

SplitLayoutPanel Nested Classes

ClassDescription
SplitLayoutPanel.HSplitterIt splits the panel horizontally.
SplitLayoutPanel.SplitterIts is the common splitter.
SplitLayoutPanel.VSplitterIt splits the panel vertically.

GWT SplitLayoutPanel Constructors

ConstructorDescription
SplitLayoutPanel()It construct a new SplitLayoutPanel with the default splitter size of 8px.
SplitLayoutPanel(int splitterSize)It construct a new SplitLayoutPanel with the specified splitter size in pixels.

SplitLayoutPanel Common Methods

Modifier and TypesMethodDescription
intgetSplitterSize()It return the size of the splitter in pixels.
voidinsert(Widget child, DockLayoutPanel.Direction direction, double size, Widget before)It adds a widget to the specified edge of the dock.
booleanremove(Widget child)It removes a child widget.
voidsetWidgetHidden(Widget widget, boolean hidden)It sets whether or not the given widget should be hidden.
voidsetWidgetMinSize(Widget child, int minSize)It sets the minimum allowable size for the given widget.
voidsetWidgetSnapClosedSize(Widget child, int snapClosedSize)It sets a size below which the slider will close completely.
voidsetWidgetToggleDisplayAllowed(Widget child, boolean allowed)It sets whether or not double-clicking on the splitter should toggle the display of the widget.

GWT SplitLayoutPanel Example

//SampleSplitLayoutPanel.java

//SampleSplitLayoutPanel.css

Output:

GWT Split Layout Panel 1



Latest Courses