com.vaadin.ui
Interface SingleComponentContainer

All Superinterfaces:
ClientConnector, Component, Connector, HasComponents, HasComponents.ComponentAttachDetachNotifier, java.lang.Iterable<Component>, java.io.Serializable, Sizeable
All Known Implementing Classes:
AbstractSingleComponentContainer, ColorPickerPopup, LegacyWindow, Panel, UI, Window

public interface SingleComponentContainer
extends HasComponents, HasComponents.ComponentAttachDetachNotifier

Interface for component containers that have one child component and do not support adding or removing components. For component containers that support multiple children, see ComponentContainer instead.

Since:
7.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents
HasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.ComponentDetachListener
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
 
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
 
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
 int getComponentCount()
          Gets the number of children this SingleComponentContainer has.
 Component getContent()
          Gets the content of this container.
 void setContent(Component content)
          Sets the content of this container.
 
Methods inherited from interface com.vaadin.ui.HasComponents
iterator
 
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
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setParent
 
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
 
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setSizeFull, setSizeUndefined, setWidth, setWidth
 
Methods inherited from interface com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier
addComponentAttachListener, addComponentDetachListener, removeComponentAttachListener, removeComponentDetachListener
 

Method Detail

getComponentCount

int getComponentCount()
Gets the number of children this SingleComponentContainer has. This must be symmetric with what HasComponents.iterator() returns and thus typically return 1 if the content is set, 0 otherwise.

Returns:
The number of child components this container has.

getContent

Component getContent()
Gets the content of this container. The content is a component that serves as the outermost item of the visual contents.

Returns:
a component to use as content
See Also:
setContent(Component)

setContent

void setContent(Component content)
Sets the content of this container. The content is a component that serves as the outermost item of the visual contents. The content should always be set, either as a constructor parameter or by calling this method.



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