JUNG Port in GWT

there is a very good java jung graphic display library

I wonder if there is any GWT library that does what JUNG does? I know that there is a commercial javascript graphic library mxGraph . But mxGraph is very expensive and has a very restrictive licensing policy.

Does anyone know of any GWT graphics library like mxGraph (JS) or JUNG (java)?

if there is no GWT library for graphical display like JUNG, I am fond of porting JUNG to GWT. I thought to use the gwt-graphics library as a basis and extend it with other JUNG functions. What is a good strategy for porting a JUNG to a GWT? Should I rewrite most JUNG java classes in GWT client classes? was there a way to wrap JUNG classes inside some client side GWT classes? I think b / c JUNG uses the java swing framework, for porting you will need to transfer most of the UI JUNG classes (based on swing) to GWT based widgets.

Any ideas or suggestions on this?

Best.

+4
source share
2 answers

Of course, you must first check the licensing policy for JUNG. This may already limit some options. IIRC, licensed by Apcahe 2.0.

As you mentioned, you have to re-implement. There are several options for this: GWTCanvas , GWT and g2d graphics, and possibly others that I forgot about.

In addition, in order to fully utilize the GWT approach, one should not rely on too many external projects, which complicates the work a little.

Based on all this, I would like to use only some of the classes and port them to GWT one by one. Perhaps starting with graph layout algorithms.

+3
source

Take a look at this similar question .

It would be nice to have a GWT presentation layer for the JUNG. The approach we used is to use RaphaelGWT (wrapper for RaphaelJS ) for drawing and JUNG for server-side layout. We tried to pass the JUNG to the client side (where everything is translated into Javascript), but using parallel libraries and parts of the JRE made this impossible.

On the server side, we take the data and create our own graph object (GEGraph) with Node and connection maps. Then we put all this into the JUNG chart and point the layout at it, extract the x and y coordinates for each Node and put it in the GEGraph. Then the GEGraph is sent to the client and drawn with Raphael.

+3
source

Source: https://habr.com/ru/post/1343386/


All Articles