Home

# Class goog.ui.SplitPane

A left/right up/down Container SplitPane. Create SplitPane with two goog.ui.Component opjects to split. TODO(user): Support minimum splitpane size. TODO(user): Allow component change/orientation after init. TODO(user): Support hiding either side of handle (plus handle). TODO(user): Look at setBorderBoxSize fixes and revist borderwidth code.

extends goog.ui.Component

Instance Method Summary
| `canDecorate(?Element element) ⇒ boolean` Determines if a given element can be decorated by this type of component.
| `createDom()` Create the DOM node & text node needed for the splitpane.
| `decorateInternal(?Element element)` Decorates the given HTML element as a SplitPane. Overrides {@link goog.ui.Component#decorateInternal}. Considered protected.
| `disposeInternal()` Disposes of the component. Calls {@code exitDocument}, which is expected to remove event handlers and clean up the component. Propagates the call to the component's children, if any. Removes the component's DOM from the document unless it was decorated.
| `enterDocument()` Setup all events and do an initial resize.
| `finishSetup_()` Parent the passed in components to the split containers. Call their createDom methods if necessary.
| `getFirstComponentSize() ⇒ ?number`
| `getOrientation() ⇒ ?goog.ui.SplitPane.Orientation` Gets the orientation of the split pane.
| `getRelativeLeft_(number left) ⇒ number` Find the location relative to the splitpane.
| `getRelativeTop_(number top) ⇒ number` Find the location relative to the splitpane.
| `handleDoubleClick_(?goog.events.Event e)` Handle the Double-click. Call the snapIt method which snaps the container to the top or left.
| `handleDragEnd_(?goog.events.Event e)` Handle the drag end event. If we're not doing continuous resize, resize the component. If we're doing continuous resize, the component is already the correct size.
| `handleDragStart_(?goog.events.Event e)` Handle the start drag event - set up the dragger.
| `handleDrag_(?goog.events.Event e)` Handle the drag event. Move the containers.
| `isVertical() ⇒ boolean` Returns whether the orientation for the split pane is vertical or not.
| `moveAndSize_(?Element element, ?goog.math.Rect rect)` Move and resize a container. The sizing changes the BorderBoxSize.
| `setContinuousResize(boolean continuous)` Sets whether we resize on handle drag.
| `setFirstComponentSize(?number= opt_size)` Set the size of the left/top component, and resize the other component based on that size and handle size.
| `setHandleSize(number size)` Sets the SplitPane handle size. TODO(user): Make sure this works after initialization.
| `setInitialSize(number size)` Sets the initial size of the left or top component.
| `setOrientation(?goog.ui.SplitPane.Orientation orientation)` Sets the orientation of the split pane.
| `setOrientationClassForHandle()` Sets the orientation class for the split pane handle.
| `setSize(?goog.math.Size size)` Set the size of the splitpane. This is usually called by the controlling application. This will set the SplitPane BorderBoxSize.
| `setUpHandle_()` Initializes the handle by assigning the correct height/width and adding the correct class as per the orientation.
| `snapIt_()` Snap the container to the left or top on a Double-click.