Package com.vaadin.ui
Interface SingleComponentContainer
-
- All Superinterfaces:
ClientConnector
,Component
,Connector
,HasComponents
,HasComponents.ComponentAttachDetachNotifier
,Iterable<Component>
,Serializable
,Sizeable
- All Known Implementing Classes:
AbstractSingleComponentContainer
,ColorPickerPopup
,LegacyWindow
,LoginForm
,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, seeComponentContainer
instead.- Since:
- 7.0
-
-
Nested Class Summary
-
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.ui.Component
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
-
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.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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getComponentCount()
Gets the number of children thisSingleComponentContainer
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.server.ClientConnector
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
-
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, readDesign, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible, writeDesign
-
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
-
Methods inherited from interface com.vaadin.ui.HasComponents
iterator
-
Methods inherited from interface com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier
addComponentAttachListener, addComponentDetachListener, removeComponentAttachListener, removeComponentDetachListener
-
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined
-
-
-
-
Method Detail
-
getComponentCount
int getComponentCount()
Gets the number of children thisSingleComponentContainer
has. This must be symmetric with whatHasComponents.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.
-
-