[gephi-dev] Many workspaces and many GraphListener
Mathieu Bastian
mathieu.bastian at gmail.com
Sun May 8 01:32:27 CEST 2011
Hi Amedeo,
I'm sorry I read your message several times but I don't get the problem.
Maybe you made some progress? Could you rephrase it I'm trying to understand
what you are doing...
Mathieu
On Wed, Apr 27, 2011 at 3:31 AM, Amedeo Laudisio <aeeadi at gmail.com> wrote:
>
> Hi, i am developing an application using the Gephi Toolkit, i have many
> workspaces, that are updated (using the gephi streaming modules).
> I have created a class "GraphListener" that have a list to remember the new
>
> nodes and edges of the workspaces which are registered.
> I register the Listener at the correct workspace using this method:
>
> public void addGraphListener(String name){
> GraphModel g =
>
> Lookup.getDefault().lookup(GraphController.class).getModel(workspaces.get(name));
> GraphModel g =
> workspaces.get(name).getLookup().lookup(GraphModel.class); //ritorna
> null....
> g.addGraphListener(WebGraphListener.getIstance(name));
> }
>
> Obviously "workspaces" is a hashtable that contain all the workspace of my
> application.
> The class "WebGraphListener" (that implements the interface
> "GraphListener")
> contains a similar hashtable; i can obtain the istance of the listener that
>
> match to this workspace using the method "getIstance".
> However, after the execution of this method when i update the graph is not
> executed no one listener, and the list of new node and edges remains
> empty..
>
> I tested that the method "getIstance" work, and i tested that the class
> "WebGraphListener" work if is registered simply with:
>
> GraphModel g =
> Lookup.getDefault().lookup(GraphController.class).getModel();
> g.addGraphListener(new WebGraphListener());
>
> But in this way the listener is not associated to the correct workspace (it
> is
> associated to the current workspace)
>
> Someone can help me to understand where i wrong?
>
> Thanks a lot!
>
> _______________________________________________
> gephi-dev mailing list
> gephi-dev at lists.gephi.org
> http://gephi.org/mailman/listinfo/gephi-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gephi.org/pipermail/gephi-dev/attachments/20110507/fbc5012c/attachment.html>
More information about the gephi-dev
mailing list