Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #31303 > unrolled thread

JFXPanel with WebView JavaScript

Started byPhilipp Kraus <philipp.kraus@flashpixx.de>
First post2015-03-10 12:50 +0100
Last post2015-03-10 22:52 -0400
Articles 8 — 2 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  JFXPanel with WebView JavaScript Philipp Kraus <philipp.kraus@flashpixx.de> - 2015-03-10 12:50 +0100
    Re: JFXPanel with WebView JavaScript Jeff Higgins <jeff@invalid.invalid> - 2015-03-10 09:28 -0400
      Re: JFXPanel with WebView JavaScript Philipp Kraus <philipp.kraus@flashpixx.de> - 2015-03-10 20:38 +0100
        Re: JFXPanel with WebView JavaScript Jeff Higgins <jeff@invalid.invalid> - 2015-03-10 19:33 -0400
          Re: JFXPanel with WebView JavaScript Jeff Higgins <jeff@invalid.invalid> - 2015-03-11 07:37 -0400
            Re: JFXPanel with WebView JavaScript Philipp Kraus <philipp.kraus@flashpixx.de> - 2015-03-12 09:45 +0100
    Re: JFXPanel with WebView JavaScript Jeff Higgins <jeff@invalid.invalid> - 2015-03-10 20:24 -0400
      Re: JFXPanel with WebView JavaScript Jeff Higgins <jeff@invalid.invalid> - 2015-03-10 22:52 -0400

#31303 — JFXPanel with WebView JavaScript

FromPhilipp Kraus <philipp.kraus@flashpixx.de>
Date2015-03-10 12:50 +0100
SubjectJFXPanel with WebView JavaScript
Message-ID<mdme52$2ti$1@ariadne.rz.tu-clausthal.de>

[Multipart message — attachments visible in raw view] — view raw

Hello,

I have created a small browser component within my project, that uses 
JFXPanel with WebView to show HTML file to the user.
This structure works well. So in my next task I would like to add 
dynamic items e.g. jQuery with jQuery-UI and chart plotting.
The charts should be visualize with tools like http://www.chartjs.org/

I would like to add / modify my data of the charts continously. The 
application create with a threadpool data and calls listen objects, 
which
calculate the data, these elements should be the data for 
visualization. I don't want to create a full HTTP server, so my 
question is, can
I change the data fields of my JavaScript components from Java side?

I would like to have this architecture:

thread pool -> runs task -> generates data -> data is stored <- convert 
o Json <- WebView <- Chart.JS

If the data store is updated also the Chart.JS should be updated. I 
need an idea to create this architecture in a standalone
application. WebView should create the visualization, but I don't know 
how I can create the data "connection" between the WebView
component and my data storage.

Phil

[toc] | [next] | [standalone]


#31304

FromJeff Higgins <jeff@invalid.invalid>
Date2015-03-10 09:28 -0400
Message-ID<mdmrgh$tqi$1@dont-email.me>
In reply to#31303
On 03/10/2015 07:50 AM, Philipp Kraus wrote:
> Hello,
>
>
> I have created a small browser component within my project, that uses
> JFXPanel with WebView to show HTML file to the user.
>
> This structure works well. So in my next task I would like to add
> dynamic items e.g. jQuery with jQuery-UI and chart plotting.
>
> The charts should be visualize with tools like http://www.chartjs.org/
>
>
> I would like to add / modify my data of the charts continously. The
> application create with a threadpool data and calls listen objects, which
>
> calculate the data, these elements should be the data for visualization.
> I don't want to create a full HTTP server, so my question is, can
>
> I change the data fields of my JavaScript components from Java side?
>
>
> I would like to have this architecture:
>
>
> thread pool -> runs task -> generates data -> data is stored <- convert
> o Json <- WebView <- Chart.JS
>
>
> If the data store is updated also the Chart.JS should be updated. I need
> an idea to create this architecture in a standalone
>
> application. WebView should create the visualization, but I don't know
> how I can create the data "connection" between the WebView
>
> component and my data storage.
>
>
Use Web Sockets if you can implement a simple server.
If not use Web Worker.

[toc] | [prev] | [next] | [standalone]


#31305

FromPhilipp Kraus <philipp.kraus@flashpixx.de>
Date2015-03-10 20:38 +0100
Message-ID<mdn9h0$8n2$1@ariadne.rz.tu-clausthal.de>
In reply to#31304
On 2015-03-10 13:28:06 +0000, Jeff Higgins said:

> On 03/10/2015 07:50 AM, Philipp Kraus wrote:
>> Hello,
>> 
>> 
>> I have created a small browser component within my project, that uses
>> JFXPanel with WebView to show HTML file to the user.
>> 
>> This structure works well. So in my next task I would like to add
>> dynamic items e.g. jQuery with jQuery-UI and chart plotting.
>> 
>> The charts should be visualize with tools like http://www.chartjs.org/
>> 
>> 
>> I would like to add / modify my data of the charts continously. The
>> application create with a threadpool data and calls listen objects, which
>> 
>> calculate the data, these elements should be the data for visualization.
>> I don't want to create a full HTTP server, so my question is, can
>> 
>> I change the data fields of my JavaScript components from Java side?
>> 
>> 
>> I would like to have this architecture:
>> 
>> 
>> thread pool -> runs task -> generates data -> data is stored <- convert
>> o Json <- WebView <- Chart.JS
>> 
>> 
>> If the data store is updated also the Chart.JS should be updated. I need
>> an idea to create this architecture in a standalone
>> 
>> application. WebView should create the visualization, but I don't know
>> how I can create the data "connection" between the WebView
>> 
>> component and my data storage.
>> 
>> 
> Use Web Sockets if you can implement a simple server.
> If not use Web Worker.

Yeah, that's great - I miss the forest for the trees
Did you know / send my a short example / link how I can use web sockets 
with the JavaFX WebView component (or the Web Worker)?

Thanks

Phil

[toc] | [prev] | [next] | [standalone]


#31307

FromJeff Higgins <jeff@invalid.invalid>
Date2015-03-10 19:33 -0400
Message-ID<mdnv07$mam$1@dont-email.me>
In reply to#31305
On 03/10/2015 03:38 PM, Philipp Kraus wrote:
> On 2015-03-10 13:28:06 +0000, Jeff Higgins said:
>
>> On 03/10/2015 07:50 AM, Philipp Kraus wrote:
>>> Hello,
>>>
>>>
>>> I have created a small browser component within my project, that uses
>>> JFXPanel with WebView to show HTML file to the user.
>>>
>>> This structure works well. So in my next task I would like to add
>>> dynamic items e.g. jQuery with jQuery-UI and chart plotting.
>>>
>>> The charts should be visualize with tools like http://www.chartjs.org/
>>>
>>>
>>> I would like to add / modify my data of the charts continously. The
>>> application create with a threadpool data and calls listen objects,
>>> which
>>>
>>> calculate the data, these elements should be the data for visualization.
>>> I don't want to create a full HTTP server, so my question is, can
>>>
>>> I change the data fields of my JavaScript components from Java side?
>>>
>>>
>>> I would like to have this architecture:
>>>
>>>
>>> thread pool -> runs task -> generates data -> data is stored <- convert
>>> o Json <- WebView <- Chart.JS
>>>
>>>
>>> If the data store is updated also the Chart.JS should be updated. I need
>>> an idea to create this architecture in a standalone
>>>
>>> application. WebView should create the visualization, but I don't know
>>> how I can create the data "connection" between the WebView
>>>
>>> component and my data storage.
>>>
>>>
>> Use Web Sockets if you can implement a simple server.
>> If not use Web Worker.
>
> Yeah, that's great - I miss the forest for the trees
> Did you know / send my a short example / link how I can use web sockets
> with the JavaFX WebView component (or the Web Worker)?
>
Not WebView, but you get the idea.
https://github.com/jewelsea/javafx-websocket-test
If you don't want/need JSR 356 API
https://github.com/TooTallNate/Java-WebSocket

[toc] | [prev] | [next] | [standalone]


#31310

FromJeff Higgins <jeff@invalid.invalid>
Date2015-03-11 07:37 -0400
Message-ID<mdp9e0$9re$1@dont-email.me>
In reply to#31307
Simpler, and with WebView
<https://github.com/tomoTaka01/EchoClientWebView
which points to his simple Server example
<https://github.com/tomoTaka01/WebSocketTest>

[toc] | [prev] | [next] | [standalone]


#31311

FromPhilipp Kraus <philipp.kraus@flashpixx.de>
Date2015-03-12 09:45 +0100
Message-ID<mdrbuv$2u0r$1@ariadne.rz.tu-clausthal.de>
In reply to#31310
On 2015-03-11 11:37:56 +0000, Jeff Higgins said:

> Simpler, and with WebView
> <https://github.com/tomoTaka01/EchoClientWebView
> which points to his simple Server example
> <https://github.com/tomoTaka01/WebSocketTest>

Great, thanks a lot.
I have build a short testing example with the Websockets

Phil

[toc] | [prev] | [next] | [standalone]


#31308

FromJeff Higgins <jeff@invalid.invalid>
Date2015-03-10 20:24 -0400
Message-ID<mdo1vc$uhi$1@dont-email.me>
In reply to#31303
On 03/10/2015 07:50 AM, Philipp Kraus wrote:
> Hello,
>
>
> I have created a small browser component within my project, that uses
> JFXPanel with WebView to show HTML file to the user.
>
> This structure works well. So in my next task I would like to add
> dynamic items e.g. jQuery with jQuery-UI and chart plotting.
>
> The charts should be visualize with tools like http://www.chartjs.org/
>
>
> I would like to add / modify my data of the charts continously. The
> application create with a threadpool data and calls listen objects, which
>
> calculate the data, these elements should be the data for visualization.
> I don't want to create a full HTTP server, so my question is, can
>
> I change the data fields of my JavaScript components from Java side?

https://docs.oracle.com/javafx/2/deployment/javafx_javascript.htm
https://gist.github.com/jewelsea/3077942

>
> I would like to have this architecture:
>
>
> thread pool -> runs task -> generates data -> data is stored <- convert
> o Json <- WebView <- Chart.JS
>
>
> If the data store is updated also the Chart.JS should be updated. I need
> an idea to create this architecture in a standalone
>
> application. WebView should create the visualization, but I don't know
> how I can create the data "connection" between the WebView
>
> component and my data storage.
>
>
> Phil
>

[toc] | [prev] | [next] | [standalone]


#31309

FromJeff Higgins <jeff@invalid.invalid>
Date2015-03-10 22:52 -0400
Message-ID<mdoal1$bmv$1@dont-email.me>
In reply to#31308
On 03/10/2015 08:24 PM, Jeff Higgins wrote:
so my question is, can
>>
>> I change the data fields of my JavaScript components from Java side?
>
> https://docs.oracle.com/javafx/2/deployment/javafx_javascript.htm
> https://gist.github.com/jewelsea/3077942
>
http://docs.oracle.com/javafx/2/webview/jfxpub-webview.htm#sthref12
http://docs.oracle.com/javafx/2/webview/jfxpub-webview.htm#sthref15

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web