Package cn.mapway.ui.client.widget
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.LayoutDataNested 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.DebugIdImplEnabledNested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidgetNested 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
ConstructorsConstructorDescriptionConstruct a newSplitLayoutPanelwith the default splitter size of 8px.MySplitLayoutPanel(int splitterSize) Construct a newSplitLayoutPanelwith the specified splitter size in pixels. -
Method Summary
Modifier and TypeMethodDescriptionintReturn the size of the splitter in pixels.voidinsert(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) booleanremove(com.google.gwt.user.client.ui.Widget child) voidsetWidgetHidden(com.google.gwt.user.client.ui.Widget widget, boolean hidden) voidsetWidgetMinSize(com.google.gwt.user.client.ui.Widget child, int minSize) Sets the minimum allowable size for the given widget.voidsetWidgetSnapClosedSize(com.google.gwt.user.client.ui.Widget child, int snapClosedSize) Sets a size below which the slider will close completely.voidsetWidgetToggleDisplayAllowed(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, setWidgetSizeMethods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, removeMethods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeMethods 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, unsinkEventsMethods 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
MySplitLayoutPanel
public MySplitLayoutPanel()Construct a newSplitLayoutPanelwith the default splitter size of 8px. -
MySplitLayoutPanel
@UiConstructor public MySplitLayoutPanel(int splitterSize) Construct a newSplitLayoutPanelwith 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:
insertin classcom.google.gwt.user.client.ui.DockLayoutPanel
-
remove
public boolean remove(com.google.gwt.user.client.ui.Widget child) - Specified by:
removein interfacecom.google.gwt.user.client.ui.HasWidgets- Overrides:
removein classcom.google.gwt.user.client.ui.DockLayoutPanel
-
setWidgetHidden
public void setWidgetHidden(com.google.gwt.user.client.ui.Widget widget, boolean hidden) - Overrides:
setWidgetHiddenin classcom.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.CENTERwidget.- Parameters:
child- the child whose minimum size will be setminSize- 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 withsetWidgetMinSize(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.CENTERwidget.- Parameters:
child- the child whose slider should snap closedsnapClosedSize- 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
-