Package muntjac :: Package ui :: Module field_factory
[hide private]
[frames] | no frames]

Source Code for Module muntjac.ui.field_factory

 1  # Copyright (C) 2012 Vaadin Ltd.  
 2  # Copyright (C) 2012 Richard Lincoln 
 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  from muntjac.ui.table_field_factory import ITableFieldFactory 
17  from muntjac.ui.form_field_factory import IFormFieldFactory 
18   
19   
20 -class IFieldFactory(IFormFieldFactory, ITableFieldFactory):
21 """Factory for creating new Field-instances based on type, datasource 22 and/or context. 23 24 @author: Vaadin Ltd. 25 @author: Richard Lincoln 26 @version: 1.1.2 27 @deprecated: IFieldFactory was split into two lighter interfaces. 28 Use IFormFieldFactory or ITableFieldFactory or both instead. 29 """ 30
31 - def createField(self, *args):
32 """Creates a field based on type of data. 33 34 @param args: tuple of the form 35 - (type, uiContext) 36 1. the type of data presented in field. 37 2. the component where the field is presented. 38 - (property, uiContext) 39 1. the property datasource. 40 2. the component where the field is presented. 41 @return: Field the field suitable for editing the specified data. 42 """ 43 raise NotImplementedError
44