svn-gvsig-desktop / tmp / trunk / cliente / WorkSpace_WPSClient / extWPSCallejero / src / es / logex / gvsig / streetsmap / core / StreetsMapExtensionManager.java @ 26497
History | View | Annotate | Download (3.85 KB)
1 |
package es.logex.gvsig.streetsmap.core; |
---|---|
2 |
|
3 |
import java.util.ArrayList; |
4 |
import java.util.List; |
5 |
|
6 |
import es.logex.gvsig.streetsmap.ui.PanelQuerysActionsDelegate; |
7 |
import es.logex.gvsig.streetsmap.ui.QueryResultsData; |
8 |
import es.logex.gvsig.gui.dialogs.StreetsMapDialog; |
9 |
import com.iver.cit.gvsig.project.documents.view.gui.BaseView; |
10 |
|
11 |
public class StreetsMapExtensionManager implements PanelQuerysActionsDelegate { |
12 |
|
13 |
public void DoExtent(QueryResultsData newExtent) { |
14 |
System.out.println("DoExtent:" + newExtent.getCaption() + "/" |
15 |
+ newExtent.getUserData().toString()); |
16 |
|
17 |
} |
18 |
|
19 |
public List<QueryResultsData> DoSearch(String municipio, String calle, |
20 |
String numpolicia) {
|
21 |
System.out.println("QueryData:" + municipio + "," + calle + "," |
22 |
+ numpolicia); |
23 |
List<QueryResultsData> simulatedResults = new ArrayList<QueryResultsData>(); |
24 |
for (int i = 0; i < 15; i++) { |
25 |
|
26 |
simulatedResults.add(new QueryResultsData() {
|
27 |
|
28 |
public String getCaption() { |
29 |
return "Valor resultado de la busqueda"; |
30 |
} |
31 |
|
32 |
public Object getUserData() { |
33 |
return "10,10;20,30"; |
34 |
} |
35 |
|
36 |
}); |
37 |
|
38 |
} |
39 |
return simulatedResults;
|
40 |
} |
41 |
|
42 |
/**
|
43 |
* @uml.property name="baseView"
|
44 |
* @uml.associationEnd inverse="streetsMapExtensionManager:com.iver.cit.gvsig.project.documents.view.gui.BaseView"
|
45 |
*/
|
46 |
private BaseView baseView = null; |
47 |
|
48 |
/**
|
49 |
* Getter of the property <tt>baseView</tt>
|
50 |
*
|
51 |
* @return Returns the baseView.
|
52 |
* @uml.property name="baseView"
|
53 |
*/
|
54 |
public BaseView getBaseView() {
|
55 |
return baseView;
|
56 |
} |
57 |
|
58 |
/**
|
59 |
* Setter of the property <tt>baseView</tt>
|
60 |
*
|
61 |
* @param baseView
|
62 |
* The baseView to set.
|
63 |
* @uml.property name="baseView"
|
64 |
*/
|
65 |
public void setBaseView(BaseView baseView) { |
66 |
this.baseView = baseView;
|
67 |
} |
68 |
|
69 |
/**
|
70 |
* @uml.property name="streetsMapDialog"
|
71 |
* @uml.associationEnd inverse="streetsMapExtensionManager:es.logex.gvsig.gui.dialogs.StreetsMapDialog"
|
72 |
*/
|
73 |
private StreetsMapDialog streetsMapDialog;
|
74 |
|
75 |
/**
|
76 |
* Getter of the property <tt>streetsMapDialog</tt>
|
77 |
*
|
78 |
* @return Returns the streetsMapDialog.
|
79 |
* @uml.property name="streetsMapDialog"
|
80 |
*/
|
81 |
public StreetsMapDialog getStreetsMapDialog() {
|
82 |
return streetsMapDialog;
|
83 |
} |
84 |
|
85 |
/**
|
86 |
* Setter of the property <tt>streetsMapDialog</tt>
|
87 |
*
|
88 |
* @param streetsMapDialog
|
89 |
* The streetsMapDialog to set.
|
90 |
* @uml.property name="streetsMapDialog"
|
91 |
*/
|
92 |
public void setStreetsMapDialog(StreetsMapDialog streetsMapDialog) { |
93 |
this.streetsMapDialog = streetsMapDialog;
|
94 |
} |
95 |
|
96 |
/**
|
97 |
* @uml.property name="streetsMapProtocolHandler"
|
98 |
* @uml.associationEnd inverse="streetsMapExtensionManager:es.logex.gvsig.streetsmap.core.StreetsMapProtocolHandler"
|
99 |
*/
|
100 |
private StreetsMapProtocolHandler streetsMapProtocolHandler;
|
101 |
|
102 |
/**
|
103 |
* Getter of the property <tt>streetsMapProtocolHandler</tt>
|
104 |
*
|
105 |
* @return Returns the streetsMapProtocolHandler.
|
106 |
* @uml.property name="streetsMapProtocolHandler"
|
107 |
*/
|
108 |
public StreetsMapProtocolHandler getStreetsMapProtocolHandler() {
|
109 |
return streetsMapProtocolHandler;
|
110 |
} |
111 |
|
112 |
/**
|
113 |
* Setter of the property <tt>streetsMapProtocolHandler</tt>
|
114 |
*
|
115 |
* @param streetsMapProtocolHandler
|
116 |
* The streetsMapProtocolHandler to set.
|
117 |
* @uml.property name="streetsMapProtocolHandler"
|
118 |
*/
|
119 |
public void setStreetsMapProtocolHandler( |
120 |
StreetsMapProtocolHandler streetsMapProtocolHandler) { |
121 |
this.streetsMapProtocolHandler = streetsMapProtocolHandler;
|
122 |
} |
123 |
|
124 |
/**
|
125 |
*/
|
126 |
public StreetsMapExtensionManager(BaseView baseView) {
|
127 |
this.baseView = baseView;
|
128 |
this.streetsMapDialog = new StreetsMapDialog(this); |
129 |
try {
|
130 |
this.streetsMapProtocolHandler = StreetsMapProtocolHandlerFactory
|
131 |
.createVersionHandler("1.0.0");
|
132 |
} catch (ClassNotFoundException e) { |
133 |
// TODO Auto-generated catch block
|
134 |
e.printStackTrace(); |
135 |
} catch (InstantiationException e) { |
136 |
// TODO Auto-generated catch block
|
137 |
e.printStackTrace(); |
138 |
} catch (IllegalAccessException e) { |
139 |
// TODO Auto-generated catch block
|
140 |
e.printStackTrace(); |
141 |
} |
142 |
} |
143 |
|
144 |
} |