com.vaadin.terminal.gwt.client.


Interface Container

All Superinterfaces:

Paintable

All Known Implementing Classes:

CellBasedLayout, VAbsoluteLayout, VAccordion, VCssLayout, VCustomComponent, VCustomLayout, VDragAndDropWrapper, VDragAndDropWrapperIE, VForm, VFormLayout, VGridLayout, VHorizontalLayout, VOrderedLayout, VPanel, VPopupView, VScrollTable.VScrollTableBody.VScrollTableGeneratedRow, VScrollTable.VScrollTableBody.VScrollTableRow, VSplitPanel, VSplitPanelHorizontal, VSplitPanelVertical, VTabsheet, VVerticalLayout, VView, VWindow

public interface Container
extends Paintable

Method Summary
 RenderSpace getAllocatedSpace(com.google.gwt.user.client.ui.Widget child)
          Returns the size currently allocated for the child component.
 boolean hasChildComponent(com.google.gwt.user.client.ui.Widget component)
          Is a given component child of this layout.
 void replaceChildComponent(com.google.gwt.user.client.ui.Widget oldComponent, com.google.gwt.user.client.ui.Widget newComponent)
          Replace child of this layout with another component.
 boolean requestLayout(Set<Paintable> children)
          Called when a child components size has been updated in the rendering phase.
 void updateCaption(Paintable component, UIDL uidl)
          Update child components caption, description and error message.
 
Methods inherited from interface com.vaadin.terminal.gwt.client.Paintable
updateFromUIDL
 

Method Detail

replaceChildComponent

void replaceChildComponent(com.google.gwt.user.client.ui.Widget oldComponent,
                           com.google.gwt.user.client.ui.Widget newComponent)

Replace child of this layout with another component. Each layout must be able to switch children. To to this, one must just give references to a current and new child.

Parameters:
oldComponent - Child to be replaced
newComponent - Child that replaces the oldComponent

hasChildComponent

boolean hasChildComponent(com.google.gwt.user.client.ui.Widget component)

Is a given component child of this layout.

Parameters:
component - Component to test.
Returns:
true iff component is a child of this layout.

updateCaption

void updateCaption(Paintable component,
                   UIDL uidl)

Update child components caption, description and error message.

Each component is responsible for maintaining its caption, description and error message. In most cases components doesn't want to do that and those elements reside outside of the component. Because of this layouts must provide service for it's childen to show those elements for them.

Parameters:
component - Child component for which service is requested.
uidl - UIDL of the child component.

requestLayout

boolean requestLayout(Set<Paintable> children)

Called when a child components size has been updated in the rendering phase.

Parameters:
children - Set of child widgets whose size have changed
Returns:
true if the size of the Container remains the same, false if the event need to be propagated to the Containers parent

getAllocatedSpace

RenderSpace getAllocatedSpace(com.google.gwt.user.client.ui.Widget child)

Returns the size currently allocated for the child component.

Parameters:
child -
Returns: