Revision 12552 branches/CatalogYNomenclator_v1_1_0_1005/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/ui/showresults/ShowResultsPanel.java
ShowResultsPanel.java | ||
---|---|---|
68 | 68 |
|
69 | 69 |
import org.gvsig.i18n.Messages; |
70 | 70 |
|
71 |
import es.gva.cit.catalogClient.CatalogClient; |
|
71 | 72 |
import es.gva.cit.catalogClient.metadataxml.XMLNode; |
72 | 73 |
import es.gva.cit.catalogClient.schemas.discoverer.DiscovererFormat; |
73 | 74 |
import es.gva.cit.catalogClient.schemas.discoverer.Record; |
75 |
import es.gva.cit.catalogClient.utils.CatalogConstants; |
|
74 | 76 |
|
75 | 77 |
/** |
76 | 78 |
* |
... | ... | |
79 | 81 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
80 | 82 |
*/ |
81 | 83 |
public class ShowResultsPanel extends JPanel { |
82 |
|
|
83 |
/** |
|
84 |
* |
|
85 |
* |
|
86 |
*/ |
|
87 | 84 |
public static boolean mustShowThumbnails = true; |
88 |
/** |
|
89 |
* |
|
90 |
* |
|
91 |
*/ |
|
92 | 85 |
private Record tags = null; |
93 |
|
|
94 |
/** |
|
95 |
* |
|
96 |
* |
|
97 |
*/ |
|
98 |
private String protocol = null; |
|
99 |
/** |
|
100 |
* |
|
101 |
* |
|
102 |
*/ |
|
103 |
private XMLNode node = null; |
|
104 |
|
|
105 |
/** |
|
106 |
* |
|
107 |
* |
|
108 |
*/ |
|
86 |
private CatalogClient client = null; |
|
87 |
private Record record = null; |
|
109 | 88 |
private URL imageURL = null; |
110 |
/** |
|
111 |
* |
|
112 |
* |
|
113 |
*/ |
|
114 | 89 |
private JPanel descriptionPanel = null; |
115 |
/** |
|
116 |
* |
|
117 |
* |
|
118 |
*/ |
|
119 | 90 |
private JEditorPane descriptionArea = null; |
120 |
// @jve:decl-index=0: |
|
121 |
/** |
|
122 |
* |
|
123 |
* |
|
124 |
*/ |
|
125 | 91 |
private JPanel linksPanel = null; |
126 |
/** |
|
127 |
* |
|
128 |
* |
|
129 |
*/ |
|
130 | 92 |
private JPanel jPanel = null; |
131 |
/** |
|
132 |
* |
|
133 |
* |
|
134 |
*/ |
|
135 | 93 |
private JButton descriptionButton = null; |
136 |
// @jve:decl-index=0: |
|
137 |
/** |
|
138 |
* |
|
139 |
* |
|
140 |
*/ |
|
141 | 94 |
private JLabel jLabel = null; |
142 |
// @jve:decl-index=0: |
|
143 |
/** |
|
144 |
* |
|
145 |
* |
|
146 |
*/ |
|
147 | 95 |
private JButton mapButton = null; |
148 |
// @jve:decl-index=0: |
|
149 |
/** |
|
150 |
* |
|
151 |
* |
|
152 |
*/ |
|
153 | 96 |
private JScrollPane descriptionScroll = null; |
154 |
// @jve:decl-index=0: |
|
155 |
/** |
|
156 |
* |
|
157 |
* |
|
158 |
*/ |
|
159 | 97 |
private JPanel imagePanel = null; |
160 |
/** |
|
161 |
* |
|
162 |
* |
|
163 |
*/ |
|
164 | 98 |
private JLabel jLabel1 = null; |
165 |
/** |
|
166 |
* |
|
167 |
* |
|
168 |
*/ |
|
169 | 99 |
private JLabel imageLabel = null; |
170 |
/** |
|
171 |
* |
|
172 |
* |
|
173 |
*/ |
|
174 | 100 |
private JPanel jPanel1 = null; |
175 |
/** |
|
176 |
* |
|
177 |
* |
|
178 |
*/ |
|
179 | 101 |
private JPanel nextLastPanel = null; |
180 |
/** |
|
181 |
* |
|
182 |
* |
|
183 |
*/ |
|
184 | 102 |
private JButton lastButton = null; |
185 |
/** |
|
186 |
* |
|
187 |
* |
|
188 |
*/ |
|
189 | 103 |
private JLabel textLabel = null; |
190 |
/** |
|
191 |
* |
|
192 |
* |
|
193 |
*/ |
|
194 | 104 |
private JButton nextButton = null; |
195 |
|
|
196 |
/** |
|
197 |
* |
|
198 |
* |
|
199 |
*/ |
|
200 | 105 |
private int numRecords; |
201 |
/** |
|
202 |
* |
|
203 |
* |
|
204 |
*/ |
|
205 | 106 |
private DiscovererFormat discoverer = null; |
206 |
/** |
|
207 |
* |
|
208 |
* |
|
209 |
*/ |
|
210 | 107 |
private JButton closeButton = null; |
211 | 108 |
|
212 | 109 |
/** |
... | ... | |
220 | 117 |
* @param serverURL |
221 | 118 |
* @param translator |
222 | 119 |
*/ |
223 |
public ShowResultsPanel(XMLNode node, String protocol, int numRecords, URL serverURL) {
|
|
120 |
public ShowResultsPanel(CatalogClient client, Record record, int numRecords) {
|
|
224 | 121 |
super(); |
225 |
this.protocol = protocol;
|
|
226 |
this.node = node;
|
|
122 |
this.client = client;
|
|
123 |
this.record = record;
|
|
227 | 124 |
this.numRecords = numRecords; |
228 |
discoverer = new DiscovererFormat(protocol,serverURL);
|
|
125 |
discoverer = new DiscovererFormat(client);
|
|
229 | 126 |
initialize(); |
230 | 127 |
} |
231 | 128 |
|
... | ... | |
313 | 210 |
descriptionArea = new JEditorPane(); |
314 | 211 |
descriptionArea.setPreferredSize(new java.awt.Dimension(400, 300)); |
315 | 212 |
descriptionArea.setContentType("text/html"); |
316 |
loadTextNewRecord(this.node, this.protocol);
|
|
213 |
loadTextNewRecord(record, client);
|
|
317 | 214 |
} |
318 | 215 |
return descriptionArea; |
319 | 216 |
} |
... | ... | |
438 | 335 |
* @param node |
439 | 336 |
* @param protocol |
440 | 337 |
*/ |
441 |
public void loadTextNewRecord(XMLNode node, String protocol) {
|
|
442 |
setTags(discoverer.DiscoverAndParse(node));
|
|
338 |
public void loadTextNewRecord(Record record, CatalogClient client) {
|
|
339 |
setTags(discoverer.DiscoverAndParse(record.getNode()));
|
|
443 | 340 |
|
444 | 341 |
descriptionArea.setText(this.getHtml()); |
445 | 342 |
descriptionArea.setCaretPosition(0); |
Also available in: Unified diff