|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.kleopatra.forms.view.builder.FormWriter
FormWriter responsible for building/filling of containers.
Does use a FormIO to do the actual reading/writing. Does use the shared FormIO from FormFactory if none is set explicitely.
Resources given by name are searched relative to a given class (can be null) as implemented in ResourceManager. Resources given by filepaths are interpreted as absolute file locations.
Constructor Summary | |
FormWriter()
Deprecated. |
Method Summary | |
java.awt.Container |
buildCompleteForm(LayoutDescription description,
UIFactory factory,
boolean customizePlaceHolders)
Deprecated. experimental: create form from given description and factory, auto-replace placeHolders one level deep. |
java.awt.Container |
buildCompleteForm(java.lang.String filename,
boolean customize)
Deprecated. experimental: Create container from filename and auto-replace placeholders one level deep. |
java.awt.Container |
buildCompleteForm(java.lang.String descriptionName,
java.lang.Class targetClass,
boolean customize)
Deprecated. experimental: Create container from resource and auto-replace placeholders one level deep. |
java.awt.Container |
buildForm(java.awt.Container container,
LayoutDescription description,
UIFactory factory)
Deprecated. Fill a given Container with children created by the specified UIFactory and LayoutDescription. |
protected java.awt.Container |
buildForm(FormDescription formDescription,
boolean customize)
Deprecated. |
java.awt.Container |
buildForm(LayoutDescription description)
Deprecated. create default container using the shared UIFactory and fill with children created by the shared UIFactory and LayoutDescription. |
java.awt.Container |
buildForm(LayoutDescription description,
UIFactory factory)
Deprecated. create default container using the specified UIFactory and fill with children created by the uiFactory and LayoutDescription. |
java.awt.Container |
buildForm(java.lang.String filename,
boolean customize)
Deprecated. create, fill and customize a form from a resource located in the filesystem. |
java.awt.Container |
buildForm(java.lang.String descriptionName,
java.lang.Class targetClass,
boolean customize)
Deprecated. Create container from resource as found by ResourceManager and customize if requested. |
java.awt.Container |
buildFromTemplate(java.lang.String resourceName,
java.lang.Class targetClass,
java.util.Collection components)
Deprecated. experimental: use the resource as template, replacing the created widgets with those in the collection. |
protected java.awt.Container |
createDefaultContainer(UIFactory factory)
Deprecated. |
protected java.awt.Container |
createForm(UIFactory factory)
Deprecated. |
protected java.util.List |
createList()
Deprecated. |
protected java.util.Map |
createMap()
Deprecated. |
void |
customizeActions(java.util.List actions,
java.lang.String resourceName,
java.lang.Class targetClass)
Deprecated. customize a list of actions from a resource. |
protected FormIO |
getFormIO()
Deprecated. returns the used formIO. |
protected UIBuilder |
getUIBuilder()
Deprecated. |
protected UIFactory |
getUIFactory()
Deprecated. |
void |
rebuildForm(java.awt.Container container)
Deprecated. unreliably in finding resources - needs targetClass |
void |
rebuildForm(java.awt.Container container,
java.lang.Class targetClass)
Deprecated. re-arrange the contents of a container from a resource defined by the containers name from a resource location relative to targetclass without customizing the contents. |
void |
rebuildForm(java.awt.Container container,
java.lang.Class targetClass,
boolean customize)
Deprecated. re-arrange the contents of a container according to a resource as defined by the container's name, found relative to some targetclass and optionally customize. |
void |
rebuildForm(java.awt.Container container,
LayoutDescription description)
Deprecated. re-arrange the contents of a container according to the layoutDescription. |
void |
replaceComponent(java.awt.Container container,
java.lang.Class targetClass,
java.awt.Component replacingComponent)
Deprecated. 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)
Deprecated. 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 io)
Deprecated. set a custom formIO to use. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FormWriter()
Method Detail |
public void setFormIO(FormIO io)
if null the writer uses the shared FormIO as returned by FormFactory.
public java.awt.Container buildForm(LayoutDescription description)
public java.awt.Container buildForm(LayoutDescription description, UIFactory factory)
description
- - the LayoutDescription to use.factory
- -factory to use.
public java.awt.Container buildForm(java.awt.Container container, LayoutDescription description, UIFactory factory)
NOTE: any children the container might have are removed.
container
- the Container which should be filled with the given layoutdescription
- - the LayoutDescription to use.factory
- -factory to use.
public void rebuildForm(java.awt.Container container, LayoutDescription description)
To work as expected all children of the container need to be named (interpreted as componentID) and match the id of the constraints in the description.
CHECK: used where? probably replaced by replaceComponents?
container
- - container whose contents needs to be re-arrangeddescription
- - the layoutDescription to use.public java.awt.Container buildForm(java.lang.String descriptionName, java.lang.Class targetClass, boolean customize)
descriptionName
- - id of the FormDescription.targetClass
- - used to find relative resource locations.customize
- - customizes content if true.
public void rebuildForm(java.awt.Container container)
container
- - the container to re-arrange.public void rebuildForm(java.awt.Container container, java.lang.Class targetClass)
container
- - the container to re-arrange.targetClass
- public void rebuildForm(java.awt.Container container, java.lang.Class targetClass, boolean customize)
To work as expected all children of the container need to be named (interpreted as componentID) and match the id of the constraints in the description.
container
- - container whose contents needs to be re-arrangedtargetClass
- - to find a relative resource location.customize
- - customize the content if true.public java.awt.Container buildForm(java.lang.String filename, boolean customize)
PENDING: where to look for the relative resources in Presentation? Client responsible for setting userResourceDir?
filename
- - absolute path to resource filecustomize
- - customizes content if true.
public void customizeActions(java.util.List actions, java.lang.String resourceName, java.lang.Class targetClass)
NOTE: this couples implicitely into Swing if used.
actions
- resourceName
- targetClass
- public java.awt.Container buildCompleteForm(LayoutDescription description, UIFactory factory, boolean customizePlaceHolders)
assumes the placeholder resources to be in ResourceManager.getUserResourceDir(). It's the client's responsibility to set the userResourceDir if needed.
PENDING: check which location has precedence!
description
- factory
- customizePlaceHolders
-
public java.awt.Container buildCompleteForm(java.lang.String descriptionName, java.lang.Class targetClass, boolean customize)
The methods asssumes that the components (constraints) that should be replaced are of generic type "PlaceHolder" and that their name is the id of the resource they should be replaced with.
descriptionName
- targetClass
- customize
-
public java.awt.Container buildCompleteForm(java.lang.String filename, boolean customize)
The methods asssumes that the components (constraints) that should be replaced are of generic type "PlaceHolder" and that their name is the id of the resource they should be replaced with. The resources are assumed to be in the same directory as the parent.
PENDING: where to look for the relative resources in Presentation? Client responsible for setting userResourceDir?
filename
- customize
-
public void replaceComponent(java.awt.Container container, java.lang.Class targetClass, java.awt.Component replacingComponent)
The replaced component is the child with the same name as the name of newComponent.
container
- targetClass
- replacingComponent
- public void replaceComponents(java.awt.Container container, java.lang.Class targetClass, java.util.Collection replacingComponents)
The replaced components are the children with the same names as the names of components in the list.
container
- targetClass
- to find a formDescription relative to a classpath if neededreplacingComponents
- collection of replacing componentspublic java.awt.Container buildFromTemplate(java.lang.String resourceName, java.lang.Class targetClass, java.util.Collection components)
protected java.awt.Container buildForm(FormDescription formDescription, boolean customize)
protected UIBuilder getUIBuilder()
protected java.awt.Container createDefaultContainer(UIFactory factory)
protected java.awt.Container createForm(UIFactory factory)
protected UIFactory getUIFactory()
protected FormIO getFormIO()
protected java.util.List createList()
protected java.util.Map createMap()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |