com.extjs.gxt.ui.client.widget
Class SplitBar

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.extjs.gxt.ui.client.widget.Component
              extended by com.extjs.gxt.ui.client.widget.BoxComponent
                  extended by com.extjs.gxt.ui.client.widget.SplitBar
All Implemented Interfaces:
Observable, 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.IsWidget

public class SplitBar
extends BoxComponent

Creates a draggable splitter on the side of a widget.

Events:
Resize : SplitBarEvent(splitBar, size)
Fires after the split bar has been moved.
DragStart : SplitBarEvent(splitBar, dragEvent)
Fires after a drag has started.
DragEnd : SplitBarEvent(splitBar, dragEvent)
Fires after a drag has ended.


Nested Class Summary
 
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
 
Field Summary
 
Fields inherited from class com.extjs.gxt.ui.client.widget.BoxComponent
adjustSize, cacheSizes, ensureVisibilityOnSizing, height, lastSize, layer, shim, width
 
Fields inherited from class com.extjs.gxt.ui.client.widget.Component
afterRender, attachables, baseStyle, disabled, disabledStyle, disableTextSelection, dummy, focusable, hidden, mask, maskMessage, maskMessageStyleName, monitorWindowResize, rendered, resizeHandler, setElementRender, stateId, swallowEvents, toolTip, windowResizeDelay, windowResizeTask
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
SplitBar(Style.LayoutRegion style, BoxComponent resizeWidget)
          Creates a new split bar.
SplitBar(Style.LayoutRegion style, BoxComponent resizeWidget, BoxComponent container)
          Creates a new split bar.
 
Method Summary
protected  ComponentEvent createComponentEvent(com.google.gwt.user.client.Event event)
           
 int getBarWidth()
          Returns the bar width.
 Draggable getDraggable()
          Returns the split bar's draggable instance.
 int getHandleWidth()
          Returns the handle width.
 int getMaxSize()
          Returns the maximum size.
 int getMinSize()
           
 Component getResizeWidget()
          Returns the resize widget.
 int getXOffset()
          Returns the x offset.
 int getYOffset()
          Returns the y offset.
 boolean isAutoSize()
          Returns the auto size state.
protected  void onRender(com.google.gwt.user.client.Element target, int index)
          Subclasses must override and ensure setElement is called for lazy rendered components.
 void release()
          Removes the split bar from the resize widget.
protected  void removeSplitBar()
           
 void setAutoSize(boolean autoSize)
          True to update the size of the the resize widget after a drag operation using a proxy (defaults to true).
 void setBarWidth(int barWidth)
          Sets the width of drag proxy during resizing (defaults to 2).
 void setHandleWidth(int handleWidth)
          Sets the width of the drag handles (defaults to 5).
 void setMaxSize(int maxSize)
          Sets the maximum size of the resize widget (defaults to 2000).
 void setMinSize(int minSize)
          Sets he minimum size of the resize widget (defaults to 10).
 void setXOffset(int xOffset)
          The amount of pixels the bar should be offset to the left (defaults to 0).
 void setYOffset(int yOffset)
          Sets the amount of pixels the bar should be offset to the top (defaults to 0).
 void sync()
           
 
Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent
adjustPosition, adjustSize, afterRender, getBounds, getHeight, getHeight, getPosition, getPositionEl, getResizeEl, getShadow, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, hideShadow, hideShim, hideUnders, isAutoHeight, isAutoWidth, isDeferHeight, isShim, onHide, onPosition, onResize, onShow, onUnload, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setSize, setWidth, setWidth, sync, syncSize
 
Methods inherited from class com.extjs.gxt.ui.client.widget.Component
addAttachable, addListener, addPlugin, addStyleName, addStyleOnOver, addWidgetListener, applyState, assertAfterRender, assertPreRender, beforeRender, blur, clearState, createObservable, createStyles, disable, disableContextMenu, disableEvents, disableTextSelection, doAttachChildren, doDetachChildren, el, enable, enableEvents, fireEvent, fireEvent, fireEvent, fly, focus, frame, getAriaSupport, getBaseStyle, getBorders, getContextMenu, getData, getElement, getFocusEl, getFocusSupport, getHideMode, getId, getItemId, getListeners, getModel, getObservable, getPlugins, getState, getStateId, getTabIndex, getTitle, getToolTip, getWindowResizeDelay, hasListeners, hasListeners, hide, hideToolTip, initState, isDisabledEvents, isDisableTextSelection, isEnabled, isMasked, isMonitorWindowResize, isRendered, isStateful, isVisible, isVisible, mask, mask, mask, notifyHide, notifyShow, onAttach, onBrowserEvent, onComponentEvent, onDetach, onDetachHelper, onDisable, onEnable, onEnsureDebugId, onHideContextMenu, onLoad, onRightClick, onShowContextMenu, onWindowResize, previewEvent, recalculate, removeAllListeners, removeAttachagle, removeFromParent, removeListener, removeStyleName, removeStyleOnOver, removeSwallow, removeToolTip, removeWidgetListener, render, render, repaint, saveState, setAriaRole, setAriaState, setAriaSupport, setBorders, setContextMenu, setData, setEl, setElement, setElement, setEnabled, setFiresEvents, setHideMode, setId, setIntStyleAttribute, setItemId, setModel, setMonitorWindowResize, setParent, setStateful, setStateId, setStyleAttribute, setStyleName, setTabIndex, setTitle, setToolTip, setToolTip, setVisible, setWindowResizeDelay, setZIndex, show, sinkEvents, swallowEvent, swallowEvent, toString, unframe, unmask
 
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, setLayoutData
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SplitBar

public SplitBar(Style.LayoutRegion style,
                BoxComponent resizeWidget)
Creates a new split bar.

Parameters:
style - the bar location
resizeWidget - the widget being resized

SplitBar

public SplitBar(Style.LayoutRegion style,
                BoxComponent resizeWidget,
                BoxComponent container)
Creates a new split bar.

Parameters:
style - the bar location
resizeWidget - the widget being resized
container - the widget the split bar proxy will be sized to
Method Detail

getBarWidth

public int getBarWidth()
Returns the bar width.

Returns:
the bar width

getDraggable

public Draggable getDraggable()
Returns the split bar's draggable instance.

Returns:
the draggable instance

getHandleWidth

public int getHandleWidth()
Returns the handle width.

Returns:
the handle width

getMaxSize

public int getMaxSize()
Returns the maximum size.

Returns:
the max size

getMinSize

public int getMinSize()
Returns:
the minSize

getResizeWidget

public Component getResizeWidget()
Returns the resize widget.

Returns:
the resize widget

getXOffset

public int getXOffset()
Returns the x offset.

Returns:
the xOffset the x offset value

getYOffset

public int getYOffset()
Returns the y offset.

Returns:
the y offset

isAutoSize

public boolean isAutoSize()
Returns the auto size state.

Returns:
true if auto size is enabled

release

public void release()
Removes the split bar from the resize widget.


setAutoSize

public void setAutoSize(boolean autoSize)
True to update the size of the the resize widget after a drag operation using a proxy (defaults to true).

Parameters:
autoSize - the auto size state

setBarWidth

public void setBarWidth(int barWidth)
Sets the width of drag proxy during resizing (defaults to 2).

Parameters:
barWidth - the bar width

setHandleWidth

public void setHandleWidth(int handleWidth)
Sets the width of the drag handles (defaults to 5).

Parameters:
handleWidth - the handle width

setMaxSize

public void setMaxSize(int maxSize)
Sets the maximum size of the resize widget (defaults to 2000).

Parameters:
maxSize - the maximum size

setMinSize

public void setMinSize(int minSize)
Sets he minimum size of the resize widget (defaults to 10).

Parameters:
minSize - the minimum size

setXOffset

public void setXOffset(int xOffset)
The amount of pixels the bar should be offset to the left (defaults to 0).

Parameters:
xOffset - the xOffset to set

setYOffset

public void setYOffset(int yOffset)
Sets the amount of pixels the bar should be offset to the top (defaults to 0).

Parameters:
yOffset - the yOffset to set

sync

public void sync()

createComponentEvent

protected ComponentEvent createComponentEvent(com.google.gwt.user.client.Event event)
Overrides:
createComponentEvent in class BoxComponent

onRender

protected void onRender(com.google.gwt.user.client.Element target,
                        int index)
Description copied from class: Component
Subclasses must override and ensure setElement is called for lazy rendered components.

Overrides:
onRender in class Component
Parameters:
target - the target element
index - the insert location

removeSplitBar

protected void removeSplitBar()