public class ToggleButtonCell extends ButtonCell<Boolean>
ButtonCell.ButtonArrowAlign, ButtonCell.ButtonCellAppearance<C>, ButtonCell.ButtonScale, ButtonCell.IconAlign
Modifier and Type | Field and Description |
---|---|
protected boolean |
allowDepress |
html, icon, menu
height, width
Constructor and Description |
---|
ToggleButtonCell()
Creates a toggle button cell with default appearance.
|
ToggleButtonCell(ButtonCell.ButtonCellAppearance<Boolean> appearance)
Creates a toggle button cell with the specified appearance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isAllowDepress()
Returns the allow depress state.
|
protected void |
onClick(Context context,
XElement p,
Boolean value,
NativeEvent event,
<any> valueUpdater) |
protected void |
onMouseDown(XElement parent,
NativeEvent event) |
void |
setAllowDepress(boolean allowDepress)
True to allow a toggle item to be depressed (defaults to true).
|
addArrowSelectHandler, addBeforeSelectHandler, addSelectHandler, addTapGestureHandler, disable, enable, getAppearance, getArrowAlign, getFocusElement, getHTML, getIcon, getIconAlign, getMenu, getMenuAlign, getMinWidth, getMouseEvents, getSafeHtml, getScale, getText, hideMenu, onBlur, onBrowserEvent, onFocus, onMouseOut, onMouseOver, onMouseUp, onNavigationKey, onTap, redrawOnResize, render, setArrowAlign, setHTML, setIcon, setIconAlign, setMenu, setMenuAlign, setMinWidth, setMouseEvents, setScale, setText, showMenu
getHeight, getWidth, setHeight, setSize, setSize, setWidth
addCellGestureAdapter, addHandler, createHandlerManager, fireCancellableEvent, fireCancellableEvent, fireEvent, fireEvent, getCellGestureAdapter, getCellGestureAdapterCount, isDisableEvents, onTouch, removeCellGestureAdapter, setDisableEvents
public ToggleButtonCell()
public ToggleButtonCell(ButtonCell.ButtonCellAppearance<Boolean> appearance)
appearance
- the appearance of the toggle button cell.public boolean isAllowDepress()
public void setAllowDepress(boolean allowDepress)
allowDepress
- true to allow depressingprotected void onClick(Context context, XElement p, Boolean value, NativeEvent event, <any> valueUpdater)
onClick
in class ButtonCell<Boolean>
protected void onMouseDown(XElement parent, NativeEvent event)
onMouseDown
in class ButtonCell<Boolean>
Copyright © 2018. All rights reserved.