public class CellButtonBase<C> extends CellComponent<C> implements HasIcon, BeforeSelectEvent.HasBeforeSelectHandlers, SelectEvent.HasSelectHandlers, ArrowSelectEvent.HasArrowSelectHandlers
valueUpdater
adjustSize, allowTextSelection, cacheSizes, disableContextMenu, disabled, disabledStyle, ensureVisibilityOnSizing, height, hidden, lastSize, layer, left, mask, maskMessage, monitorWindowResize, pageX, pageY, resizeHandler, shim, tabIndex, toolTip, toolTipConfig, top, width, windowResizeDelay, windowResizeTask
Constructor and Description |
---|
CellButtonBase() |
CellButtonBase(ButtonCell<C> cell) |
CellButtonBase(ButtonCell<C> cell,
C initialValue) |
Modifier and Type | Method and Description |
---|---|
HandlerRegistration |
addArrowSelectHandler(ArrowSelectEvent.ArrowSelectHandler handler)
Adds a
ArrowSelectEvent.ArrowSelectHandler handler for ArrowSelectEvent
events. |
HandlerRegistration |
addBeforeSelectHandler(BeforeSelectEvent.BeforeSelectHandler handler)
Adds a
BeforeSelectEvent.BeforeSelectHandler handler for BeforeSelectEvent events. |
HandlerRegistration |
addSelectHandler(SelectEvent.SelectHandler handler)
Adds a
SelectEvent.SelectHandler handler for SelectEvent events. |
protected Context |
createContext()
Get the
Context for the cell. |
ButtonCell.ButtonArrowAlign |
getArrowAlign()
Returns the button's arrow alignment.
|
ButtonCell<C> |
getCell()
Get the
Cell wrapped by this widget. |
String |
getHTML() |
ImageResource |
getIcon()
Returns the icon.
|
ButtonCell.IconAlign |
getIconAlign()
Returns the button's icon alignment.
|
Menu |
getMenu()
Returns the button's menu (if it has one).
|
Style.AnchorAlignment |
getMenuAlign()
Returns the button's menu alignment.
|
int |
getMinWidth()
Returns the button's minimum width.
|
boolean |
getMouseEvents()
Returns false if mouse over effect is disabled.
|
ButtonCell.ButtonScale |
getScale()
Returns the button's scale.
|
String |
getText() |
void |
hideMenu()
Hide this button's menu (if it has one).
|
void |
onBrowserEvent(Event event) |
protected void |
onClick(Event event) |
protected void |
onRedraw() |
protected void |
onUnload() |
void |
setArrowAlign(ButtonCell.ButtonArrowAlign arrowAlign)
Sets the arrow alignment (defaults to RIGHT).
|
void |
setHTML(SafeHtml html) |
void |
setIcon(ImageResource icon)
Sets the icon.
|
void |
setIconAlign(ButtonCell.IconAlign iconAlign)
Sets the icon alignment (defaults to LEFT).
|
void |
setMenu(Menu menu)
Sets the button's menu.
|
void |
setMenuAlign(Style.AnchorAlignment menuAlign)
Sets the position to align the menu to, see
XElement.alignTo(Element, com.sencha.gxt.core.client.Style.AnchorAlignment, int, int) for
more details (defaults to 'tl-bl?', pre-render). |
void |
setMinWidth(int minWidth)
Sets he minimum width for this button (used to give a set of buttons a
common width)
|
void |
setMouseEvents(boolean handleMouseEvents)
False to disable visual cues on mouseover, mouseout and mousedown (defaults
to true).
|
void |
setScale(ButtonCell.ButtonScale scale)
Sets the button's scale.
|
void |
setTabIndex(int tabIndex)
Sets the component's tab index.
|
void |
setText(String text) |
void |
showMenu()
Show this button's menu (if it has one).
|
addValueChangeHandler, getElement, getFocusEl, getKey, getKeyProvider, getValue, onDisable, onEnable, onResize, redraw, redraw, setKeyProvider, setValue, setValue, setValue
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, getFocusSupport, getGestureRecognizer, getGestureRecognizerCount, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getPositionEl, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hide, hideShadow, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isMonitorWindowResize, isRendered, isStateful, isVisible, isVisible, mask, mask, notifyHide, notifyShow, onAfterFirstAttach, onAttach, onBlur, onDetach, onFocus, onHide, onHideContextMenu, onLoad, onPosition, onRightClick, onShow, onShowContextMenu, onTouch, onWindowResize, removeStyleDependentName, removeStyleOnOver, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setMonitorWindowResize, setPagePosition, setPixelSize, setPosition, setShadow, setShadowPosition, setSize, setStateful, setStateId, setStyleDependentName, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
public CellButtonBase()
public CellButtonBase(ButtonCell<C> cell)
public CellButtonBase(ButtonCell<C> cell, C initialValue)
public HandlerRegistration addArrowSelectHandler(ArrowSelectEvent.ArrowSelectHandler handler)
ArrowSelectEvent.HasArrowSelectHandlers
ArrowSelectEvent.ArrowSelectHandler
handler for ArrowSelectEvent
events.addArrowSelectHandler
in interface ArrowSelectEvent.HasArrowSelectHandlers
handler
- the handlerpublic HandlerRegistration addBeforeSelectHandler(BeforeSelectEvent.BeforeSelectHandler handler)
BeforeSelectEvent.HasBeforeSelectHandlers
BeforeSelectEvent.BeforeSelectHandler
handler for BeforeSelectEvent
events.addBeforeSelectHandler
in interface BeforeSelectEvent.HasBeforeSelectHandlers
handler
- the handlerpublic HandlerRegistration addSelectHandler(SelectEvent.SelectHandler handler)
SelectEvent.HasSelectHandlers
SelectEvent.SelectHandler
handler for SelectEvent
events.addSelectHandler
in interface SelectEvent.HasSelectHandlers
handler
- the handlerpublic ButtonCell.ButtonArrowAlign getArrowAlign()
public ButtonCell<C> getCell()
CellComponent
Cell
wrapped by this widget.getCell
in class CellComponent<C>
Cell
being wrappedpublic String getHTML()
public ImageResource getIcon()
HasIcon
public ButtonCell.IconAlign getIconAlign()
public Menu getMenu()
public Style.AnchorAlignment getMenuAlign()
public int getMinWidth()
public boolean getMouseEvents()
public ButtonCell.ButtonScale getScale()
public String getText()
public void hideMenu()
public void onBrowserEvent(Event event)
onBrowserEvent
in class CellComponent<C>
protected void onRedraw()
onRedraw
in class CellComponent<C>
public void setArrowAlign(ButtonCell.ButtonArrowAlign arrowAlign)
arrowAlign
- the arrow alignmentpublic void setHTML(SafeHtml html)
public void setIcon(ImageResource icon)
HasIcon
public void setIconAlign(ButtonCell.IconAlign iconAlign)
iconAlign
- the icon alignmentpublic void setMenu(Menu menu)
menu
- the menupublic void setMenuAlign(Style.AnchorAlignment menuAlign)
XElement.alignTo(Element, com.sencha.gxt.core.client.Style.AnchorAlignment, int, int)
for
more details (defaults to 'tl-bl?', pre-render).menuAlign
- the menu alignmentpublic void setMinWidth(int minWidth)
minWidth
- the minimum widthpublic void setMouseEvents(boolean handleMouseEvents)
handleMouseEvents
- false to disable mouse over changespublic void setScale(ButtonCell.ButtonScale scale)
scale
- the scalepublic void setTabIndex(int tabIndex)
Component
setTabIndex
in class Component
tabIndex
- the tab indexpublic void setText(String text)
public void showMenu()
protected Context createContext()
CellComponent
Context
for the cell.createContext
in class CellComponent<C>
protected void onClick(Event event)
Copyright © 2018. All rights reserved.