Revision 46903
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.ui/src/main/java/org/gvsig/webbrowser/WebBrowserPanel.java | ||
---|---|---|
1 |
|
|
2 |
package org.gvsig.webbrowser; |
|
3 |
|
|
4 |
import java.net.URL; |
|
5 |
import org.gvsig.tools.swing.api.Component; |
|
6 |
|
|
7 |
public interface WebBrowserPanel extends Component { |
|
8 |
|
|
9 |
String getPage(); |
|
10 |
|
|
11 |
void setPage(URL url); |
|
12 |
|
|
13 |
void setPage(String url); |
|
14 |
|
|
15 |
String getTitle(); |
|
16 |
|
|
17 |
void setContent(final String content, final String contentType); |
|
18 |
|
|
19 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.ui/src/main/java/org/gvsig/webbrowser/jfx/JFXWebBrowserPanelView.xml | ||
---|---|---|
24 | 24 |
</at> |
25 | 25 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
26 | 26 |
</super> |
27 |
<at name="id">/home/jjdelcerro/gvSIG/plugins/org.gvsig.scripting.app.mainplugin/scripts/addons/ScriptingComposerTools/javadocviewer/webbrowserpanel/browserpanel.xml</at> |
|
28 |
<at name="path">addons/ScriptingComposerTools/javadocviewer/webbrowserpanel/browserpanel.xml</at> |
|
27 |
<at name="id">/home/jjdelcerro/datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.ui/src/main/java/org/gvsig/webbrowser/jfx/JFXWebBrowserPanelView.xml</at> |
|
29 | 28 |
<at name="rowspecs">CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE</at> |
30 | 29 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE</at> |
31 | 30 |
<at name="components"> |
... | ... | |
75 | 74 |
</object> |
76 | 75 |
</at> |
77 | 76 |
<at name="name">txtURL</at> |
78 |
<at name="width">843</at>
|
|
79 |
<at name="height">20</at>
|
|
77 |
<at name="width">767</at>
|
|
78 |
<at name="height">22</at>
|
|
80 | 79 |
</object> |
81 | 80 |
</at> |
82 | 81 |
</object> |
... | ... | |
109 | 108 |
<at name="properties"> |
110 | 109 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
111 | 110 |
<at name="name">containerBrowser</at> |
112 |
<at name="width">935</at>
|
|
113 |
<at name="height">466</at>
|
|
111 |
<at name="width">871</at>
|
|
112 |
<at name="height">504</at>
|
|
114 | 113 |
</object> |
115 | 114 |
</at> |
116 | 115 |
</object> |
... | ... | |
120 | 119 |
</item> |
121 | 120 |
<item > |
122 | 121 |
<at name="value"> |
122 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
123 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
124 |
<at name="cellconstraints"> |
|
125 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
126 |
<at name="column">2</at> |
|
127 |
<at name="row">2</at> |
|
128 |
<at name="colspan">1</at> |
|
129 |
<at name="rowspan">1</at> |
|
130 |
<at name="halign">fill</at> |
|
131 |
<at name="valign">fill</at> |
|
132 |
<at name="insets" object="insets">0,0,0,0</at> |
|
133 |
</object> |
|
134 |
</at> |
|
135 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
136 |
</super> |
|
137 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
138 |
<at name="beanclass">javax.swing.JButton</at> |
|
139 |
<at name="beanproperties"> |
|
140 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
141 |
<at name="classname">javax.swing.JButton</at> |
|
142 |
<at name="properties"> |
|
143 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
144 |
<at name="border"> |
|
145 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
146 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
147 |
<at name="name">border</at> |
|
148 |
</super> |
|
149 |
<at name="borders"> |
|
150 |
<object classname="java.util.LinkedList"> |
|
151 |
<item > |
|
152 |
<at name="value"> |
|
153 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
154 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
155 |
<at name="name">border</at> |
|
156 |
</super> |
|
157 |
<at name="top">0</at> |
|
158 |
<at name="left">0</at> |
|
159 |
<at name="bottom">0</at> |
|
160 |
<at name="right">0</at> |
|
161 |
</object> |
|
162 |
</at> |
|
163 |
</item> |
|
164 |
</object> |
|
165 |
</at> |
|
166 |
</object> |
|
167 |
</at> |
|
168 |
<at name="opaque">false</at> |
|
169 |
<at name="icon"> |
|
170 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
171 |
<at name="embedded">false</at> |
|
172 |
<at name="path">addons/Catalog/repository/webbrowser-previous.png</at> |
|
173 |
<at name="description">webbrowser-previous.png</at> |
|
174 |
<at name="width">16</at> |
|
175 |
<at name="height">16</at> |
|
176 |
</object> |
|
177 |
</at> |
|
178 |
<at name="name">btnPrevious</at> |
|
179 |
<at name="width">16</at> |
|
180 |
<at name="height">22</at> |
|
181 |
</object> |
|
182 |
</at> |
|
183 |
</object> |
|
184 |
</at> |
|
185 |
</object> |
|
186 |
</at> |
|
187 |
</item> |
|
188 |
<item > |
|
189 |
<at name="value"> |
|
190 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
191 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
192 |
<at name="cellconstraints"> |
|
193 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
194 |
<at name="column">4</at> |
|
195 |
<at name="row">2</at> |
|
196 |
<at name="colspan">1</at> |
|
197 |
<at name="rowspan">1</at> |
|
198 |
<at name="halign">fill</at> |
|
199 |
<at name="valign">fill</at> |
|
200 |
<at name="insets" object="insets">0,0,0,0</at> |
|
201 |
</object> |
|
202 |
</at> |
|
203 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
204 |
</super> |
|
205 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
206 |
<at name="beanclass">javax.swing.JButton</at> |
|
207 |
<at name="beanproperties"> |
|
208 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
209 |
<at name="classname">javax.swing.JButton</at> |
|
210 |
<at name="properties"> |
|
211 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
212 |
<at name="border"> |
|
213 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
214 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
215 |
<at name="name">border</at> |
|
216 |
</super> |
|
217 |
<at name="borders"> |
|
218 |
<object classname="java.util.LinkedList"> |
|
219 |
<item > |
|
220 |
<at name="value"> |
|
221 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
222 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
223 |
<at name="name">border</at> |
|
224 |
</super> |
|
225 |
<at name="top">0</at> |
|
226 |
<at name="left">0</at> |
|
227 |
<at name="bottom">0</at> |
|
228 |
<at name="right">0</at> |
|
229 |
</object> |
|
230 |
</at> |
|
231 |
</item> |
|
232 |
</object> |
|
233 |
</at> |
|
234 |
</object> |
|
235 |
</at> |
|
236 |
<at name="opaque">false</at> |
|
237 |
<at name="icon"> |
|
238 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
239 |
<at name="embedded">false</at> |
|
240 |
<at name="path">addons/Catalog/repository/webbrowser-next.png</at> |
|
241 |
<at name="description">webbrowser-next.png</at> |
|
242 |
<at name="width">16</at> |
|
243 |
<at name="height">16</at> |
|
244 |
</object> |
|
245 |
</at> |
|
246 |
<at name="name">btnNext</at> |
|
247 |
<at name="width">16</at> |
|
248 |
<at name="height">22</at> |
|
249 |
</object> |
|
250 |
</at> |
|
251 |
</object> |
|
252 |
</at> |
|
253 |
</object> |
|
254 |
</at> |
|
255 |
</item> |
|
256 |
<item > |
|
257 |
<at name="value"> |
|
258 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
259 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
260 |
<at name="cellconstraints"> |
|
261 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
262 |
<at name="column">6</at> |
|
263 |
<at name="row">2</at> |
|
264 |
<at name="colspan">1</at> |
|
265 |
<at name="rowspan">1</at> |
|
266 |
<at name="halign">fill</at> |
|
267 |
<at name="valign">fill</at> |
|
268 |
<at name="insets" object="insets">0,0,0,0</at> |
|
269 |
</object> |
|
270 |
</at> |
|
271 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
272 |
</super> |
|
273 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
274 |
<at name="beanclass">javax.swing.JButton</at> |
|
275 |
<at name="beanproperties"> |
|
276 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
277 |
<at name="classname">javax.swing.JButton</at> |
|
278 |
<at name="properties"> |
|
279 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
280 |
<at name="border"> |
|
281 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
282 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
283 |
<at name="name">border</at> |
|
284 |
</super> |
|
285 |
<at name="borders"> |
|
286 |
<object classname="java.util.LinkedList"> |
|
287 |
<item > |
|
288 |
<at name="value"> |
|
289 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
290 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
291 |
<at name="name">border</at> |
|
292 |
</super> |
|
293 |
<at name="top">0</at> |
|
294 |
<at name="left">0</at> |
|
295 |
<at name="bottom">0</at> |
|
296 |
<at name="right">0</at> |
|
297 |
</object> |
|
298 |
</at> |
|
299 |
</item> |
|
300 |
</object> |
|
301 |
</at> |
|
302 |
</object> |
|
303 |
</at> |
|
304 |
<at name="opaque">false</at> |
|
305 |
<at name="icon"> |
|
306 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
307 |
<at name="embedded">false</at> |
|
308 |
<at name="path">addons/Catalog/repository/webbrowser-refresh.png</at> |
|
309 |
<at name="description">webbrowser-refresh.png</at> |
|
310 |
<at name="width">16</at> |
|
311 |
<at name="height">16</at> |
|
312 |
</object> |
|
313 |
</at> |
|
314 |
<at name="name">btnRefresh</at> |
|
315 |
<at name="width">16</at> |
|
316 |
<at name="enabled">false</at> |
|
317 |
<at name="height">22</at> |
|
318 |
</object> |
|
319 |
</at> |
|
320 |
</object> |
|
321 |
</at> |
|
322 |
</object> |
|
323 |
</at> |
|
324 |
</item> |
|
325 |
<item > |
|
326 |
<at name="value"> |
|
327 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
328 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
329 |
<at name="cellconstraints"> |
|
330 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
331 |
<at name="column">10</at> |
|
332 |
<at name="row">2</at> |
|
333 |
<at name="colspan">1</at> |
|
334 |
<at name="rowspan">1</at> |
|
335 |
<at name="halign">fill</at> |
|
336 |
<at name="valign">fill</at> |
|
337 |
<at name="insets" object="insets">0,0,0,0</at> |
|
338 |
</object> |
|
339 |
</at> |
|
340 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
341 |
</super> |
|
342 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
343 |
<at name="beanclass">javax.swing.JButton</at> |
|
344 |
<at name="beanproperties"> |
|
345 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
346 |
<at name="classname">javax.swing.JButton</at> |
|
347 |
<at name="properties"> |
|
348 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
349 |
<at name="border"> |
|
350 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
351 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
352 |
<at name="name">border</at> |
|
353 |
</super> |
|
354 |
<at name="borders"> |
|
355 |
<object classname="java.util.LinkedList"> |
|
356 |
<item > |
|
357 |
<at name="value"> |
|
358 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
359 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
360 |
<at name="name">border</at> |
|
361 |
</super> |
|
362 |
<at name="top">0</at> |
|
363 |
<at name="left">0</at> |
|
364 |
<at name="bottom">0</at> |
|
365 |
<at name="right">0</at> |
|
366 |
</object> |
|
367 |
</at> |
|
368 |
</item> |
|
369 |
</object> |
|
370 |
</at> |
|
371 |
</object> |
|
372 |
</at> |
|
373 |
<at name="opaque">false</at> |
|
374 |
<at name="icon"> |
|
375 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
376 |
<at name="embedded">false</at> |
|
377 |
<at name="path">addons/Catalog/repository/webbrowser-config.png</at> |
|
378 |
<at name="description">webbrowser-config.png</at> |
|
379 |
<at name="width">16</at> |
|
380 |
<at name="height">16</at> |
|
381 |
</object> |
|
382 |
</at> |
|
383 |
<at name="name">btnConfig</at> |
|
384 |
<at name="width">16</at> |
|
385 |
<at name="enabled">false</at> |
|
386 |
<at name="height">22</at> |
|
387 |
</object> |
|
388 |
</at> |
|
389 |
</object> |
|
390 |
</at> |
|
391 |
</object> |
|
392 |
</at> |
|
393 |
</item> |
|
394 |
<item > |
|
395 |
<at name="value"> |
|
123 | 396 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
124 | 397 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
125 | 398 |
<at name="cellconstraints"> |
... | ... | |
135 | 408 |
</at> |
136 | 409 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
137 | 410 |
</super> |
138 |
<at name="id">embedded.1838006420</at>
|
|
411 |
<at name="id">embedded.139546517</at>
|
|
139 | 412 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
140 | 413 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MIN(12DLU;DEFAULT):GROW(0.3),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(0.7)</at> |
141 | 414 |
<at name="components"> |
... | ... | |
185 | 458 |
</object> |
186 | 459 |
</at> |
187 | 460 |
<at name="name">txtSearch</at> |
188 |
<at name="width">259</at>
|
|
189 |
<at name="height">20</at>
|
|
461 |
<at name="width">238</at>
|
|
462 |
<at name="height">22</at>
|
|
190 | 463 |
</object> |
191 | 464 |
</at> |
192 | 465 |
</object> |
... | ... | |
256 | 529 |
</object> |
257 | 530 |
</at> |
258 | 531 |
<at name="name">lblStatus</at> |
259 |
<at name="width">587</at>
|
|
532 |
<at name="width">540</at>
|
|
260 | 533 |
<at name="fill"> |
261 | 534 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
262 | 535 |
<at name="name">fill</at> |
263 | 536 |
</object> |
264 | 537 |
</at> |
265 |
<at name="height">20</at>
|
|
538 |
<at name="height">22</at>
|
|
266 | 539 |
</object> |
267 | 540 |
</at> |
268 | 541 |
</object> |
... | ... | |
314 | 587 |
</at> |
315 | 588 |
</object> |
316 | 589 |
</at> |
590 |
<at name="icon"> |
|
591 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
592 |
<at name="embedded">false</at> |
|
593 |
<at name="path">addons/Catalog/repository/webbrowser-search.png</at> |
|
594 |
<at name="description">webbrowser-search.png</at> |
|
595 |
<at name="width">16</at> |
|
596 |
<at name="height">16</at> |
|
597 |
</object> |
|
598 |
</at> |
|
317 | 599 |
<at name="name">imgSearch</at> |
318 | 600 |
<at name="width">16</at> |
319 | 601 |
<at name="height">16</at> |
... | ... | |
372 | 654 |
</at> |
373 | 655 |
</object> |
374 | 656 |
</at> |
657 |
<at name="opaque">false</at> |
|
658 |
<at name="icon"> |
|
659 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
660 |
<at name="embedded">false</at> |
|
661 |
<at name="path">addons/Catalog/repository/webbrowser-search-next.png</at> |
|
662 |
<at name="description">webbrowser-search-next.png</at> |
|
663 |
<at name="width">16</at> |
|
664 |
<at name="height">16</at> |
|
665 |
</object> |
|
666 |
</at> |
|
375 | 667 |
<at name="name">btnSearchNext</at> |
376 |
<at name="width">12</at>
|
|
377 |
<at name="height">12</at>
|
|
668 |
<at name="width">16</at>
|
|
669 |
<at name="height">16</at>
|
|
378 | 670 |
</object> |
379 | 671 |
</at> |
380 | 672 |
</object> |
... | ... | |
430 | 722 |
</at> |
431 | 723 |
</object> |
432 | 724 |
</at> |
725 |
<at name="opaque">false</at> |
|
726 |
<at name="icon"> |
|
727 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
728 |
<at name="embedded">false</at> |
|
729 |
<at name="path">addons/Catalog/repository/webbrowser-search-previous.png</at> |
|
730 |
<at name="description">webbrowser-search-previous.png</at> |
|
731 |
<at name="width">16</at> |
|
732 |
<at name="height">16</at> |
|
733 |
</object> |
|
734 |
</at> |
|
433 | 735 |
<at name="name">btnSearchPrevious</at> |
434 |
<at name="width">12</at>
|
|
435 |
<at name="height">12</at>
|
|
736 |
<at name="width">16</at>
|
|
737 |
<at name="height">16</at>
|
|
436 | 738 |
</object> |
437 | 739 |
</at> |
438 | 740 |
</object> |
... | ... | |
522 | 824 |
</object> |
523 | 825 |
</at> |
524 | 826 |
</item> |
525 |
<item > |
|
526 |
<at name="value"> |
|
527 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
528 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
529 |
<at name="cellconstraints"> |
|
530 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
531 |
<at name="column">2</at> |
|
532 |
<at name="row">2</at> |
|
533 |
<at name="colspan">1</at> |
|
534 |
<at name="rowspan">1</at> |
|
535 |
<at name="halign">fill</at> |
|
536 |
<at name="valign">fill</at> |
|
537 |
<at name="insets" object="insets">0,0,0,0</at> |
|
538 |
</object> |
|
539 |
</at> |
|
540 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
541 |
</super> |
|
542 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
543 |
<at name="beanclass">javax.swing.JButton</at> |
|
544 |
<at name="beanproperties"> |
|
545 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
546 |
<at name="classname">javax.swing.JButton</at> |
|
547 |
<at name="properties"> |
|
548 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
549 |
<at name="border"> |
|
550 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
551 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
552 |
<at name="name">border</at> |
|
553 |
</super> |
|
554 |
<at name="borders"> |
|
555 |
<object classname="java.util.LinkedList"> |
|
556 |
<item > |
|
557 |
<at name="value"> |
|
558 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
559 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
560 |
<at name="name">border</at> |
|
561 |
</super> |
|
562 |
<at name="top">0</at> |
|
563 |
<at name="left">0</at> |
|
564 |
<at name="bottom">0</at> |
|
565 |
<at name="right">0</at> |
|
566 |
</object> |
|
567 |
</at> |
|
568 |
</item> |
|
569 |
</object> |
|
570 |
</at> |
|
571 |
</object> |
|
572 |
</at> |
|
573 |
<at name="name">btnPrevious</at> |
|
574 |
<at name="width">12</at> |
|
575 |
<at name="height">20</at> |
|
576 |
</object> |
|
577 |
</at> |
|
578 |
</object> |
|
579 |
</at> |
|
580 |
</object> |
|
581 |
</at> |
|
582 |
</item> |
|
583 |
<item > |
|
584 |
<at name="value"> |
|
585 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
586 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
587 |
<at name="cellconstraints"> |
|
588 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
589 |
<at name="column">4</at> |
|
590 |
<at name="row">2</at> |
|
591 |
<at name="colspan">1</at> |
|
592 |
<at name="rowspan">1</at> |
|
593 |
<at name="halign">fill</at> |
|
594 |
<at name="valign">fill</at> |
|
595 |
<at name="insets" object="insets">0,0,0,0</at> |
|
596 |
</object> |
|
597 |
</at> |
|
598 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
599 |
</super> |
|
600 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
601 |
<at name="beanclass">javax.swing.JButton</at> |
|
602 |
<at name="beanproperties"> |
|
603 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
604 |
<at name="classname">javax.swing.JButton</at> |
|
605 |
<at name="properties"> |
|
606 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
607 |
<at name="border"> |
|
608 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
609 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
610 |
<at name="name">border</at> |
|
611 |
</super> |
|
612 |
<at name="borders"> |
|
613 |
<object classname="java.util.LinkedList"> |
|
614 |
<item > |
|
615 |
<at name="value"> |
|
616 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
617 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
618 |
<at name="name">border</at> |
|
619 |
</super> |
|
620 |
<at name="top">0</at> |
|
621 |
<at name="left">0</at> |
|
622 |
<at name="bottom">0</at> |
|
623 |
<at name="right">0</at> |
|
624 |
</object> |
|
625 |
</at> |
|
626 |
</item> |
|
627 |
</object> |
|
628 |
</at> |
|
629 |
</object> |
|
630 |
</at> |
|
631 |
<at name="name">btnNext</at> |
|
632 |
<at name="width">12</at> |
|
633 |
<at name="height">20</at> |
|
634 |
</object> |
|
635 |
</at> |
|
636 |
</object> |
|
637 |
</at> |
|
638 |
</object> |
|
639 |
</at> |
|
640 |
</item> |
|
641 |
<item > |
|
642 |
<at name="value"> |
|
643 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
644 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
645 |
<at name="cellconstraints"> |
|
646 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
647 |
<at name="column">6</at> |
|
648 |
<at name="row">2</at> |
|
649 |
<at name="colspan">1</at> |
|
650 |
<at name="rowspan">1</at> |
|
651 |
<at name="halign">fill</at> |
|
652 |
<at name="valign">fill</at> |
|
653 |
<at name="insets" object="insets">0,0,0,0</at> |
|
654 |
</object> |
|
655 |
</at> |
|
656 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
657 |
</super> |
|
658 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
659 |
<at name="beanclass">javax.swing.JButton</at> |
|
660 |
<at name="beanproperties"> |
|
661 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
662 |
<at name="classname">javax.swing.JButton</at> |
|
663 |
<at name="properties"> |
|
664 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
665 |
<at name="border"> |
|
666 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
667 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
668 |
<at name="name">border</at> |
|
669 |
</super> |
|
670 |
<at name="borders"> |
|
671 |
<object classname="java.util.LinkedList"> |
|
672 |
<item > |
|
673 |
<at name="value"> |
|
674 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
675 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
676 |
<at name="name">border</at> |
|
677 |
</super> |
|
678 |
<at name="top">0</at> |
|
679 |
<at name="left">0</at> |
|
680 |
<at name="bottom">0</at> |
|
681 |
<at name="right">0</at> |
|
682 |
</object> |
|
683 |
</at> |
|
684 |
</item> |
|
685 |
</object> |
|
686 |
</at> |
|
687 |
</object> |
|
688 |
</at> |
|
689 |
<at name="name">btnRefresh</at> |
|
690 |
<at name="width">12</at> |
|
691 |
<at name="enabled">false</at> |
|
692 |
<at name="height">20</at> |
|
693 |
</object> |
|
694 |
</at> |
|
695 |
</object> |
|
696 |
</at> |
|
697 |
</object> |
|
698 |
</at> |
|
699 |
</item> |
|
700 |
<item > |
|
701 |
<at name="value"> |
|
702 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
703 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
704 |
<at name="cellconstraints"> |
|
705 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
706 |
<at name="column">10</at> |
|
707 |
<at name="row">2</at> |
|
708 |
<at name="colspan">1</at> |
|
709 |
<at name="rowspan">1</at> |
|
710 |
<at name="halign">fill</at> |
|
711 |
<at name="valign">fill</at> |
|
712 |
<at name="insets" object="insets">0,0,0,0</at> |
|
713 |
</object> |
|
714 |
</at> |
|
715 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
716 |
</super> |
|
717 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
718 |
<at name="beanclass">javax.swing.JButton</at> |
|
719 |
<at name="beanproperties"> |
|
720 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
721 |
<at name="classname">javax.swing.JButton</at> |
|
722 |
<at name="properties"> |
|
723 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
724 |
<at name="border"> |
|
725 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
726 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
727 |
<at name="name">border</at> |
|
728 |
</super> |
|
729 |
<at name="borders"> |
|
730 |
<object classname="java.util.LinkedList"> |
|
731 |
<item > |
|
732 |
<at name="value"> |
|
733 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
734 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
735 |
<at name="name">border</at> |
|
736 |
</super> |
|
737 |
<at name="top">0</at> |
|
738 |
<at name="left">0</at> |
|
739 |
<at name="bottom">0</at> |
|
740 |
<at name="right">0</at> |
|
741 |
</object> |
|
742 |
</at> |
|
743 |
</item> |
|
744 |
</object> |
|
745 |
</at> |
|
746 |
</object> |
|
747 |
</at> |
|
748 |
<at name="name">btnConfig</at> |
|
749 |
<at name="width">12</at> |
|
750 |
<at name="enabled">false</at> |
|
751 |
<at name="height">20</at> |
|
752 |
</object> |
|
753 |
</at> |
|
754 |
</object> |
|
755 |
</at> |
|
756 |
</object> |
|
757 |
</at> |
|
758 |
</item> |
|
759 | 827 |
</object> |
760 | 828 |
</at> |
761 | 829 |
<at name="properties"> |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.ui/src/main/java/org/gvsig/webbrowser/jfx/JFXWebBrowserManager.java | ||
---|---|---|
1 |
package org.gvsig.webbrowser.jfx; |
|
2 |
|
|
3 |
import org.gvsig.tools.util.ToolsUtilLocator; |
|
4 |
import org.gvsig.webbrowser.WebBrowserPanel; |
|
5 |
import org.gvsig.webbrowser.WebBrowserManager; |
|
6 |
import org.slf4j.Logger; |
|
7 |
import org.slf4j.LoggerFactory; |
|
8 |
|
|
9 |
/** |
|
10 |
* |
|
11 |
* @author gvSIG Team |
|
12 |
*/ |
|
13 |
public class JFXWebBrowserManager implements WebBrowserManager { |
|
14 |
|
|
15 |
protected static final Logger LOGGER = LoggerFactory.getLogger(JFXWebBrowserManager.class); |
|
16 |
|
|
17 |
private static WebBrowserManager prevManager; |
|
18 |
|
|
19 |
@Override |
|
20 |
public WebBrowserPanel createWebBrowserPanel() { |
|
21 |
try { |
|
22 |
return new JFXWebBrowserPanel(); |
|
23 |
} catch(Throwable t) { |
|
24 |
LOGGER.warn("Can't create JFXWebBrowser",t); |
|
25 |
return prevManager.createWebBrowserPanel(); |
|
26 |
} |
|
27 |
} |
|
28 |
|
|
29 |
public static final void selfRegister() { |
|
30 |
prevManager = ToolsUtilLocator.getWebBrowserManager(); |
|
31 |
ToolsUtilLocator.registerWebBrowserManager(JFXWebBrowserManager.class); |
|
32 |
} |
|
33 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.ui/src/main/java/org/gvsig/webbrowser/jfx/JFXWebBrowserPanelView.java | ||
---|---|---|
24 | 24 |
{ |
25 | 25 |
JTextField txtURL = new JTextField(); |
26 | 26 |
JPanel containerBrowser = new JPanel(); |
27 |
JButton btnPrevious = new JButton(); |
|
28 |
JButton btnNext = new JButton(); |
|
29 |
JButton btnRefresh = new JButton(); |
|
30 |
JButton btnConfig = new JButton(); |
|
27 | 31 |
JTextField txtSearch = new JTextField(); |
28 | 32 |
JLabel lblStatus = new JLabel(); |
29 | 33 |
ImageComponent imgSearch = new ImageComponent(); |
30 | 34 |
JButton btnSearchNext = new JButton(); |
31 | 35 |
JButton btnSearchPrevious = new JButton(); |
32 |
JButton btnPrevious = new JButton(); |
|
33 |
JButton btnNext = new JButton(); |
|
34 |
JButton btnRefresh = new JButton(); |
|
35 |
JButton btnConfig = new JButton(); |
|
36 | 36 |
|
37 | 37 |
/** |
38 | 38 |
* Default constructor |
... | ... | |
134 | 134 |
containerBrowser.setName("containerBrowser"); |
135 | 135 |
jpanel1.add(containerBrowser,new CellConstraints(2,4,9,1,CellConstraints.FILL,CellConstraints.FILL)); |
136 | 136 |
|
137 |
jpanel1.add(createPanel1(),cc.xywh(2,6,9,1));
|
|
137 |
btnPrevious.setIcon(loadImage("addons/Catalog/repository/webbrowser-previous.png"));
|
|
138 | 138 |
btnPrevious.setName("btnPrevious"); |
139 |
btnPrevious.setOpaque(false); |
|
139 | 140 |
EmptyBorder emptyborder1 = new EmptyBorder(0,0,0,0); |
140 | 141 |
btnPrevious.setBorder(emptyborder1); |
141 | 142 |
jpanel1.add(btnPrevious,new CellConstraints(2,2,1,1,CellConstraints.FILL,CellConstraints.FILL)); |
142 | 143 |
|
144 |
btnNext.setIcon(loadImage("addons/Catalog/repository/webbrowser-next.png")); |
|
143 | 145 |
btnNext.setName("btnNext"); |
146 |
btnNext.setOpaque(false); |
|
144 | 147 |
EmptyBorder emptyborder2 = new EmptyBorder(0,0,0,0); |
145 | 148 |
btnNext.setBorder(emptyborder2); |
146 | 149 |
jpanel1.add(btnNext,new CellConstraints(4,2,1,1,CellConstraints.FILL,CellConstraints.FILL)); |
147 | 150 |
|
148 | 151 |
btnRefresh.setEnabled(false); |
152 |
btnRefresh.setIcon(loadImage("addons/Catalog/repository/webbrowser-refresh.png")); |
|
149 | 153 |
btnRefresh.setName("btnRefresh"); |
154 |
btnRefresh.setOpaque(false); |
|
150 | 155 |
EmptyBorder emptyborder3 = new EmptyBorder(0,0,0,0); |
151 | 156 |
btnRefresh.setBorder(emptyborder3); |
152 | 157 |
jpanel1.add(btnRefresh,new CellConstraints(6,2,1,1,CellConstraints.FILL,CellConstraints.FILL)); |
153 | 158 |
|
154 | 159 |
btnConfig.setEnabled(false); |
160 |
btnConfig.setIcon(loadImage("addons/Catalog/repository/webbrowser-config.png")); |
|
155 | 161 |
btnConfig.setName("btnConfig"); |
162 |
btnConfig.setOpaque(false); |
|
156 | 163 |
EmptyBorder emptyborder4 = new EmptyBorder(0,0,0,0); |
157 | 164 |
btnConfig.setBorder(emptyborder4); |
158 | 165 |
jpanel1.add(btnConfig,new CellConstraints(10,2,1,1,CellConstraints.FILL,CellConstraints.FILL)); |
159 | 166 |
|
167 |
jpanel1.add(createPanel1(),cc.xywh(2,6,9,1)); |
|
160 | 168 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8,9,10,11 },new int[]{ 1,2,3,4,5,6,7 }); |
161 | 169 |
return jpanel1; |
162 | 170 |
} |
... | ... | |
172 | 180 |
jpanel1.add(txtSearch,cc.xy(3,1)); |
173 | 181 |
|
174 | 182 |
lblStatus.setName("lblStatus"); |
175 |
LineBorder lineborder1 = new LineBorder(new Color(189,190,176),1,false);
|
|
183 |
LineBorder lineborder1 = new LineBorder(new Color(164,164,164),1,false);
|
|
176 | 184 |
lblStatus.setBorder(lineborder1); |
177 | 185 |
jpanel1.add(lblStatus,new CellConstraints(9,1,1,1,CellConstraints.FILL,CellConstraints.FILL)); |
178 | 186 |
|
187 |
imgSearch.setIcon(loadImage("addons/Catalog/repository/webbrowser-search.png")); |
|
179 | 188 |
imgSearch.setName("imgSearch"); |
180 | 189 |
jpanel1.add(imgSearch,cc.xy(1,1)); |
181 | 190 |
|
191 |
btnSearchNext.setIcon(loadImage("addons/Catalog/repository/webbrowser-search-next.png")); |
|
182 | 192 |
btnSearchNext.setName("btnSearchNext"); |
193 |
btnSearchNext.setOpaque(false); |
|
183 | 194 |
EmptyBorder emptyborder1 = new EmptyBorder(0,0,0,0); |
184 | 195 |
btnSearchNext.setBorder(emptyborder1); |
185 | 196 |
jpanel1.add(btnSearchNext,cc.xy(5,1)); |
186 | 197 |
|
198 |
btnSearchPrevious.setIcon(loadImage("addons/Catalog/repository/webbrowser-search-previous.png")); |
|
187 | 199 |
btnSearchPrevious.setName("btnSearchPrevious"); |
200 |
btnSearchPrevious.setOpaque(false); |
|
188 | 201 |
EmptyBorder emptyborder2 = new EmptyBorder(0,0,0,0); |
189 | 202 |
btnSearchPrevious.setBorder(emptyborder2); |
190 | 203 |
jpanel1.add(btnSearchPrevious,cc.xy(7,1)); |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.ui/src/main/java/org/gvsig/webbrowser/jfx/JFXWebBrowser.java | ||
---|---|---|
1 |
/* |
|
2 |
* To change this license header, choose License Headers in Project Properties. |
|
3 |
* To change this template file, choose Tools | Templates |
|
4 |
* and open the template in the editor. |
|
5 |
*/ |
|
6 |
package org.gvsig.webbrowser.jfx; |
|
7 |
|
|
8 |
import java.net.URL; |
|
9 |
import java.text.MessageFormat; |
|
10 |
import javafx.application.Platform; |
|
11 |
import javafx.beans.value.ChangeListener; |
|
12 |
import javafx.beans.value.ObservableValue; |
|
13 |
import javafx.concurrent.Worker; |
|
14 |
import javafx.embed.swing.JFXPanel; |
|
15 |
import javafx.event.EventHandler; |
|
16 |
import javafx.scene.Scene; |
|
17 |
import javafx.scene.web.WebEngine; |
|
18 |
import javafx.scene.web.WebEvent; |
|
19 |
import javafx.scene.web.WebView; |
|
20 |
import javax.swing.JComponent; |
|
21 |
import org.gvsig.webbrowser.WebBrowserPanel; |
|
22 |
|
|
23 |
/** |
|
24 |
* |
|
25 |
* @author jjdelcerro |
|
26 |
*/ |
|
27 |
class JFXWebBrowser extends JFXPanel implements WebBrowserPanel.WebBrowser { |
|
28 |
|
|
29 |
private static final long serialVersionUID = 3021277085276506035L; |
|
30 |
private WebView view; |
|
31 |
private WebEngine engine; |
|
32 |
private Scene scene; |
|
33 |
private final WebBrowserPanel webBrowserPanel; |
|
34 |
|
|
35 |
private class MyEventHandler implements EventHandler<WebEvent<String>> { |
|
36 |
|
|
37 |
@Override |
|
38 |
public void handle(WebEvent<String> event) { |
|
39 |
if (event.getEventType() == WebEvent.STATUS_CHANGED) { |
|
40 |
String s = event.getData(); |
|
41 |
if (s == null) { |
|
42 |
webBrowserPanel.setURLText(""); |
|
43 |
} else { |
|
44 |
webBrowserPanel.setURLText(s); |
|
45 |
} |
|
46 |
} |
|
47 |
} |
|
48 |
} |
|
49 |
|
|
50 |
private class MyChangeListener implements ChangeListener<Worker.State> { |
|
51 |
|
|
52 |
@Override |
|
53 |
public void changed(ObservableValue<? extends Worker.State> ov, Worker.State oldState, Worker.State newState) { |
|
54 |
if (newState == Worker.State.SUCCEEDED) { |
|
55 |
webBrowserPanel.setURLText(engine.getLocation()); |
|
56 |
} |
|
57 |
} |
|
58 |
} |
|
59 |
|
|
60 |
public JFXWebBrowser(WebBrowserPanel webBrowserPanel) { |
|
61 |
this.webBrowserPanel = webBrowserPanel; |
|
62 |
this.view = null; |
|
63 |
this.engine = null; |
|
64 |
this.scene = null; |
|
65 |
Platform.runLater(new Runnable() { |
|
66 |
@Override |
|
67 |
public void run() { |
|
68 |
createScene(); |
|
69 |
} |
|
70 |
}); |
|
71 |
Platform.setImplicitExit(false); |
|
72 |
} |
|
73 |
|
|
74 |
private void createScene() { |
|
75 |
this.view = new WebView(); |
|
76 |
this.engine = this.view.getEngine(); |
|
77 |
this.engine.setOnStatusChanged(new MyEventHandler()); |
|
78 |
this.engine.getLoadWorker().stateProperty().addListener(new MyChangeListener()); |
|
79 |
this.engine.setJavaScriptEnabled(true); |
|
80 |
this.scene = new Scene(this.view); |
|
81 |
this.setScene(this.scene); |
|
82 |
} |
|
83 |
|
|
84 |
private void load(URL url) { |
|
85 |
this.engine.load(url.toString()); |
|
86 |
this.revalidate(); |
|
87 |
} |
|
88 |
|
|
89 |
private void loadContent(String content, String contentType) { |
|
90 |
this.engine.loadContent(content, contentType); |
|
91 |
this.revalidate(); |
|
92 |
} |
|
93 |
|
|
94 |
private void goHistory(int index) { |
|
95 |
this.engine.getHistory().go(index); |
|
96 |
} |
|
97 |
|
|
98 |
public void setPage(final URL url) { |
|
99 |
Platform.runLater(new Runnable() { |
|
100 |
@Override |
|
101 |
public void run() { |
|
102 |
load(url); |
|
103 |
} |
|
104 |
}); |
|
105 |
} |
|
106 |
|
|
107 |
public void setContent(final String content, final String contentType) { |
|
108 |
Platform.runLater(new Runnable() { |
|
109 |
@Override |
|
110 |
public void run() { |
|
111 |
loadContent(content, contentType); |
|
112 |
} |
|
113 |
}); |
|
114 |
} |
|
115 |
|
|
116 |
public void goPrevious() { |
|
117 |
Platform.runLater(new Runnable() { |
|
118 |
@Override |
|
119 |
public void run() { |
|
120 |
goHistory(-1); |
|
121 |
} |
|
122 |
}); |
|
123 |
} |
|
124 |
|
|
125 |
public void goNext() { |
|
126 |
Platform.runLater(new Runnable() { |
|
127 |
@Override |
|
128 |
public void run() { |
|
129 |
goHistory(1); |
|
130 |
} |
|
131 |
}); |
|
132 |
} |
|
133 |
|
|
134 |
public String getPage() { |
|
135 |
return this.engine.getLocation(); |
|
136 |
} |
|
137 |
|
|
138 |
public String getTitle() { |
|
139 |
return this.engine.getTitle(); |
|
140 |
} |
|
141 |
|
|
142 |
public Object executeScript(String js) { |
|
143 |
Object r = this.engine.executeScript(js); |
|
144 |
return r; |
|
145 |
} |
|
146 |
|
|
147 |
public void find(final String text, final boolean backwards) { |
|
148 |
try { |
|
149 |
Platform.runLater(new Runnable() { |
|
150 |
@Override |
|
151 |
public void run() { |
|
152 |
String script = MessageFormat.format("window.find(\"{0}\",false,{1},true)", text, backwards ? "true" : "false"); |
|
153 |
} |
|
154 |
}); |
|
155 |
} catch (Throwable th) { |
|
156 |
} |
|
157 |
} |
|
158 |
|
|
159 |
@Override |
|
160 |
public JComponent asJComponent() { |
|
161 |
return this; |
|
162 |
} |
|
163 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.ui/src/main/java/org/gvsig/webbrowser/jfx/JFXWebBrowserPanel.java | ||
---|---|---|
8 | 8 |
import java.awt.event.KeyEvent; |
9 | 9 |
import java.net.MalformedURLException; |
10 | 10 |
import java.net.URL; |
11 |
import java.text.MessageFormat; |
|
12 |
import org.gvsig.webbrowser.WebBrowserPanel; |
|
13 |
import javafx.event.EventHandler; |
|
14 |
import javafx.beans.value.ChangeListener; |
|
15 |
import javafx.beans.value.ObservableValue; |
|
16 |
import javafx.application.Platform; |
|
17 |
import javafx.concurrent.Worker; |
|
18 |
import javafx.embed.swing.JFXPanel; |
|
19 |
import javafx.scene.web.WebView; |
|
20 |
import javafx.scene.Scene; |
|
21 |
import javafx.scene.web.WebEngine; |
|
22 |
import javafx.scene.web.WebEvent; |
|
23 | 11 |
import javax.swing.ImageIcon; |
24 | 12 |
import javax.swing.JComponent; |
25 | 13 |
import javax.swing.JTextField; |
14 |
import javax.swing.SwingUtilities; |
|
15 |
import org.gvsig.tools.swing.api.ToolsSwingUtils; |
|
16 |
import org.gvsig.webbrowser.WebBrowserPanel; |
|
17 |
import org.slf4j.Logger; |
|
18 |
import org.slf4j.LoggerFactory; |
|
26 | 19 |
|
27 | 20 |
public class JFXWebBrowserPanel extends JFXWebBrowserPanelView implements WebBrowserPanel { |
21 |
|
|
22 |
protected static final Logger LOGGER = LoggerFactory.getLogger(JFXWebBrowserPanel.class); |
|
28 | 23 |
|
29 |
private static final long serialVersionUID = -5048314340699267249L;
|
|
24 |
private WebBrowserPanel.WebBrowser browser;
|
|
30 | 25 |
|
31 |
private JFXWebBrowser browser; |
|
32 | 26 |
|
33 |
private class JFXWebBrowser extends JFXPanel { |
|
34 |
|
|
35 |
private static final long serialVersionUID = 3021277085276506035L; |
|
36 |
|
|
37 |
private WebView view; |
|
38 |
private WebEngine engine; |
|
39 |
private Scene scene; |
|
40 |
|
|
41 |
private class MyEventHandler implements EventHandler<WebEvent<String>> { |
|
42 |
|
|
43 |
@Override |
|
44 |
public void handle(WebEvent<String> event) { |
|
45 |
if( event.getEventType() == WebEvent.STATUS_CHANGED ) { |
|
46 |
String s = event.getData(); |
|
47 |
if( s == null ) { |
|
48 |
lblStatus.setText(""); |
|
49 |
} else { |
|
50 |
lblStatus.setText(s); |
|
51 |
} |
|
52 |
|
|
53 |
} |
|
54 |
} |
|
55 |
} |
|
56 |
|
|
57 |
private class MyChangeListener implements ChangeListener<Worker.State> { |
|
58 |
|
|
59 |
@Override |
|
60 |
public void changed(ObservableValue<? extends Worker.State> ov, Worker.State oldState, Worker.State newState) { |
|
61 |
if( newState == Worker.State.SUCCEEDED ) { |
|
62 |
txtURL.setText(engine.getLocation()); |
|
63 |
} |
|
64 |
} |
|
65 |
} |
|
66 |
|
|
67 |
public JFXWebBrowser() { |
|
68 |
this.view = null; |
|
69 |
this.engine = null; |
|
70 |
this.scene = null; |
|
71 |
|
|
72 |
Platform.runLater(new Runnable() { |
|
73 |
@Override |
|
74 |
public void run() { |
|
75 |
createScene(); |
|
76 |
} |
|
77 |
}); |
|
78 |
Platform.setImplicitExit(false); |
|
79 |
} |
|
80 |
|
|
81 |
private void createScene() { |
|
82 |
this.view = new WebView(); |
|
83 |
this.engine = this.view.getEngine(); |
|
84 |
this.engine.setOnStatusChanged(new MyEventHandler()); |
|
85 |
this.engine.getLoadWorker().stateProperty().addListener(new MyChangeListener()); |
|
86 |
this.engine.setJavaScriptEnabled(true); |
|
87 |
this.scene = new Scene(this.view); |
|
88 |
this.setScene(this.scene); |
|
89 |
} |
|
90 |
|
|
91 |
private void load(URL url) { |
|
92 |
this.engine.load(url.toString()); |
|
93 |
this.revalidate(); |
|
94 |
} |
|
95 |
|
|
96 |
private void loadContent(String content, String contentType) { |
|
97 |
this.engine.loadContent(content, contentType); |
|
98 |
this.revalidate(); |
|
99 |
} |
|
100 |
|
|
101 |
private void goHistory(int index) { |
|
102 |
this.engine.getHistory().go(index); |
|
103 |
} |
|
104 |
|
|
105 |
public void setPage(final URL url) { |
|
106 |
Platform.runLater(new Runnable() { |
|
107 |
@Override |
|
108 |
public void run() { |
|
109 |
load(url); |
|
110 |
} |
|
111 |
}); |
|
112 |
} |
|
113 |
|
|
114 |
public void setContent(final String content, final String contentType) { |
|
115 |
Platform.runLater(new Runnable() { |
|
116 |
@Override |
|
117 |
public void run() { |
|
118 |
loadContent(content, contentType); |
|
119 |
} |
|
120 |
}); |
|
121 |
} |
|
122 |
|
|
123 |
public void goPrevious() { |
|
124 |
Platform.runLater(new Runnable() { |
|
125 |
@Override |
|
126 |
public void run() { |
|
127 |
goHistory(-1); |
|
128 |
} |
|
129 |
}); |
|
130 |
} |
|
131 |
|
|
132 |
public void goNext() { |
|
133 |
Platform.runLater(new Runnable() { |
|
134 |
@Override |
|
135 |
public void run() { |
|
136 |
goHistory(1); |
|
137 |
} |
|
138 |
}); |
|
139 |
} |
|
140 |
|
|
141 |
public String getPage() { |
|
142 |
return this.engine.getLocation(); |
|
143 |
} |
|
144 |
|
|
145 |
public String getTitle() { |
|
146 |
return this.engine.getTitle(); |
|
147 |
} |
|
148 |
|
|
149 |
public Object executeScript(String js) { |
|
150 |
Object r = this.engine.executeScript(js); |
|
151 |
return r; |
|
152 |
} |
|
153 |
|
|
154 |
public void find(final String text, final boolean backwards) { |
|
155 |
try { |
|
156 |
Platform.runLater(new Runnable() { |
|
157 |
@Override |
|
158 |
public void run() { |
|
159 |
String script = MessageFormat.format( |
|
160 |
"window.find(\"{0}\",false,{1},true)", |
|
161 |
text, |
|
162 |
backwards ? "true" : "false" |
|
163 |
); |
|
164 |
|
|
165 |
} |
|
166 |
}); |
|
167 |
} catch (Throwable th) { |
|
168 |
|
|
169 |
} |
|
170 |
} |
|
171 |
|
|
172 |
} |
|
173 |
|
|
174 | 27 |
public JFXWebBrowserPanel() { |
175 | 28 |
this.initComponents(); |
176 | 29 |
} |
177 | 30 |
|
31 |
protected WebBrowserPanel.WebBrowser createBrowserPanel() { |
|
32 |
return new JFXWebBrowser(this); |
|
33 |
} |
|
34 |
|
|
178 | 35 |
private void initComponents() { |
179 |
this.browser = new JFXWebBrowser();
|
|
36 |
this.browser = this.createBrowserPanel() ;
|
|
180 | 37 |
this.containerBrowser.setLayout(new BorderLayout()); |
181 |
this.containerBrowser.add(this.browser, BorderLayout.CENTER); |
|
182 |
|
|
183 |
this.btnPrevious.setIcon(imageIcon("images/arrow_left.png")); |
|
184 |
this.btnNext.setIcon(imageIcon("images/arrow_right.png")); |
|
185 |
this.btnRefresh.setIcon(imageIcon("images/arrow_refresh.png")); |
|
186 |
this.btnConfig.setIcon(imageIcon("images/add.png")); |
|
187 |
this.btnSearchPrevious.setIcon(imageIcon("images/arrow_up.png")); |
|
188 |
this.btnSearchNext.setIcon(imageIcon("images/arrow_down.png")); |
|
189 |
this.imgSearch.setIcon(imageIcon("images/search.png")); |
|
190 |
|
|
38 |
this.containerBrowser.add(this.browser.asJComponent(), BorderLayout.CENTER); |
|
191 | 39 |
this.txtURL.addKeyListener(new KeyAdapter() { |
192 | 40 |
@Override |
193 | 41 |
public void keyPressed(KeyEvent keyEvent) { |
... | ... | |
235 | 83 |
this.setPreferredSize(new Dimension(600, 500)); |
236 | 84 |
} |
237 | 85 |
|
238 |
private ImageIcon imageIcon(String res) { |
|
239 |
URL url = this.getClass().getResource(res); |
|
240 |
if( url == null ) { |
|
241 |
return new ImageIcon(); |
|
242 |
} |
|
243 |
return new ImageIcon(url); |
|
244 |
} |
|
245 |
|
|
246 | 86 |
@Override |
247 | 87 |
public void setPage(String url) { |
248 | 88 |
try { |
... | ... | |
253 | 93 |
} |
254 | 94 |
|
255 | 95 |
@Override |
256 |
public void setPage(URL url) { |
|
96 |
public void setPage(final URL url) {
|
|
257 | 97 |
this.txtURL.setText(url.toString()); |
258 |
this.browser.setPage(url); |
|
98 |
SwingUtilities.invokeLater(new Runnable() { |
|
99 |
@Override |
|
100 |
public void run() { |
|
101 |
try { |
|
102 |
browser.setPage(url); |
|
103 |
} catch (Exception ex) { |
|
104 |
LOGGER.warn("Can't load page from url '" + url + "'.", ex); |
|
105 |
} |
|
106 |
} |
|
107 |
}); |
|
259 | 108 |
} |
260 | 109 |
|
261 | 110 |
@Override |
... | ... | |
277 | 126 |
public JComponent asJComponent() { |
278 | 127 |
return this; |
279 | 128 |
} |
129 |
|
|
130 |
@Override |
|
131 |
public ImageIcon loadImage(String imageName) { |
|
132 |
return ToolsSwingUtils.loadImage(this, imageName); |
|
133 |
} |
|
134 |
|
|
135 |
@Override |
|
136 |
public void setStatus(String msg) { |
|
137 |
this.lblStatus.setText(msg); |
|
138 |
} |
|
139 |
|
|
140 |
@Override |
|
141 |
public void setURLText(String url) { |
|
142 |
this.txtURL.setText(url); |
|
143 |
} |
|
144 |
|
|
280 | 145 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.ui/src/main/java/org/gvsig/webbrowser/WebBrowserFactory.java | ||
---|---|---|
3 | 3 |
|
4 | 4 |
import org.gvsig.webbrowser.jfx.JFXWebBrowserPanel; |
5 | 5 |
|
6 |
|
|
6 |
@Deprecated |
|
7 | 7 |
public class WebBrowserFactory { |
8 | 8 |
|
9 |
@Deprecated |
|
9 | 10 |
public static WebBrowserPanel createWebBrowserPanel() { |
10 | 11 |
return new JFXWebBrowserPanel(); |
11 | 12 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.ui/src/main/java/org/gvsig/ui/UILibraryImpl.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 gvSIG Association. |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or modify it under |
|
7 |
* the terms of the GNU General Public License as published by the Free Software |
|
8 |
* Foundation; either version 2 of the License, or (at your option) any later |
|
9 |
* version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
|
13 |
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
|
14 |
* details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License along with |
|
17 |
* this program; if not, write to the Free Software Foundation, Inc., 51 |
|
18 |
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us at info AT |
|
21 |
* gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.ui; |
|
24 |
|
|
25 |
import org.gvsig.tools.library.AbstractLibrary; |
|
26 |
import org.gvsig.tools.library.LibraryException; |
|
27 |
import org.gvsig.tools.util.ToolsUtilLibrary; |
|
28 |
import org.gvsig.webbrowser.jfx.JFXWebBrowserManager; |
|
29 |
|
|
30 |
public class UILibraryImpl extends AbstractLibrary { |
|
31 |
|
|
32 |
@Override |
|
33 |
public void doRegistration() { |
|
34 |
this.require(ToolsUtilLibrary.class); |
|
35 |
} |
|
36 |
|
|
37 |
@Override |
|
38 |
protected void doInitialize() throws LibraryException { |
|
39 |
JFXWebBrowserManager.selfRegister(); |
|
40 |
} |
|
41 |
|
|
42 |
@Override |
|
43 |
protected void doPostInitialize() throws LibraryException { |
|
44 |
|
|
45 |
} |
|
46 |
|
|
47 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.ui/src/main/resources/text_zh.properties | ||
---|---|---|
1 |
#Translations for language [zh] |
|
2 |
#Mon Sep 21 10:02:19 CEST 2009 |
|
3 |
a_panel= |
|
4 |
abrir...= |
|
5 |
aceptar=\u786e\u5b9a |
|
6 |
Anadir_al_conjunto=\u6dfb\u52a0\u5230\u7cfb\u5217\u4e2d |
|
7 |
anterior=\u540e\u9000 |
|
8 |
aplicar= |
|
9 |
ayuda= |
|
10 |
ayuda_0= |
|
11 |
ayuda_1_5= |
|
12 |
ayuda_background= |
|
13 |
ayuda_c= |
|
14 |
ayuda_h= |
|
15 |
ayuda_more_less= |
|
16 |
ayuda_wheel= |
|
17 |
bajar= |
|
18 |
borrar_todos= |
|
19 |
borrar_uno= |
|
20 |
calendarBackOneMonth= |
|
21 |
calendarBackOneYear= |
|
22 |
calendarForwardOneMonth= |
|
23 |
calendarForwardOneYear= |
|
24 |
calendarSelectDate= |
|
25 |
calendarTitle= |
|
26 |
cancel=\u53d6\u6d88 |
|
27 |
cancelar=\u53d6\u6d88 |
|
28 |
cannot_get_double_value_from_an_integer_number_field_use_getInteger()_instead= |
|
29 |
cannot_set_a_double_value_from_an_integer_number_field_use_setInteger(int)_instead= |
|
30 |
cerrar=\u5173\u95ed |
|
31 |
date_button_explanation= |
|
32 |
de= |
|
33 |
de\ 0= |
|
34 |
deleteText= |
|
35 |
deleteText_on_filter_use_explanation= |
|
36 |
edit_copy= |
|
37 |
edit_cut= |
|
38 |
edit_delete= |
|
39 |
edit_paste= |
|
40 |
edit_redo= |
|
41 |
edit_select_all= |
|
42 |
edit_undo= |
|
43 |
Error= |
|
44 |
espere=\u8bf7\u7b49\u5f85 |
|
45 |
Failed_pausing_the_process= |
|
46 |
Failed_resuming_the_process= |
|
47 |
Failed_the_process= |
|
48 |
fields_uppercase_first= |
|
49 |
filter_by_sentence= |
|
50 |
filter_of_Table= |
|
51 |
filtros= |
|
52 |
guardar=\u5b58\u76d8 |
|
53 |
Information= |
|
54 |
known_values= |
|
55 |
msg_cancel_incrementable= |
|
56 |
no=\u5426 |
|
57 |
No= |
|
58 |
no_image_available= |
|
59 |
nuevo=\u65b0\u5efa |
|
60 |
Nuevo_conjunto=\u65b0\u5efa\u7cfb\u5217 |
|
61 |
numero_incorrecto=\u6570\u636e\u4e0d\u6b63\u786e |
|
62 |
ocultardetalles= |
|
63 |
ok=\u786e\u5b9a |
|
64 |
Open= |
|
65 |
open_file= |
|
66 |
operator_and_explanation= |
|
67 |
operator_distinct_explanation= |
|
68 |
operator_equal_explanation= |
|
69 |
operator_equal_greater_explanation= |
|
70 |
operator_equal_smaller_explanation= |
|
71 |
operator_greater_explanation= |
|
72 |
operator_not_explanation= |
|
73 |
operator_or_explanation= |
|
74 |
operator_smaller_explanation= |
|
75 |
panel_adding_exception= |
|
76 |
panel_loading_exception= |
|
77 |
parenthesis_explanation= |
|
78 |
pausar= |
|
79 |
Percent= |
|
80 |
primero= |
|
81 |
Process_canceled= |
|
82 |
Process_failed= |
|
83 |
Process_finished= |
|
84 |
Process_finished_wont_be_cancelled= |
|
85 |
reanudar= |
|
86 |
registro= |
|
87 |
salir=\u9000\u51fa |
|
88 |
seleccion_alpha= |
|
89 |
Seleccionar_del_conjunto=\u4ece\u7cfb\u5217\u4e2d\u9009\u62e9 |
|
90 |
select_color= |
|
91 |
si=\u662f |
|
92 |
siguiente=\u7ee7\u7eed |
|
93 |
subir= |
|
94 |
teclas= |
|
95 |
text_preview_text= |
|
96 |
the_panel= |
|
97 |
The_process_cant_be_cancelled= |
|
98 |
The_process_cant_be_paused= |
|
99 |
tiempo_transcurrido= |
|
100 |
title_cancel_incrementable= |
|
101 |
ultimo= |
|
102 |
validate_expression= |
|
103 |
validate_filter_expression_explanation= |
|
104 |
verdetalles= |
|
105 |
Warning= |
|
106 |
write_here_a_filter_expression= |
|
107 |
Yes= |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.ui/src/main/resources/text_ca.properties | ||
---|---|---|
1 |
#Translations for language [ca] |
|
2 |
#Mon Sep 21 10:02:19 CEST 2009 |
|
3 |
a_panel=un panell |
|
4 |
abrir...= |
|
5 |
aceptar=Acceptar |
|
6 |
Anadir_al_conjunto=Afegir al conjunt |
|
7 |
anterior=Anterior |
|
8 |
aplicar=Aplicar |
|
9 |
ayuda=Ajuda |
|
10 |
ayuda_0=Espai, 0\: veure-ho tot |
|
11 |
ayuda_1_5=1-5\: Zoom 1-5 |
|
12 |
ayuda_background=B\: Mostrar/Ocultar fons |
|
13 |
ayuda_c=C\: centrar |
|
14 |
ayuda_h=H\: esta ajuda |
|
15 |
ayuda_more_less=+/-\: Zoom +/- |
|
16 |
ayuda_wheel=Roda ratol\u00ed\: Zoom +/- |
|
17 |
bajar= |
|
18 |
borrar_todos=Esborrar tots els punts |
|
19 |
borrar_uno=Esborrar punt seleccionat |
|
20 |
calendarBackOneMonth=Retrocedix un mes |
|
21 |
calendarBackOneYear=Retrocedix un any |
|
22 |
calendarForwardOneMonth=Avan\u00e7a un mes |
|
23 |
calendarForwardOneYear=Avan\u00e7a un any |
|
24 |
calendarSelectDate=Seleccione una data |
|
25 |
calendarTitle=Calendari |
|
26 |
Campos=Camps |
|
27 |
cancel=Cancel\u00b7lar |
|
28 |
cancelar=Cancel\u00b7lar |
|
29 |
cannot_get_double_value_from_an_integer_number_field_use_getInteger()_instead= |
|
30 |
cannot_set_a_double_value_from_an_integer_number_field_use_setInteger(int)_instead= |
|
31 |
cerrar=Tancar |
|
32 |
date_button_explanation=Permet seleccionar una data |
|
33 |
de=de |
|
34 |
de\ 0=de 0 |
|
35 |
deleteText=Esborrar text |
|
36 |
deleteText_on_filter_use_explanation=Esborrar la sent\u00e8ncia del filtratge |
|
37 |
edit_copy=Copiar |
|
38 |
edit_cut=Tallar |
|
39 |
edit_delete=Eliminar |
|
40 |
edit_paste=Apegar |
|
41 |
edit_redo=Refer |
|
42 |
edit_select_all=Seleccionar tot |
|
43 |
edit_undo=Desfer |
|
44 |
Error=Error |
|
45 |
errorMessageJComboBoxItemsSeekerConfigurable=Configuraci\u00f3 del comportament inv\u00e0lida. |
|
46 |
espere=Per favor, espereu |
|
47 |
exportJOP2Title=Exportar a JOP2T |
|
48 |
Failed_pausing_the_process=Ha fallat en pausar el proc\u00e9s. |
|
49 |
Failed_resuming_the_process=Ha fallat en reprendre el proc\u00e9s. |
|
50 |
Failed_the_process=Ha fallat el proc\u00e9s. |
|
51 |
fields_uppercase_first=Camps |
|
52 |
filter_by_sentence=Filtratge per sent\u00e8ncia |
|
53 |
filter_of_Table=Filtre de taula |
|
54 |
filterOnAWFSLayer= |
|
55 |
filtros=Filtres |
|
56 |
guardar=Guardar |
|
57 |
Information=Informaci\u00f3 |
|
58 |
known_values=Valors coneguts |
|
59 |
msg_cancel_incrementable=Est\u00e0 segur que vol cancel\u00b7lar este proc\u00e9s? |
|
60 |
no=No |
|
61 |
No=No |
|
62 |
no_image_available=Imatge no disponible. |
|
63 |
nuevo=Nou |
|
64 |
Nuevo_conjunto=Nou conjunt |
|
65 |
numero_incorrecto=N\u00famero incorrecte |
|
66 |
ocultardetalles=Ocultar detalls |
|
67 |
ok=D'acord |
|
68 |
Open= |
|
69 |
open_file=Obrir arxiu |
|
70 |
operator_and_explanation=Operador Y.\nActua com una intersecci\u00f3 en conjunts;\nsin\u00f3, com a operador l\u00f2gic, d\u00f3na cert si\nambd\u00f3s operants s\u00f3n certs. |
|
71 |
operator_distinct_explanation=Operador DISTINT DE.\nActua seleccionant aquells elements que\nno coincidixen entre ambd\u00f3s conjunts. |
|
72 |
operator_equal_explanation=Operador IGUAL.\nActua seleccionant aquell elements\nque coincidixen entre ambd\u00f3s conjunts. |
|
73 |
operator_equal_greater_explanation=Operador MAJOR O IGUAL QUE.\nActua seleccionant aquells elements de\nl'operant/conjunt a l'esquerra de l'operador\nque tenen major o igual valor que el de la seua dreta. |
|
74 |
operator_equal_smaller_explanation=Operador MENOR O IGUAL QUE.\nActua seleccionant aquells elements de\nl'operant/conjunt a l'esquerra de l'operador\nque tenen menor o igual valor que el de la seua dreta. |
|
75 |
operator_greater_explanation=Operador MAJOR QUE.\nActua seleccionant aquells elements de\nl'operant/conjunt a l'esquerra de l'operador que\ntenen major valor que el de la seua dreta. |
|
76 |
operator_not_explanation=Operador NO.\nActua com un complementari en conjunts;\nsin\u00f3, com a operador l\u00f2gic, canvi cert\nper fals o viceversa. |
|
77 |
operator_or_explanation=Operador O.\nActua com una uni\u00f3 en conjunts;\nsin\u00f3, com a operador l\u00f2gic, d\u00f3na fals si\nambd\u00f3s operandos s\u00f3n falsos. |
|
78 |
operator_smaller_explanation=Operador MENOR QUE.\nActua seleccionant aquells elements de\nl'operant/conjunt a l'esquerra de l'operador\nque tenen menor valor que el de la seua dreta. |
|
79 |
panel_adding_exception=Error en agregar capa\: |
|
80 |
panel_loading_exception=Error en carregar capa\: |
|
81 |
parenthesis_explanation=Afig els s\u00edmbols par\u00e8ntesis.\n(\u00datil per a agrupar operacions). |
Also available in: Unified diff