de.kleopatra.forms.view.builder
Interface UIBuilder


public interface UIBuilder

Builder to fill a container according to a layout description.

Version:
$Revision: 1.2 $ $Date: 2004/09/30 10:18:21 $
Author:
(C) 2003 Jeanette Winzenburg, Berlin

Method Summary
 void fill(java.awt.Container comp, LayoutDescription layout, UIFactory uiFactory)
          fills a container with components according to the layoutDescription.
 void refill(java.awt.Container comp, LayoutDescription layout)
          fills a container with its own comps according to the layoutDescription.
 void replaceComponents(java.awt.Container container, LayoutDescription layout, java.util.Collection newChildren)
          fills a container with its own comps according to the layoutDescription, replacing those with names that match one contained in newChildren with the new.
 

Method Detail

fill

public void fill(java.awt.Container comp,
                 LayoutDescription layout,
                 UIFactory uiFactory)
fills a container with components according to the layoutDescription. Uses the uiFactory to create the children. Guarantees that the container will have the newly created children only.


refill

public void refill(java.awt.Container comp,
                   LayoutDescription layout)
fills a container with its own comps according to the layoutDescription.

To work correctly - all children of the container need to be named (interpreted as componentID) and match the id of the constraints in the description.


replaceComponents

public void replaceComponents(java.awt.Container container,
                              LayoutDescription layout,
                              java.util.Collection newChildren)
fills a container with its own comps according to the layoutDescription, replacing those with names that match one contained in newChildren with the new.

NOTE: as a side-effect only children/replacing components which have a corresponding constraint (that is one with the same id as comps) are (re-)inserted.

NOTE: this is experimental, mainly to ease client handling of placeholders as long as there is not yet any support for hierarchical forms.

Parameters:
container - - the container
layout - - the layoutDescription to use
newChildren - - collection of Children to replace


Copyright © 2003, 2004 SwingEmpire Jeanette Winzenburg. All Rights Reserved.