port JUNG into GWT [closed]

跟風遠走 提交于 2019-12-05 16:52:52

Of course you have to first check the licensing policy for JUNG. That might already limit out some options. IIRC, the licence is Apcahe 2.0.

As you mentioned, drawing you must re-implement. For that there a few options: GWTCanvas, GWT Graphics and g2d, and probably others that I forgot.

Also, to take full benefit of the GWT approach must not rely on too many external projects, which makes a bit harder.

Based on all these, I would go for using only some of the classes and porting them to GWT one by one. Maybe starting from the graph layout algorithms.

sys13

Check out this similar question.

It would be very nice to have a GWT presentation layer for JUNG. The approach we've been taking is to use RaphaelGWT (wrapper for RaphaelJS) for drawing and JUNG for layout on the server side. We tried to port JUNG to the client side (where everything is translated into Javascript) but reliance on concurrent libraries and parts of the JRE made this unfeasible.

On the server side we grab the data and create our own graph object (GEGraph) with Node and Connection maps. Then we put all that into a JUNG graph and call layout on it, retrieving the x and y coordinates for each node and putting that in the GEGraph. The GEGraph is then sent to the client and drawn with Raphael.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!