public class SplitBar extends Component implements HasClickHandlers, HasDoubleClickHandlers, SplitBarDragEvent.HasSplitBarDragHandlers, SelectEvent.HasSelectHandlers
Modifier and Type | Class and Description |
---|---|
static interface |
SplitBar.SplitBarAppearance |
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
DEBUG_ID_PREFIX
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) |
void |
release()
Removes the split bar from the resize widget.
|
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, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleOnOver, clearSizeCache, disable, disableEvents, enable, enableEvents, fireEvent, focus, getData, getElement, getFocusSupport, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hide, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isRendered, isStateful, isVisible, isVisible, mask, mask, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setPagePosition, setPixelSize, setPosition, setShadow, setShadowPosition, setSize, setStateful, setStateId, setTabIndex, setToolTip, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
fireEvent
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)
addClickHandler
in interface HasClickHandlers
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler)
addDoubleClickHandler
in interface HasDoubleClickHandlers
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 interface EventListener
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 directionCopyright © 2015. All rights reserved.