Statistics
| Revision:

root / branches / v2_0_0_prep / extensions / extGeocoding / src / org / gvsig / geocoding / gui / address / AbstractAddressPanel.java @ 27730

History | View | Annotate | Download (1.1 KB)

1
package org.gvsig.geocoding.gui.address;
2

    
3
import java.util.List;
4

    
5
import javax.swing.DefaultComboBoxModel;
6
import javax.swing.JPanel;
7

    
8
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
9
import org.gvsig.geocoding.Address;
10
import org.gvsig.geocoding.gui.newpattern.ComboDesc;
11

    
12
public class AbstractAddressPanel extends JPanel {
13

    
14
        private static final long serialVersionUID = 1L;
15

    
16
        /**
17
         * get address from user interface
18
         * 
19
         * @param model
20
         * @return
21
         */
22
        public Address getSimpleAddress() {
23
                return null;
24
        };
25

    
26
        /**
27
         * Get the addres from table
28
         * 
29
         * @param model
30
         * @param row
31
         * @return
32
         */
33
        public Address getTableAddress(int row) {
34

    
35
                return null;
36
        }
37
        
38
        /**
39
         * Create fields combo model to number
40
         * 
41
         * @param descs
42
         * @return
43
         */
44
        protected DefaultComboBoxModel createFieldsComboModel(
45
                        List<FeatureAttributeDescriptor> descs) {
46
                DefaultComboBoxModel model = new DefaultComboBoxModel();
47
                for (FeatureAttributeDescriptor desc : descs) {
48
                        ComboDesc cDesc = new ComboDesc(desc);
49
                        model.addElement(cDesc);
50
                }
51
                return model;
52
        }
53

    
54
}