Class WorkbenchSplitLayoutPanel
- 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
-
- org.uberfire.client.workbench.widgets.split.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.DockLayoutPanelA panel that adds user-positioned splitters between each of its child widgets.This is a fork of the standard SplitLayoutPanel with the following changes:-
- 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 inStyle.Unit.PXunits, 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
-
-
Constructor Summary
Constructors Constructor Description WorkbenchSplitLayoutPanel()Construct a newSplitLayoutPanelwith the default splitter size of 8px.WorkbenchSplitLayoutPanel(int splitterSize)Construct a newSplitLayoutPanelwith the specified splitter size in pixels.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(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.voidadd(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.intgetSplitterSize()Return 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)voidsetWidgetMinSize(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
-
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 Detail
-
WorkbenchSplitLayoutPanel
public WorkbenchSplitLayoutPanel()
Construct a newSplitLayoutPanelwith the default splitter size of 8px.
-
WorkbenchSplitLayoutPanel
public WorkbenchSplitLayoutPanel(int splitterSize)
Construct a newSplitLayoutPanelwith 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:
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
-
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
-
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 addposition- 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 addposition- 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
-
-