com.vaadin.client.ui.
Class AbstractHasComponentsConnector
- java.lang.Object
-
- com.vaadin.client.ui.AbstractConnector
-
- com.vaadin.client.ui.AbstractComponentConnector
-
- com.vaadin.client.ui.AbstractHasComponentsConnector
-
All Implemented Interfaces:
com.google.gwt.event.shared.EventHandler
,StateChangeEvent.StateChangeHandler
,ComponentConnector
,ConnectorHierarchyChangeEvent.ConnectorHierarchyChangeHandler
,HasComponentsConnector
,HasWidget
,ServerConnector
,HasErrorIndicator
,Connector
,Serializable
Direct Known Subclasses:
AbstractComponentContainerConnector
,AbstractSingleComponentContainerConnector
,CompositeConnector
,CustomComponentConnector
,PopupViewConnector
public abstract class AbstractHasComponentsConnector extends AbstractComponentConnector implements HasComponentsConnector, ConnectorHierarchyChangeEvent.ConnectorHierarchyChangeHandler
Base class for component connectors whose widget is a component container.
Author:
Vaadin Ltd
See Also:
-
-
Field Summary
-
Fields inherited from class com.vaadin.client.ui.AbstractComponentConnector
SIGNIFICANT_MOVE_THRESHOLD
-
-
Constructor Summary
Constructors Constructor Description AbstractHasComponentsConnector()
Default constructor.
-
Method Summary
All Methods Modifier and Type Method Description com.google.gwt.event.shared.HandlerRegistration
addConnectorHierarchyChangeHandler(ConnectorHierarchyChangeEvent.ConnectorHierarchyChangeHandler handler)
Adds a handler that is called whenever the child hierarchy of this connector has been updated by the server.
List<ComponentConnector>
getChildComponents()
Returns the child components for this connector.
void
setChildComponents(List<ComponentConnector> childComponents)
Sets the children for this connector.
-
Methods inherited from class com.vaadin.client.ui.AbstractComponentConnector
createWidget, delegateCaptionHandling, flush, getIcon, getIconUri, getLayoutManager, getState, 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, updateWidgetStyleNames
-
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.shared.Connector
getConnectorId
-
Methods inherited from interface com.vaadin.client.ConnectorHierarchyChangeEvent.ConnectorHierarchyChangeHandler
onConnectorHierarchyChange
-
Methods inherited from interface com.vaadin.client.HasComponentsConnector
updateCaption
-
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
-
getChildComponents
public List<ComponentConnector> getChildComponents()
Description copied from interface:
HasComponentsConnector
Returns the child components for this connector.
The children for this connector are defined as all
HasComponents
s whose parent is thisHasComponentsConnector
.Note that the method
ServerConnector.getChildren()
can return a larger list of children including both the child components and any extensions registered for the connector.Specified by:
getChildComponents
in interfaceHasComponentsConnector
Returns:
A collection of child components for this connector. An empty collection if there are no children. Never returns null.
-
setChildComponents
public void setChildComponents(List<ComponentConnector> childComponents)
Description copied from interface:
HasComponentsConnector
Sets the children for this connector. This method should only be called by the framework to ensure that the connector hierarchy on the client side and the server side are in sync.
Note that calling this method does not call
ConnectorHierarchyChangeEvent.ConnectorHierarchyChangeHandler.onConnectorHierarchyChange(ConnectorHierarchyChangeEvent)
. The event method is called only when the hierarchy has been updated for all connectors.Note that this method is separate from
ServerConnector.setChildren(List)
and contains only child components. Both methods are called separately by the framework if the connector implementsHasComponentsConnector
.Specified by:
setChildComponents
in interfaceHasComponentsConnector
Parameters:
childComponents
- The new child connectors (components only)
-
addConnectorHierarchyChangeHandler
public com.google.gwt.event.shared.HandlerRegistration addConnectorHierarchyChangeHandler(ConnectorHierarchyChangeEvent.ConnectorHierarchyChangeHandler handler)
Description copied from interface:
HasComponentsConnector
Adds a handler that is called whenever the child hierarchy of this connector has been updated by the server.
Specified by:
addConnectorHierarchyChangeHandler
in interfaceHasComponentsConnector
Parameters:
handler
- The handler that should be added.Returns:
A handler registration reference that can be used to unregister the handler
-
-