View Javadoc
1   /*
2    * Copyright 2014 James Pether Sörling
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *   http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   *
16   *	$Id$
17   *  $HeadURL$
18  */
19  package com.hack23.cia.web.impl.ui.application.views.common.formfactory.api;
20  
21  import java.io.Serializable;
22  import java.util.List;
23  
24  import com.vaadin.data.util.BeanItem;
25  import com.vaadin.ui.AbstractOrderedLayout;
26  import com.vaadin.ui.Button.ClickListener;
27  import com.vaadin.ui.FormLayout;
28  
29  /**
30   * A factory for creating Form objects.
31   */
32  public interface FormFactory {
33  
34  	/**
35  	 * Adds the form panel text fields.
36  	 *
37  	 * @param <T>
38  	 *            the generic type
39  	 * @param panelContent
40  	 *            the panel content
41  	 * @param item
42  	 *            the item
43  	 * @param beanType
44  	 *            the bean type
45  	 * @param displayProperties
46  	 *            the display properties
47  	 */
48  	<T extends Serializable> void addFormPanelTextFields(AbstractOrderedLayout panelContent, BeanItem<T> item, Class<T> beanType, List<String> displayProperties);
49  
50  
51  	/**
52  	 * Adds the request input form fields.
53  	 *
54  	 * @param <T>
55  	 *            the generic type
56  	 * @param panelContent
57  	 *            the panel content
58  	 * @param item
59  	 *            the item
60  	 * @param beanType
61  	 *            the bean type
62  	 * @param displayProperties
63  	 *            the display properties
64  	 * @param buttonLabel
65  	 *            the button label
66  	 * @param buttonListener
67  	 *            the button listener
68  	 */
69  	<T extends Serializable> void addRequestInputFormFields(FormLayout panelContent, BeanItem<T> item, Class<T> beanType, List<String> displayProperties,String buttonLabel,ClickListener buttonListener);
70  
71  
72  }