com.vaadin.client.ui
Class AbstractHasComponentsConnector

java.lang.Object
  extended by com.vaadin.client.ui.AbstractConnector
      extended by com.vaadin.client.ui.AbstractComponentConnector
          extended by com.vaadin.client.ui.AbstractHasComponentsConnector
All Implemented Interfaces:
com.google.gwt.event.shared.EventHandler, StateChangeEvent.StateChangeHandler, ComponentConnector, ConnectorHierarchyChangeEvent.ConnectorHierarchyChangeHandler, HasComponentsConnector, ServerConnector, com.vaadin.shared.Connector, java.io.Serializable
Direct Known Subclasses:
AbstractComponentContainerConnector, AbstractSingleComponentContainerConnector, CustomComponentConnector, GridConnector, PopupViewConnector

public abstract class AbstractHasComponentsConnector
extends AbstractComponentConnector
implements HasComponentsConnector, ConnectorHierarchyChangeEvent.ConnectorHierarchyChangeHandler

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.vaadin.client.ui.AbstractComponentConnector
SIGNIFICANT_MOVE_THRESHOLD
 
Constructor Summary
AbstractHasComponentsConnector()
          Default constructor
 
Method Summary
 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.
 java.util.List<ComponentConnector> getChildComponents()
          Returns the child components for this connector.
 void setChildComponents(java.util.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, isReadOnly, isRealUpdate, isRelativeHeight, isRelativeWidth, isUndefinedHeight, isUndefinedWidth, 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, hasEventListener, init, isEnabled, registerRpc, removeStateChangeHandler, removeStateChangeHandler, setChildren, setParent, 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.HasComponentsConnector
updateCaption
 
Methods inherited from interface com.vaadin.client.ServerConnector
addStateChangeHandler, addStateChangeHandler, doInit, fireEvent, getChildren, getConnection, getParent, getRpcImplementations, getState, hasEventListener, isEnabled, onUnregister, removeStateChangeHandler, removeStateChangeHandler, setChildren, setParent, updateEnabledState
 
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
 
Methods inherited from interface com.vaadin.client.ConnectorHierarchyChangeEvent.ConnectorHierarchyChangeHandler
onConnectorHierarchyChange
 

Constructor Detail

AbstractHasComponentsConnector

public AbstractHasComponentsConnector()
Default constructor

Method Detail

getChildComponents

public java.util.List<ComponentConnector> getChildComponents()
Description copied from interface: HasComponentsConnector
Returns the child components for this connector.

The children for this connector are defined as all HasComponentss whose parent is this HasComponentsConnector.

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 interface HasComponentsConnector
Returns:
A collection of child components for this connector. An empty collection if there are no children. Never returns null.

setChildComponents

public void setChildComponents(java.util.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 implements HasComponentsConnector.

Specified by:
setChildComponents in interface HasComponentsConnector
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 interface HasComponentsConnector
Parameters:
handler - The handler that should be added.
Returns:
A handler registration reference that can be used to unregister the handler


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.