com.vaadin.ui
Interface HasComponents

All Superinterfaces:
ClientConnector, Component, com.vaadin.shared.Connector, java.lang.Iterable<Component>, RpcTarget, java.io.Serializable, Sizeable
All Known Subinterfaces:
ComponentContainer, Layout, SingleComponentContainer
All Known Implementing Classes:
AbsoluteLayout, AbstractComponentContainer, AbstractLayout, AbstractOrderedLayout, AbstractSingleComponentContainer, AbstractSplitPanel, Accordion, CssLayout, CustomComponent, CustomField, CustomLayout, DragAndDropWrapper, Form, FormLayout, GridLayout, HorizontalLayout, HorizontalSplitPanel, LegacyWindow, LoginForm, Navigator.EmptyView, Panel, PopupView, Table, TabSheet, TreeTable, UI, VerticalLayout, VerticalSplitPanel, Window

public interface HasComponents
extends Component, java.lang.Iterable<Component>

Interface that must be implemented by all Components that contain other Components.

Since:
7.0.0
Author:
Vaadin Ltd

Nested Class Summary
static interface HasComponents.ComponentAttachDetachNotifier
          Interface for HasComponents implementations that support sending attach and detach events for components.
static class HasComponents.ComponentAttachEvent
          Component attach event sent when a component is attached to container.
static interface HasComponents.ComponentAttachListener
          Component attach listener interface.
static class HasComponents.ComponentDetachEvent
          Component detach event sent when a component is detached from container.
static interface HasComponents.ComponentDetachListener
          Component detach listener interface.
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.ErrorListener, Component.Event, Component.Focusable, Component.Listener
 
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
Sizeable.Unit
 
Field Summary
 
Fields inherited from interface com.vaadin.server.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
 
Method Summary
 boolean isComponentVisible(Component childComponent)
          Checks if the child component is visible.
 java.util.Iterator<Component> iterator()
          Gets an iterator to the collection of contained components.
 
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setPrimaryStyleName, setReadOnly, setStyleName, setVisible
 
Methods inherited from interface com.vaadin.server.ClientConnector
beforeClientResponse, detach, encodeState, getExtensions, getStateType, handleConnectorRequest, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setParent
 
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
 
Methods inherited from interface com.vaadin.server.RpcTarget
getRpcManager
 
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setSizeFull, setSizeUndefined, setWidth, setWidth
 

Method Detail

iterator

java.util.Iterator<Component> iterator()
Gets an iterator to the collection of contained components. Using this iterator it is possible to step through all components contained in this container.

Specified by:
iterator in interface java.lang.Iterable<Component>
Returns:
the component iterator.

isComponentVisible

boolean isComponentVisible(Component childComponent)
Checks if the child component is visible. This method allows hiding a child component from updates and communication to and from the client. This is useful for components that show only a limited number of its children at any given time and want to allow updates only for the children that are visible (e.g. TabSheet has one tab open at a time).

Note that this will prevent updates from reaching the child even though the child itself is set to visible. Also if a child is set to invisible this will not force it to be visible.

Parameters:
childComponent - The child component to check
Returns:
true if the child component is visible to the user, false otherwise


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