Class WorkbenchSplitLayoutPanel

  • All Implemented Interfaces:
    com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.AnimatedLayout, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IndexedPanel, com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, com.google.gwt.user.client.ui.ProvidesResize, com.google.gwt.user.client.ui.RequiresResize, Iterable<com.google.gwt.user.client.ui.Widget>

    public class WorkbenchSplitLayoutPanel
    extends com.google.gwt.user.client.ui.DockLayoutPanel
    A panel that adds user-positioned splitters between each of its child widgets.

    This is a fork of the standard SplitLayoutPanel with the following changes:-

    1. http://code.google.com/p/google-web-toolkit/issues/detail?id=7135

    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

    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.DockLayoutPanel

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

        com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
      • Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets

        com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
      • Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel

        com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
    • Field Summary

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

        DEBUG_ID_PREFIX
    • Constructor Summary

      Constructors 
      Constructor Description
      WorkbenchSplitLayoutPanel()
      Construct a new SplitLayoutPanel with the default splitter size of 8px.
      WorkbenchSplitLayoutPanel​(int splitterSize)
      Construct a new SplitLayoutPanel with the specified splitter size in pixels.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(com.google.gwt.user.client.ui.Widget child, org.uberfire.workbench.model.CompassPosition position, double size)
      Adds the given widget as a child of this splitter.
      void add​(com.google.gwt.user.client.ui.Widget child, org.uberfire.workbench.model.CompassPosition position, int size)
      Adds the given widget as a child of this splitter.
      int getSplitterSize()
      Return the size of the splitter in pixels.
      void insert​(com.google.gwt.user.client.ui.Widget child, com.google.gwt.user.client.ui.DockLayoutPanel.Direction direction, double size, com.google.gwt.user.client.ui.Widget before)  
      boolean remove​(com.google.gwt.user.client.ui.Widget child)  
      void setWidgetMinSize​(com.google.gwt.user.client.ui.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, addEast, addLineEnd, addLineStart, addNorth, addNorth, addSouth, addSouth, addWest, addWest, animate, animate, forceLayout, getCenter, getCenterHeight, getCenterWidth, getResolvedDirection, getUnit, getWidgetContainerElement, getWidgetDirection, getWidgetSize, insertEast, insertLineEnd, insertLineStart, insertNorth, insertSouth, insertWest, onAttach, onDetach, onResize, setWidgetHidden, setWidgetSize
      • Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel

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

        add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
      • Methods inherited from class com.google.gwt.user.client.ui.Widget

        addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
      • 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, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
    • Constructor Detail

      • WorkbenchSplitLayoutPanel

        public WorkbenchSplitLayoutPanel()
        Construct a new SplitLayoutPanel with the default splitter size of 8px.
      • WorkbenchSplitLayoutPanel

        public WorkbenchSplitLayoutPanel​(int splitterSize)
        Construct a new SplitLayoutPanel with the specified splitter size in pixels.
        Parameters:
        splitterSize - the size of the splitter in pixels
    • Method Detail

      • getSplitterSize

        public int getSplitterSize()
        Return the size of the splitter in pixels.
        Returns:
        the splitter size
      • insert

        public void insert​(com.google.gwt.user.client.ui.Widget child,
                           com.google.gwt.user.client.ui.DockLayoutPanel.Direction direction,
                           double size,
                           com.google.gwt.user.client.ui.Widget before)
        Overrides:
        insert in class com.google.gwt.user.client.ui.DockLayoutPanel
      • remove

        public boolean remove​(com.google.gwt.user.client.ui.Widget child)
        Specified by:
        remove in interface com.google.gwt.user.client.ui.HasWidgets
        Overrides:
        remove in class com.google.gwt.user.client.ui.DockLayoutPanel
      • setWidgetMinSize

        public void setWidgetMinSize​(com.google.gwt.user.client.ui.Widget child,
                                     int minSize)
        Sets the minimum allowable size for the given widget.

        Its associated 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
      • add

        public void add​(com.google.gwt.user.client.ui.Widget child,
                        org.uberfire.workbench.model.CompassPosition position,
                        double size)
        Adds the given widget as a child of this splitter.
        Parameters:
        child - the widget to add
        position - the position to dock the widget at (must be an actual compass position NORTH, SOUTH, EAST, or WEST)
        size - the width or height to give the added child.
      • add

        public void add​(com.google.gwt.user.client.ui.Widget child,
                        org.uberfire.workbench.model.CompassPosition position,
                        int size)
        Adds the given widget as a child of this splitter.
        Parameters:
        child - the widget to add
        position - the position to dock the widget at (must be an actual compass position NORTH, SOUTH, EAST, or WEST)
        size - the width or height to give the added child