public class SplitBar extends Component implements SplitBarDragEvent.HasSplitBarDragHandlers, SelectEvent.HasSelectHandlers
Modifier and Type | Class and Description |
---|---|
protected class |
SplitBar.Handler |
static interface |
SplitBar.SplitBarAppearance |
Modifier and Type | Field and Description |
---|---|
protected SplitBar.SplitBarAppearance |
appearance |
protected boolean |
autoSize |
protected int |
barWidth |
protected boolean |
collapsible |
protected Component |
containerWidget |
protected DelayedTask |
delay |
protected boolean |
disableDragging |
protected Draggable |
draggable |
protected GroupingHandlerRegistration |
handlerRegistration |
protected int |
handleWidth |
protected int |
maxSize |
protected XElement |
miniEl |
protected int |
minSize |
protected Style.LayoutRegion |
region |
protected XElement |
resizeEl |
protected Component |
resizeWidget |
protected Rectangle |
startBounds |
protected int |
xOffset |
protected int |
yOffset |
adjustSize, allowTextSelection, cacheSizes, contextMenu, contextMenuGestureRecognizer, dataMap, deferHeight, disableContextMenu, disabled, disabledStyle, disableEvents, ensureVisibilityOnSizing, focusManagerSupport, gestureRecognizers, height, hidden, hideMode, itemId, lastSize, layer, left, mask, maskMessage, monitorWindowResize, overElements, pageX, pageY, resizeHandler, shadow, shadowPosition, shim, stateful, stateId, tabIndex, toolTip, toolTipConfig, top, width, windowResizeDelay, windowResizeTask
Constructor and Description |
---|
SplitBar(SplitBar.SplitBarAppearance appearance,
Style.LayoutRegion region,
Component resizeWidget)
Creates a new split bar with the specified appearance
|
SplitBar(Style.LayoutRegion region,
Component target)
Creates a split for bar for the specified layout region and target.
|
SplitBar(Style.LayoutRegion style,
Component resizeWidget,
Component container)
Creates a new split bar.
|
Modifier and Type | Method and Description |
---|---|
HandlerRegistration |
addClickHandler(ClickHandler handler) |
HandlerRegistration |
addDoubleClickHandler(DoubleClickHandler handler) |
HandlerRegistration |
addSelectHandler(SelectEvent.SelectHandler handler)
Adds a
SelectEvent.SelectHandler handler for SelectEvent events. |
HandlerRegistration |
addSplitBarDragHandler(SplitBarDragEvent.SplitBarDragHandler handler)
Adds a
SplitBarDragEvent.SplitBarDragHandler handler for
SplitBarDragEvent events. |
void |
disableDragging()
Prevents the split bar from being dragged.
|
SplitBar.SplitBarAppearance |
getAppearance()
Returns the split bar appearance.
|
int |
getBarWidth()
Returns the bar width.
|
Component |
getContainer()
Returns the container widget.
|
Draggable |
getDraggable()
Returns the split bar's draggable instance.
|
int |
getHandleWidth()
Returns the handle width.
|
int |
getMaxSize()
Returns the maximum size.
|
int |
getMinSize() |
Component |
getTargetWidget()
Returns the resize widget.
|
int |
getXOffset()
Returns the x offset.
|
int |
getYOffset()
Returns the y offset.
|
boolean |
isAutoSize()
Returns the auto size state.
|
boolean |
isCollapsible()
Return true if the mini-collapse tool is enabled.
|
void |
onBrowserEvent(Event event) |
protected void |
onCancelDrag(DragCancelEvent be) |
protected void |
onClick(Event event) |
protected void |
onEndDrag(DragEndEvent bee) |
protected void |
onHandleAttach() |
protected void |
onHandleDetach() |
protected void |
onHandleHide(HideEvent event) |
protected void |
onHandleShow(ShowEvent event) |
protected void |
onMiniClick() |
protected void |
onMouseOut(Event event) |
protected void |
onMouseOver(Event event) |
protected void |
onStartDrag(DragStartEvent de) |
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 |
setCollapsible(boolean collapsible)
True to show a mini-collapse tool in the split bar (defaults to false).
|
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 x)
The amount of pixels the bar should be offset to the left (defaults to 0).
|
void |
setYOffset(int y)
Sets the amount of pixels the bar should be offset to the top (defaults to 0).
|
void |
sync()
Updates the spitbar's bounds to match the target widget.
|
void |
updateMini(Style.Direction direction)
Sets the visual style indicating the direction of the mini collapse tool.
|
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addGestureRecognizer, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleDependentName, addStyleOnOver, adjustPosition, adjustSize, applyState, assertAfterRender, assertPreRender, blur, clearSizeCache, disable, disableContextMenu, disableEvents, enable, enableEvents, fireCancellableEvent, fireEvent, focus, getData, getElement, getFocusEl, getFocusSupport, getGestureRecognizer, getGestureRecognizerCount, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getPositionEl, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hide, hideShadow, hideToolTip, isAdjustSize, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isMonitorWindowResize, isRendered, isStateful, isVisible, isVisible, makeVisible, mask, mask, notifyHide, notifyShow, onAfterFirstAttach, onAttach, onBlur, onDetach, onDisable, onEnable, onFocus, onHide, onHideContextMenu, onLoad, onPosition, onResize, onRightClick, onShow, onShowContextMenu, onTouch, onUnload, onWindowResize, removeGestureRecognizer, removeStyleDependentName, removeStyleOnOver, removeToolTip, restoreVisible, setAdjustSize, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setMonitorWindowResize, setPagePosition, setPixelSize, setPosition, setShadow, setShadowPosition, setSize, setStateful, setStateId, setStyleDependentName, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
protected boolean autoSize
protected int yOffset
protected int xOffset
protected int minSize
protected int maxSize
protected int handleWidth
protected int barWidth
protected XElement resizeEl
protected XElement miniEl
protected Component resizeWidget
protected Component containerWidget
protected Draggable draggable
protected Rectangle startBounds
protected DelayedTask delay
protected Style.LayoutRegion region
protected GroupingHandlerRegistration handlerRegistration
protected boolean collapsible
protected final SplitBar.SplitBarAppearance appearance
protected boolean disableDragging
public SplitBar(Style.LayoutRegion region, Component target)
region
- the layout regiontarget
- the split bar containerpublic SplitBar(Style.LayoutRegion style, Component resizeWidget, Component container)
style
- the bar locationresizeWidget
- the widget being resizedcontainer
- the widget the split bar proxy will be sized topublic SplitBar(SplitBar.SplitBarAppearance appearance, Style.LayoutRegion region, Component resizeWidget)
appearance
- the split bar appearanceregion
- the bar locationresizeWidget
- the widget being resizedpublic HandlerRegistration addClickHandler(ClickHandler handler)
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler)
public HandlerRegistration addSelectHandler(SelectEvent.SelectHandler handler)
SelectEvent.HasSelectHandlers
SelectEvent.SelectHandler
handler for SelectEvent
events.addSelectHandler
in interface SelectEvent.HasSelectHandlers
handler
- the handlerpublic HandlerRegistration addSplitBarDragHandler(SplitBarDragEvent.SplitBarDragHandler handler)
SplitBarDragEvent.HasSplitBarDragHandlers
SplitBarDragEvent.SplitBarDragHandler
handler for
SplitBarDragEvent
events.addSplitBarDragHandler
in interface SplitBarDragEvent.HasSplitBarDragHandlers
handler
- the handlerpublic void disableDragging()
public SplitBar.SplitBarAppearance getAppearance()
public int getBarWidth()
public Component getContainer()
public Draggable getDraggable()
public int getHandleWidth()
public int getMaxSize()
public int getMinSize()
public Component getTargetWidget()
public int getXOffset()
public int getYOffset()
public boolean isAutoSize()
public boolean isCollapsible()
public void onBrowserEvent(Event event)
onBrowserEvent
in class Component
public void release()
public void setAutoSize(boolean autoSize)
autoSize
- the auto size statepublic void setBarWidth(int barWidth)
barWidth
- the bar widthpublic void setCollapsible(boolean collapsible)
collapsible
- true to add the mini-collapse toolpublic void setHandleWidth(int handleWidth)
handleWidth
- the handle widthpublic void setMaxSize(int maxSize)
maxSize
- the maximum sizepublic void setMinSize(int minSize)
minSize
- the minimum sizepublic void setXOffset(int x)
x
- the xOffset to setpublic void setYOffset(int y)
y
- the yOffset to setpublic void sync()
public void updateMini(Style.Direction direction)
direction
- the collapse directionprotected void onClick(Event event)
protected void onHandleAttach()
protected void onHandleDetach()
protected void onHandleHide(HideEvent event)
protected void onHandleShow(ShowEvent event)
protected void onMiniClick()
protected void onMouseOut(Event event)
protected void onMouseOver(Event event)
protected void removeSplitBar()
protected void onCancelDrag(DragCancelEvent be)
protected void onEndDrag(DragEndEvent bee)
protected void onStartDrag(DragStartEvent de)
Copyright © 2020. All rights reserved.