Class MySplitLayoutPanel

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
cn.mapway.ui.client.widget.MySplitLayoutPanel
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 MySplitLayoutPanel extends com.google.gwt.user.client.ui.DockLayoutPanel
MySplitterLayoutPanel
Author:
zhangjianshe <zhangjianshe@gmail.com>
  • 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
    Construct a new SplitLayoutPanel with the default splitter size of 8px.
    MySplitLayoutPanel(int splitterSize)
    Construct a new SplitLayoutPanel with the specified splitter size in pixels.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    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
    setWidgetHidden(com.google.gwt.user.client.ui.Widget widget, boolean hidden)
     
    void
    setWidgetMinSize(com.google.gwt.user.client.ui.Widget child, int minSize)
    Sets the minimum allowable size for the given widget.
    void
    setWidgetSnapClosedSize(com.google.gwt.user.client.ui.Widget child, int snapClosedSize)
    Sets a size below which the slider will close completely.
    void
    setWidgetToggleDisplayAllowed(com.google.gwt.user.client.ui.Widget child, boolean allowed)
    Sets whether or not double-clicking on the splitter should toggle the display of the 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, 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Constructor Details

    • MySplitLayoutPanel

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

      @UiConstructor public MySplitLayoutPanel(int splitterSize)
      Construct a new SplitLayoutPanel with the specified splitter size in pixels.
      Parameters:
      splitterSize - the size of the splitter in pixels
  • Method Details

    • 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
    • setWidgetHidden

      public void setWidgetHidden(com.google.gwt.user.client.ui.Widget widget, boolean hidden)
      Overrides:
      setWidgetHidden 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
    • setWidgetSnapClosedSize

      public void setWidgetSnapClosedSize(com.google.gwt.user.client.ui.Widget child, int snapClosedSize)
      Sets a size below which the slider will close completely. This can be used in conjunction with setWidgetMinSize(com.google.gwt.user.client.ui.Widget, int) to provide a speed-bump effect where the slider will stick to a preferred minimum size before closing completely.

      This method has no effect for the DockLayoutPanel.Direction.CENTER widget.

      Parameters:
      child - the child whose slider should snap closed
      snapClosedSize - the width below which the widget will close or -1 to disable.
    • setWidgetToggleDisplayAllowed

      public void setWidgetToggleDisplayAllowed(com.google.gwt.user.client.ui.Widget child, boolean allowed)
      Sets whether or not double-clicking on the splitter should toggle the display of the widget.
      Parameters:
      child - the child whose display toggling will be allowed or not.
      allowed - whether or not display toggling is allowed for this widget