Google Web Toolkit (Beta)
Search this site:

# Class HorizontalSplitPanel

public final class HorizontalSplitPanel
extends SplitPanel
A panel that arranges two widgets in a single horizontal row and allows the user to interactively change the proportion of the width dedicated to each of the two widgets. Widgets contained within a `HorizontalSplitPanel` will be automatically decorated with scrollbars when necessary.

### CSS Style Rules

- .gwt-HorizontalSplitPanel { the panel itself }
- .gwt-HorizontalSplitPanel left { the left container }
- .gwt-HorizontalSplitPanel right { the right container }
- .gwt-HorizontalSplitPanel splitter { the splitter }

## Constructors

HorizontalSplitPanel() | Creates an empty horizontal split panel.

## Methods

getLeftWidget() | Gets the widget in the left side of the panel.
getRightWidget() | Gets the widget in the right side of the panel.
onLoad() | This method is called immediately after a widget becomes attached to the browser's document.
setHeight(String) | Sets the object's height.
setLeftWidget(Widget) | Sets the widget in the left side of the panel.
setRightWidget(Widget) | Sets the widget in the right side of the panel.
setSplitPosition(String) | Moves the position of the splitter.

## Constructor Detail

### HorizontalSplitPanel

public HorizontalSplitPanel()
Creates an empty horizontal split panel.

## Method Detail

### getLeftWidget

public final Widget getLeftWidget()
Gets the widget in the left side of the panel.

#### Return Value

the widget, `null` if there is not one.

### getRightWidget

public final Widget getRightWidget()
Gets the widget in the right side of the panel.

#### Return Value

the widget, `null` if there is not one.

### onLoad

protected void onLoad()
This method is called immediately after a widget becomes attached to the browser's document.

### setHeight

public void setHeight(String height)
Sets the object's height. This height does not include decorations such as border, margin, and padding.

#### Parameters

height
  the object's new height, in CSS units (e.g. "10px", "1em")

### setLeftWidget

public final void setLeftWidget(Widget w)
Sets the widget in the left side of the panel.

#### Parameters

w
  the widget

### setRightWidget

public final void setRightWidget(Widget w)
Sets the widget in the right side of the panel.

#### Parameters

w
  the widget

### setSplitPosition

public abstract void setSplitPosition(String size)
Moves the position of the splitter.

#### Parameters

size
  the new size of the left region in CSS units (e.g. "10px", "1em")