com.vaadin.client.connectors.
Class AbstractListingConnector
- java.lang.Object
-
- com.vaadin.client.ui.AbstractConnector
-
- com.vaadin.client.ui.AbstractComponentConnector
-
- com.vaadin.client.ui.AbstractFieldConnector
-
- com.vaadin.client.connectors.AbstractListingConnector
-
All Implemented Interfaces:
com.google.gwt.event.shared.EventHandler
,StateChangeEvent.StateChangeHandler
,ComponentConnector
,HasDataSource
,HasWidget
,ServerConnector
,HasErrorIndicator
,HasRequiredIndicator
,Connector
,Serializable
Direct Known Subclasses:
AbstractFocusableListingConnector
,AbstractMultiSelectConnector
,ComboBoxConnector
,GridConnector
public abstract class AbstractListingConnector extends AbstractFieldConnector implements HasDataSource
A base connector class for
AbstractListing
.Since:
8.0
Author:
Vaadin Ltd.
See Also:
-
-
Field Summary
-
Fields inherited from class com.vaadin.client.ui.AbstractComponentConnector
SIGNIFICANT_MOVE_THRESHOLD
-
-
Constructor Summary
Constructors Constructor Description AbstractListingConnector()
-
Method Summary
All Methods Modifier and Type Method Description DataSource<elemental.json.JsonObject>
getDataSource()
Gets the current data source for this Connector.
protected static elemental.json.JsonValue
getRowData(elemental.json.JsonObject row)
Returns the data of the given data row.
protected static String
getRowKey(elemental.json.JsonObject row)
Returns the key of the given data row.
AbstractListingState
getState()
Returns the shared state object for this connector.
protected boolean
isRowSelected(elemental.json.JsonObject row)
Returns whether the given row is selected.
void
setDataSource(DataSource<elemental.json.JsonObject> dataSource)
Sets the data source for this Connector.
-
Methods inherited from class com.vaadin.client.ui.AbstractFieldConnector
isReadOnly, isRequiredIndicatorVisible, updateWidgetStyleNames
-
Methods inherited from class com.vaadin.client.ui.AbstractComponentConnector
createWidget, delegateCaptionHandling, flush, getIcon, getIconUri, getLayoutManager, getTooltipInfo, getWidget, hasTooltip, isErrorIndicatorVisible, isRealUpdate, isRelativeHeight, isRelativeWidth, isUndefinedHeight, isUndefinedWidth, onDragSourceAttached, onDragSourceDetached, onDropTargetAttached, onDropTargetDetached, onStateChanged, onUnregister, registerTouchHandlers, sendContextClickEvent, setWidgetEnabled, setWidgetStyleName, setWidgetStyleNameWithPrefix, shouldHandleLongTap, unregisterTouchHandlers, updateComponentSize, updateComponentSize, updateEnabledState, updateWidgetSize
-
Methods inherited from class com.vaadin.client.ui.AbstractConnector
addStateChangeHandler, addStateChangeHandler, createState, doInit, ensureHandlerManager, fireEvent, forceStateChange, getChildren, getConnection, getConnectorId, getParent, getResourceUrl, getRpcImplementations, getRpcProxy, getStateType, getTag, hasEventListener, init, isEnabled, registerRpc, removeStateChangeHandler, removeStateChangeHandler, setChildren, setParent, setTag, unregisterRpc
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.client.ComponentConnector
delegateCaptionHandling, flush, getLayoutManager, getTooltipInfo, hasTooltip, isRelativeHeight, isRelativeWidth, isUndefinedHeight, isUndefinedWidth, setWidgetEnabled
-
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
-
Methods inherited from interface com.vaadin.client.ServerConnector
addStateChangeHandler, addStateChangeHandler, doInit, fireEvent, getChildren, getConnection, getParent, getRpcImplementations, getTag, hasEventListener, isEnabled, onUnregister, removeStateChangeHandler, removeStateChangeHandler, setChildren, setParent, setTag, updateEnabledState
-
-
-
-
Method Detail
-
setDataSource
public void setDataSource(DataSource<elemental.json.JsonObject> dataSource)
Description copied from interface:
HasDataSource
Sets the data source for this Connector.
Specified by:
setDataSource
in interfaceHasDataSource
Parameters:
dataSource
- the new data source, not null
-
getDataSource
public DataSource<elemental.json.JsonObject> getDataSource()
Description copied from interface:
HasDataSource
Gets the current data source for this Connector.
Specified by:
getDataSource
in interfaceHasDataSource
Returns:
the data source, not null
-
getRowKey
protected static String getRowKey(elemental.json.JsonObject row)
Returns the key of the given data row.
Parameters:
row
- the rowReturns:
the row key
-
getRowData
protected static elemental.json.JsonValue getRowData(elemental.json.JsonObject row)
Returns the data of the given data row.
Parameters:
row
- the rowReturns:
the row data
-
isRowSelected
protected boolean isRowSelected(elemental.json.JsonObject row)
Returns whether the given row is selected.
Parameters:
row
- the rowReturns:
true
if the row is selected,false
otherwise
-
getState
public AbstractListingState getState()
Description copied from class:
AbstractConnector
Returns the shared state object for this connector. Override this method to define the shared state type for your connector.
Specified by:
getState
in interfaceComponentConnector
Specified by:
getState
in interfaceServerConnector
Overrides:
getState
in classAbstractFieldConnector
Returns:
the current shared state (never null)
-
-