Overview | Package | Class | Tree | Deprecated | Index | Help
| GWT 2.0.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.user.client.ui
Class SplitLayoutPanel

    java.lang.Object
      com.google.gwt.user.client.ui.UIObject
          com.google.gwt.user.client.ui.Widget
              com.google.gwt.user.client.ui.Panel
                  com.google.gwt.user.client.ui.ComplexPanel
                      com.google.gwt.user.client.ui.DockLayoutPanel
                          com.google.gwt.user.client.ui.SplitLayoutPanel

All Implemented Interfaces:
  HasHandlers, EventListener, AnimatedLayout, HasWidgets, IndexedPanel, ProvidesResize, RequiresResize, java.lang.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);
>       }
>     }

Nested Class Summary

Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.DockLayoutPanel
`DockLayoutPanel.Direction, DockLayoutPanel.LayoutData`

Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
`UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled`

Field Summary

Fields inherited from class com.google.gwt.user.client.ui.UIObject
`DEBUG_ID_PREFIX`

Constructor Summary
`SplitLayoutPanel()`

Method Summary
`void` | `insert(Widget child, DockLayoutPanel.Direction direction, double size, Widget before)` Adds a widget to the specified edge of the dock.
`boolean` | `remove(Widget child)` Removes a child widget.
`void` | `setWidgetMinSize(Widget child, int minSize)` Sets the minimum allowable size for the given widget.

Methods inherited from class com.google.gwt.user.client.ui.DockLayoutPanel
`add, addEast, addNorth, addSouth, addWest, animate, animate, forceLayout, getCenter, getUnit, getWidgetContainerElement, getWidgetDirection, insertEast, insertNorth, insertSouth, insertWest, onLoad, onResize, onUnload`

Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
`add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, insert, insert, iterator, remove`

Methods inherited from class com.google.gwt.user.client.ui.Panel
`adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan`

Methods inherited from class com.google.gwt.user.client.ui.Widget
`addDomHandler, addHandler, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents`

Methods inherited from class com.google.gwt.user.client.ui.UIObject
`addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SplitLayoutPanel

    public SplitLayoutPanel()

Method Detail

### insert

    public void insert(Widget child,
                       DockLayoutPanel.Direction direction,
                       double size,
                       Widget before)

  Description copied from class: `DockLayoutPanel`
  Adds a widget to the specified edge of the dock. If the widget is already a child of this panel, this method behaves as though `DockLayoutPanel.remove(Widget)` had already been called.

  Overrides:
    `insert` in class `DockLayoutPanel`
  Parameters:
    `child` - the widget to be added
    `direction` - the widget's direction in the dock
    `before` - the widget before which to insert the new child, or `null` to append

### remove

    public boolean remove(Widget child)

  Description copied from class: `Panel`
  Removes a child widget.

  How to Override this Method

  There are several important things that must take place in the correct order to properly remove a Widget from a Panel. Not all of these steps will be relevant to every Panel, but all of the steps must be considered.

  1. Validate: Make sure this Panel is actually the parent of the child Widget; return `false` if it is not.
  2. Orphan: Call `Panel.orphan(Widget)` first while the child Widget is still attached.
  3. Physical Detach: Adjust the DOM to account for the removal of the child Widget. The Widget's Element must be physically removed from the DOM.
  4. Logical Detach: Update the Panel's state variables to reflect the removal of the child Widget. Example: the Widget is removed from the Panel's `WidgetCollection`.

  Specified by:
    `remove` in interface `HasWidgets`
  Overrides:
    `remove` in class `DockLayoutPanel`
  Parameters:
    `child` - the widget to be removed
  Returns:
    `true` if the child was present

### setWidgetMinSize

    public void setWidgetMinSize(Widget child,
                                 int minSize)

  Sets the minimum allowable size for the given widget.

  Its assocated splitter cannot be dragged to a position that would make it smaller than this size. This method has no effect for the `DockLayoutPanel.Direction.CENTER` widget.

  Parameters:
    `child` - the child whose minimum size will be set
    `minSize` - the minimum size for this widget

Overview | Package | Class | Tree | Deprecated | Index | Help
| GWT 2.0.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD