G
- the type of gesture to create and manageT
- the type of data in the cell, so that it can be managed correctlypublic abstract class CellGestureAdapter<G extends GestureRecognizer,T> extends Object
Constructor and Description |
---|
CellGestureAdapter() |
Modifier and Type | Method and Description |
---|---|
protected abstract G |
createRecognizer()
Creates a new recognizer instance.
|
Context |
getContext(GestureRecognizer gestureRecognizer) |
G |
getGestureRecognizer(Context context)
Gets the gesture recognizer for the given context, if any exists
|
G |
getOrCreateGestureRecognizer(Context context,
Element parent,
T value,
<any> updater)
Gets a gesture recognizer for the given context, or creates it using the other provided arguments.
|
Element |
getParent(GestureRecognizer gestureRecognizer) |
T |
getValue(GestureRecognizer gestureRecognizer) |
<any> |
getValueUpdater(GestureRecognizer gestureRecognizer) |
void |
handle(Context context,
Element parent,
T value,
NativeEvent event,
<any> updater)
Indicates that a new event is occurring in the given rendered cell instance that should potentially should
be handled by a gesture recognizer.
|
void |
release(Context context)
Indicates that the gesture recognizer for the given cell context is no longer required, and can be
garbage collected.
|
void |
setDelegate(HasHandlers delegate) |
protected abstract G createRecognizer()
public void handle(Context context, Element parent, T value, NativeEvent event, <any> updater)
context
- the context of the cellparent
- the parent element of the rendered cellvalue
- the current value of the cellevent
- the event that occurredupdater
- a valueupdater to change the cell valuepublic G getOrCreateGestureRecognizer(Context context, Element parent, T value, <any> updater)
context
- the context of the cellparent
- the parent element of the rendered cellvalue
- the current value of the cellupdater
- a valueupdater to change the cell valuepublic G getGestureRecognizer(Context context)
context
- the context of the rendered cell instancenull
if non existspublic void release(Context context)
context
- the context of the cell that no longer needs this gesturepublic Element getParent(GestureRecognizer gestureRecognizer)
public Context getContext(GestureRecognizer gestureRecognizer)
public T getValue(GestureRecognizer gestureRecognizer)
public <any> getValueUpdater(GestureRecognizer gestureRecognizer)
public void setDelegate(HasHandlers delegate)
Copyright © 2018. All rights reserved.