C
- the type that the Cell representspublic class CellComponent<C> extends Component
Component
that wraps a Cell
.
It is important to note that a single cell instance should not be used in a
single CellComponent
instance.
Subclasses should be aware that redraw()
calls are deferred before
the component is "rendered". The component is rendered when getElement is
called for the first time, typically, when the component is added to a panel
or container. To force a redraw use redraw(boolean)
.Modifier and Type | Field and Description |
---|---|
protected <any> |
valueUpdater
The
ValueUpdater used to trigger value update events. |
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
Modifier | Constructor and Description |
---|---|
protected |
CellComponent(<any> cell)
Construct a new
CellWidget with the specified cell and an initial
value of null . |
protected |
CellComponent(<any> cell,
<any> keyProvider)
Construct a new
CellWidget with the specified cell and key
provider, and an initial value of null . |
protected |
CellComponent(<any> cell,
C initialValue)
Construct a new
CellWidget with the specified cell and initial
value. |
protected |
CellComponent(<any> cell,
C initialValue,
<any> keyProvider)
Construct a new
CellWidget with the specified cell, initial value,
and key provider. |
protected |
CellComponent(<any> cell,
C initialValue,
<any> keyProvider,
boolean inlineBlock)
Creates a new cell component.
|
protected |
CellComponent(<any> cell,
C initialValue,
<any> keyProvider,
Element elem)
Creates a
CellWidget with the specified cell, initial value, key
provider, using the specified element as the wrapper around the cell. |
Modifier and Type | Method and Description |
---|---|
HandlerRegistration |
addValueChangeHandler(<any> handler) |
protected Context |
createContext()
Get the
Context for the cell. |
<any> |
getCell()
Get the
Cell wrapped by this widget. |
XElement |
getElement()
Gets a handle to the object's underlying DOM element.
|
protected XElement |
getFocusEl() |
protected Object |
getKey(C value)
Get the key for the specified value.
|
<any> |
getKeyProvider() |
C |
getValue() |
void |
onBrowserEvent(Event event) |
protected void |
onDisable() |
protected void |
onEnable() |
protected void |
onRedraw() |
protected void |
onResize(int width,
int height)
Called after the widget is resized, this method is empty by default but can be implemented by any subclass that
needs to perform custom logic after a resize occurs.
|
void |
redraw()
Redraw the widget.
|
protected boolean |
redraw(boolean force) |
protected void |
setKeyProvider(<any> keyProvider) |
void |
setValue(C value) |
void |
setValue(C value,
boolean fireEvents) |
void |
setValue(C value,
boolean fireEvents,
boolean redraw)
Sets this object's value and optionally redraw the widget.
|
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, onUnload, 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, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
protected final <any> valueUpdater
ValueUpdater
used to trigger value update events.protected CellComponent(<any> cell)
CellWidget
with the specified cell and an initial
value of null
.cell
- the cell to wrapprotected CellComponent(<any> cell, C initialValue)
CellWidget
with the specified cell and initial
value.cell
- the cell to wrapinitialValue
- the initial value of the Cellprotected CellComponent(<any> cell, C initialValue, <any> keyProvider)
CellWidget
with the specified cell, initial value,
and key provider.cell
- the cell to wrapinitialValue
- the initial value of the CellkeyProvider
- the key provider used to get keys from valuesprotected CellComponent(<any> cell, C initialValue, <any> keyProvider, boolean inlineBlock)
cell
- the cellinitialValue
- the initial valuekeyProvider
- the key providerinlineBlock
- true for inline blockprotected CellComponent(<any> cell, C initialValue, <any> keyProvider, Element elem)
CellWidget
with the specified cell, initial value, key
provider, using the specified element as the wrapper around the cell.cell
- the cell to wrapinitialValue
- the initial value of the CellkeyProvider
- the key provider used to get keys from valueselem
- the browser element to useprotected CellComponent(<any> cell, <any> keyProvider)
CellWidget
with the specified cell and key
provider, and an initial value of null
.cell
- the cell to wrapkeyProvider
- the key provider used to get keys from valuespublic HandlerRegistration addValueChangeHandler(<any> handler)
public <any> getCell()
Cell
wrapped by this widget.Cell
being wrappedpublic XElement getElement()
Component
#setElement(com.google.gwt.dom.client.Element)
.getElement
in class Component
public <any> getKeyProvider()
public C getValue()
public void onBrowserEvent(Event event)
onBrowserEvent
in class Component
public void redraw()
protected boolean redraw(boolean force)
protected void onRedraw()
public void setValue(C value)
This method will redraw the widget if the new value does not equal the existing value.
public void setValue(C value, boolean fireEvents)
This method will redraw the widget if the new value does not equal the existing value.
public void setValue(C value, boolean fireEvents, boolean redraw)
ValueChangeEvent
when
fireEvents is true and the new value does not equal the existing value.
Redraws the widget when redraw is true and the new value does not equal the
existing value.value
- the object's new valuefireEvents
- fire events if true and value is newredraw
- redraw the widget if true and value is newprotected Context createContext()
Context
for the cell.protected XElement getFocusEl()
getFocusEl
in class Component
protected Object getKey(C value)
value
- the valueprotected void onResize(int width, int height)
Component
protected void setKeyProvider(<any> keyProvider)
Copyright © 2018. All rights reserved.