Statistics
| Revision:

svn-gvsig-desktop / tmp / trunk / cliente / cliente_ui / CallejerosExtensionUI / src / es / logex / gvsig / streetsmap / ui / PanelQuerysActionsDelegate.java @ 26496

History | View | Annotate | Download (1.25 KB)

1
package es.logex.gvsig.streetsmap.ui;
2

    
3
import java.util.List;
4
/***
5
 * 
6
 * Para recibir callbacks del panel, implementar este interfaz
7
 * ej:
8
 * <code>jar</code>
9
 *                 frame.getContentPane().add(new PanelQuerysBuilder(
10
*                                new PanelQuerysActionsDelegate()
11
                                {
12

13
                                        public void DoExtent(QueryResultsData newExtent) {
14
                                                System.out.println("DoExtent:" + newExtent.getCaption()+"/"+newExtent.getUserData().toString());                                                                                
15
                                        }
16

17
                                        public List<QueryResultsData> DoSearch(String municipio, String calle, String numpolicia) {
18
                                                System.out.println("QueryData:"+municipio+","+calle+","+numpolicia);
19
                                                List<QueryResultsData> simulatedResults = new ArrayList<QueryResultsData>();
20
                                                for(int i=0; i<15; i++)
21
                                                {
22

23
                                                        simulatedResults.add(new QueryResultsData()
24
                                                        {
25
        
26
                                                                public String getCaption() {
27
                                                                        return "Valor resultado de la busqueda";
28
                                                                }
29
        
30
                                                                public Object getUserData() {
31
                                                                        return "10,10;20,30";
32
                                                                }
33
                                                                
34
                                                        });
35
                        
36
                                                }
37
                                                return simulatedResults;
38
                                        }
39
                                
40
                                }
41
                                ));
42

43
 * 
44
 * @author jcelda
45
 *
46
 */
47
public interface PanelQuerysActionsDelegate {
48
        public List<QueryResultsData> DoSearch(String municipio,String calle,String numpolicia);
49
        public void DoExtent(QueryResultsData newExtent);
50

    
51
}