Hello Olof

There are at least three ways to do this:

1) Create an html file, or rather an html template containing only the 
necessary <object> code to load the freemind flash viewer. One of the 
template variables will be the mindmap file you want to show in the 
viewer. When you want to display the mindmap, "render" the HTML template 
to a file and start a browser with a system call. In other words, the 
template will serve as the HTML file skeleton so you don't have to write 
the same thing again and again, with the one variable pointing to the 
file you want to load. To make it easier for the user, further execution 
of your program can be blocked until the user closes the browser window. 
Also, you could have some minimal control over where the browser will 
open. This is probably the easiest option.

2) Use a Java GUI component that provides support for rendering HTML 
(including the <object> tag) and create an html page that embeds the 
flash freemind viewer and renders it on a panel. For example:
http://download.oracle.com/javase/1.4.2/docs/api/javax/swing/text/html/HTMLEditorKit.html

3) For total control you could try embedding the freemind viewer itself 
from its source code. The code is available at:
http://sourceforge.net/projects/freemind/files/
the viewer class is in:
freemind-src-0.9.0_RC_9.tar\freemind\freemind\view\mindmapview\MapView.java

It seems to be extending a JPanel but you will also need the classes 
that implement the parsing of the mind map prior to rendering it. Or you 
could add Freemind to your class path and have a look at their wiki, i 
think there was a page about this there but i don't seem to be able to 
find it now.

I hope this helps.

All the best
Athanasios Anastasiou






On 16/10/2010 08:50, Olof Torgersson wrote:
> Hi,
>
> What I?m interested in is to put a Java mindmap viewer into a panel of
> an application.
>
> That is I'm not interested in the Freemind application, but rather if
> it's possible to integrate its mindmaps into another application,
> much in the same way as the CKM does.
>
> I've taken a brief look at Freemind but didn't find anything about how
> this could be done.
>
> Does anyone know if it can be done (well since the source is available
> it can be done, but some hints on how would make it easier)?
>
> regards
>
> Olof
>
> 15 okt 2010 kl. 21.32 skrev Diego Bosc?:
>
>> Yeah, freemind XML is quite easy. I created a first version of a ADL
>> (CEN EN13606) to freemind converter in less than one day.
>> In my opinion the big drawback Freemind has at this moment is that it
>> doesn't display UTF-8 labels correctly (well, flash view does, but not
>> freemind program itself)
>>
>> 2010/10/15 Sebastian Garde <sebastian.garde at oceaninformatics.com
>> <mailto:sebastian.garde at oceaninformatics.com>>
>>
>>     That's right, but the Freemind Flash browser is the reason why it
>>     is used in CKM -
>>     happy to be proven wrong, but to my knowledge xmind (or any other
>>     free mindmapping tool except freemind) does not offer anything that
>>     a) can be used to integrate a mindmap into a website including
>>     node collapsing and expanding capabilitites, etc. and
>>     b) allows programmatic creation of the mindmap on the fly based on
>>     ADL (Freemind uses a fairly simple xml structure)
>>
>>     Sebastian
>>
>>
>>     On 15.10.2010 17:12, Ian McNicoll wrote:
>>>     Freemind is indeed used in CKM to draw the mindmaps. It is now showing
>>>     its age a little and I understand there have been moves for the
>>>     Freemind project to be folded in to Xmind (www.xmind.net  
>>> <http://www.xmind.net/>) which is a
>>>     free, open-source java-based mindmap editor. Xmind is much more
>>>     capable and competitive with commercial offerings such as Mindmanager
>>>     but would need some work to 'componentise' as I understand things.
>>>     Heather Leslie and I make extensive use of Xmind in designing
>>>     archetypes and templates.
>>>
>>>     Ian
>>>
>>>     Dr Ian McNicoll
>>>     office / fax    +44(0)1536 414994
>>>     mobile +44 (0)775 209 7859
>>>     skype ianmcnicoll
>>>     ian.mcnicoll at oceaninformatics.com  <mailto:ian.mcnicoll at 
>>> oceaninformatics.com>
>>>
>>>
>>>     Clinical analyst,  Ocean Informatics
>>>     openEHR Clinical Knowledge Editorwww.openehr.org/knowledge  
>>> <http://www.openehr.org/knowledge>
>>>     Honorary Senior Research Associate, CHIME, UCL
>>>     BCS Primary Health Care SG Groupwww.phcsg.org  <http://www.phcsg.org/>
>>>
>>>
>>>
>>>
>>>     On 15 October 2010 15:51, Athanasios Anastasiou
>>>     <athanasios.anastasiou at plymouth.ac.uk>  
>>> <mailto:athanasios.anastasiou at plymouth.ac.uk>  wrote:
>>>>     Hello Olof
>>>>
>>>>     The openEHR Clinical Knowledge Manager does use the Freemind browser 
>>>> for
>>>>     the visualisation of the archetypes.
>>>>
>>>>     There are Flash:
>>>>     http://freemind.sourceforge.net/wiki/index.php/Flash_browser
>>>>
>>>>     ...and Java Applet versions:
>>>>     http://freemind.sourceforge.net/wiki/index.php/Applet
>>>>
>>>>     All the best
>>>>     Athanasios Anastasiou
>>>>
>>>>
>>>>
>>>>
>>>>     On 15/10/2010 15:32, demski wrote:
>>>>>     Hi Olof,
>>>>>
>>>>>     FreeMind is a good choice if you want to work with mindmaps! It is
>>>>>     platform independent (JAVA software).
>>>>>
>>>>>     Seehttp://sourceforge.net/projects/freemind/
>>>>>
>>>>>     brgds
>>>>>     Hans
>>>>>
>>>>>     Am 15.10.2010 15:56, schrieb Olof Torgersson:
>>>>>>     Hi,
>>>>>>
>>>>>>     Does anybody have a recommendation for a Java software package for 
>>>>>> drawing the kind of mindmaps
>>>>>>     that are often seen in openEHR contexts like for instance the 
>>>>>> openEHR Clinical Knowledge Manager?
>>>>>>
>>>>>>     regards
>>>>>>
>>>>>>     Olof Torgersson
>>>>>>
>>>>>>     ---
>>>>>>     Olof Torgersson
>>>>>>
>>>>>>     Associate Professor
>>>>>>     Department of Computer Science and Engineering
>>>>>>     Chalmers University of Technology and G?teborg University
>>>>>>     SE-412 96 G?teborg, Sweden
>>>>>>
>>>>>>     email:olof.torgersson at chalmers.se  <mailto:email:olof.torgersson 
>>>>>> at chalmers.se>
>>>>>>     phone:+46 31 772 54 06
>>>>>>
>>>>>>
>>>>>>     _______________________________________________
>>>>>>     openEHR-technical mailing list
>>>>>>     openEHR-technical at openehr.org  <mailto:openEHR-technical at 
>>>>>> openehr.org>
>>>>>>     http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical
>>>>>>
>>>>>>
>>>>>     --
>>>>>
>>>>>     Hans Demski
>>>>>
>>>>>     Institut f?r Biologische und Medizinische Bildgebung - MEDIS
>>>>>     Tel.: 089-3187-4179
>>>>>
>>>>>     *Helmholtz Zentrum M?nchen
>>>>>     Deutsches Forschungszentrum f?r Gesundheit und Umwelt (GmbH)*
>>>>>     Ingolst?dter Landstr. 1
>>>>>     85764 Neuherberg
>>>>>     _www.helmholtz-muenchen.de  <http://www.helmholtz-muenchen.de/>  
>>>>> <http://www.helmholtz-muenchen.de/>_
>>>>>     Aufsichtsratsvorsitzende: MinDir?in B?rbel Brumme-Bothe
>>>>>     Gesch?ftsf?hrer: Prof. Dr. G?nther Wess und Dr. Nikolaus Blum
>>>>>     Registergericht: Amtsgericht M?nchen HRB 6466
>>
>>
>>     _______________________________________________
>>     openEHR-technical mailing list
>>     openEHR-technical at openehr.org <mailto:openEHR-technical at 
>> openehr.org>
>>     http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical
>>
>>
>> <ATT00001..txt>
>
> ---
> Olof Torgersson
>
> Associate Professor
> Department of Computer Science and Engineering
> Chalmers University of Technology and G?teborg University
> SE-412 96 G?teborg, Sweden
>
> email: olof.torgersson at chalmers.se <mailto:olof.torgersson at chalmers.se>
> phone: +46 31 772 54 06
>

Reply via email to