T - The data-type of the cellW - The Widget to be wrapped by the DOMElement.E - The DOMElement type that this Factory generates.public abstract class BaseSingletonDOMElementFactory<T,W extends com.google.gwt.user.client.ui.Widget,E extends BaseDOMElement<T,W>> extends Object implements SingletonDOMElementFactory<W,E>
| Modifier and Type | Field and Description |
|---|---|
protected E |
e |
protected GridLayer |
gridLayer |
protected GridLienzoPanel |
gridPanel |
protected GridWidget |
gridWidget |
protected W |
widget |
| Constructor and Description |
|---|
BaseSingletonDOMElementFactory(GridLienzoPanel gridPanel,
GridLayer gridLayer,
GridWidget gridWidget) |
| Modifier and Type | Method and Description |
|---|---|
void |
attachDomElement(GridBodyCellRenderContext context,
Consumer<E> onCreation,
Consumer<E> onDisplay)
Initialises a DOMElement for a cell and attach it to the GWT container.
|
E |
createDomElement(GridLayer gridLayer,
GridWidget gridWidget)
Creates a DOMElement.
|
protected abstract E |
createDomElementInternal(W widget,
GridLayer gridLayer,
GridWidget gridWidget) |
protected KeyDownHandlerCommon |
destroyOrFlushKeyDownHandler() |
void |
destroyResources()
Destroys all additional resources created during initialisation.
|
void |
flush()
Flushes the content of a DOMElement to the underlying model.
|
protected abstract T |
getValue() |
void |
registerHandlers(W widget,
E widgetDomElement)
Register handlers for the widget.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateWidgetprotected final GridLienzoPanel gridPanel
protected final GridLayer gridLayer
protected final GridWidget gridWidget
protected W extends com.google.gwt.user.client.ui.Widget widget
protected E extends BaseDOMElement<T,W> e
public BaseSingletonDOMElementFactory(GridLienzoPanel gridPanel, GridLayer gridLayer, GridWidget gridWidget)
public void attachDomElement(GridBodyCellRenderContext context, Consumer<E> onCreation, Consumer<E> onDisplay)
DOMElementFactoryattachDomElement in interface DOMElementFactory<W extends com.google.gwt.user.client.ui.Widget,E extends BaseDOMElement<T,W>>context - The render context of the cell.onCreation - A callback that is invoked after the cell has been initialised, allowing content etc to be pre-setonDisplay - A callback that is invoked after the cell has been attached to the DOM and displayed.public E createDomElement(GridLayer gridLayer, GridWidget gridWidget)
DOMElementFactorycreateDomElement in interface DOMElementFactory<W extends com.google.gwt.user.client.ui.Widget,E extends BaseDOMElement<T,W>>gridLayer - The Lienzo layer on which the Grid Widget is attached. DOMElements may need to redraw the Layer when their state changes.gridWidget - The GridWidget to which this DOMElement is to be associated.public void registerHandlers(W widget, E widgetDomElement)
DOMElementFactoryregisterHandlers in interface DOMElementFactory<W extends com.google.gwt.user.client.ui.Widget,E extends BaseDOMElement<T,W>>public void destroyResources()
HasDOMElementResourcesdestroyResources in interface HasDOMElementResourcespublic void flush()
HasSingletonDOMElementResourceflush in interface HasSingletonDOMElementResourceprotected KeyDownHandlerCommon destroyOrFlushKeyDownHandler()
protected abstract T getValue()
protected abstract E createDomElementInternal(W widget, GridLayer gridLayer, GridWidget gridWidget)
Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.