views:

208

answers:

3

I'm sure many will know of Simile Timeline (http://www.simile-widgets.org/timeline/), the JavaScript-based widget for embedding interactive timelines into web sites.

Timeline is open source software and is licensed under the BSD license.

How would I go about using Similie Timeline in a Java desktop application that has no Internet access?

A: 

Rhino is JS interpreter and related tools for the JVM managed by the Mozilla project. I suspect it would be a good place to start.

Jim Blizard
+1  A: 

You should just be able to include some sort of 'web browser' control, and then write the relevant html/javascript into it, do get it to render appropriately. Long time no Java, so I can't think of the name of the in-built one, but I suspect one exists.

-- Edit

Actually, it seems that the in-built control I am thinking of (JEditorPane) doesn't support JavaScript. Perhaps this will be interesting : http://lobobrowser.org/java-browser.jsp, but I'm not sure I'd go with the embedded approach, after all.

Noon Silk
Bouncing off your idea, I found this older thread about embedding browsers in Java: http://stackoverflow.com/questions/48249/java-embedding-a-web-browser-pane
David
A: 

So What's up with this thread? I am desperately trying to embed the Simile Timeline into a Java Swing application. I'Ve successfully been able to embed a web browser and display a timeline... But I'm not able to catch the events on the click of an item. I am also not able to feed items to it. Anyone got an idea?

lanoue