KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > oddjob > designer > model > FieldSelection


1 /*
2  * (c) Rob Gordon 2005
3  */

4 package org.oddjob.designer.model;
5
6 /**
7  * A DesignDefintion that is intended to be rendered as a selection between
8  * the child DesignDefinitions.
9  *
10  * @author Rob Gordon.
11  */

12 public class FieldSelection extends GroupBase implements DesignDefinition {
13
14     /**
15      * Constructor. A FieldSelection can currently only appear inline so
16      * the title 'select' is only used for testing.
17      *
18      */

19     public FieldSelection() {
20         super("select");
21     }
22     
23     /**
24      * Add a child DesignDefinition.
25      *
26      * @param designDef The child DesignDefinition.
27      * @return This.
28      */

29     public FieldSelection add(DesignDefinition designDef) {
30         addElement(designDef);
31         return this;
32     }
33         
34     /* (non-Javadoc)
35      * @see org.oddjob.designer.model.DesignDefinition#accept(org.oddjob.designer.model.DesignProcessor)
36      */

37     public void accept(DesignProcessor processor) {
38         processor.onFieldSelection(this);
39     }
40     
41 }
42
Popular Tags