de.kleopatra.forms.view.builder
Interface FormLoader

All Known Subinterfaces:
ExtFormLoader

public interface FormLoader

Responsibility to load a form from the classpath.

load means:

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

Method Summary
 void customizeActions(java.util.List actions, java.lang.String resourceName, java.lang.Class targetClass)
          customize a list of actions from a resource.
 java.awt.Container load(java.awt.Container container, java.lang.String resourceName, java.lang.Class targetClass)
          load the Container from classpath resource.
 java.awt.Container load(java.lang.String resourceName, java.lang.Class targetClass)
          create a container and load it from classpath resource.
 StyleMap loadStyleMap(java.lang.String resourceName, java.lang.Class clazz)
          load a StyleMap from a classpath resource.
 java.awt.Container loadTemplate(java.lang.String resourceName, java.lang.Class targetClass, java.util.Collection children)
          experimental: use the resource as template, use as children those in the collection instead of those defined in the resource.
 void rebuild(java.awt.Container container, java.lang.Class targetClass)
          re-arrange the direct children of a container from a resource defined by the container's name from a resource location relative to targetclass without customizing the contents.
 void rebuildAll(java.awt.Container container, java.lang.Class targetClass, boolean customize)
          re-arrange the direct children of the given container and the direct children of any placeholders from resources defined by their names from a resource location relative to targetClass.
 void replaceComponent(java.awt.Container container, java.lang.Class targetClass, java.awt.Component component)
          replace a child of container with newComponent using the layoutDescription of container - as given by the resource with the container's name.
 void replaceComponents(java.awt.Container container, java.lang.Class targetClass, java.util.Collection replacingComponents)
          replace a collection of children in container with a collection of new component using the layoutDescription of container - as given by the resource with the container's name.
 void setFormIO(FormIO formIO)
          set a custom formIO to use.
 

Method Detail

setFormIO

public void setFormIO(FormIO formIO)
set a custom formIO to use.

if null the writer uses the shared FormIO as returned by FormFactory.


load

public java.awt.Container load(java.lang.String resourceName,
                               java.lang.Class targetClass)
create a container and load it from classpath resource.


load

public java.awt.Container load(java.awt.Container container,
                               java.lang.String resourceName,
                               java.lang.Class targetClass)
load the Container from classpath resource.


rebuild

public void rebuild(java.awt.Container container,
                    java.lang.Class targetClass)
re-arrange the direct children of a container from a resource defined by the container's name from a resource location relative to targetclass without customizing the contents.

Parameters:
container - - the container to re-arrange.
targetClass -

rebuildAll

public void rebuildAll(java.awt.Container container,
                       java.lang.Class targetClass,
                       boolean customize)
re-arrange the direct children of the given container and the direct children of any placeholders from resources defined by their names from a resource location relative to targetClass.

Customization of re-arranged components is turned on/off according to boolean parameter.


replaceComponent

public void replaceComponent(java.awt.Container container,
                             java.lang.Class targetClass,
                             java.awt.Component component)
replace a child of container with newComponent using the layoutDescription of container - as given by the resource with the container's name.

The replaced component is the child with the same name as the name of newComponent.


replaceComponents

public void replaceComponents(java.awt.Container container,
                              java.lang.Class targetClass,
                              java.util.Collection replacingComponents)
replace a collection of children in container with a collection of new component using the layoutDescription of container - as given by the resource with the container's name.

The replaced components are the children with the same names as the names of components in the list.

Parameters:
container -
targetClass - to find a formDescription relative to a classpath if needed
replacingComponents - collection of replacing components

loadTemplate

public java.awt.Container loadTemplate(java.lang.String resourceName,
                                       java.lang.Class targetClass,
                                       java.util.Collection children)
experimental: use the resource as template, use as children those in the collection instead of those defined in the resource. NOTE: constraints in the resource that have no corresponding child in the collection are ignored.


customizeActions

public void customizeActions(java.util.List actions,
                             java.lang.String resourceName,
                             java.lang.Class targetClass)
customize a list of actions from a resource.

NOTE: this couples implicitely into Swing if used.


loadStyleMap

public StyleMap loadStyleMap(java.lang.String resourceName,
                             java.lang.Class clazz)
load a StyleMap from a classpath resource.

Parameters:
resourceName -
clazz -
Returns:


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