Question #111043 on Gephi changed:
https://answers.launchpad.net/gephi/+question/111043

    Status: Open => Answered

Mathieu Bastian proposed the following answer:
Yes you should implement the Tool interface, as described here
(http://gephi.org/docs/api/org/gephi/tools/spi/Tool.html).

Your tool should provide the NodeClickEventListener and the
implementation of ToolUI to provide the text and icon for your tool.

It's easy to see this with an example, for instance the NodePencil Tool which 
creates a new Node.
http://bazaar.launchpad.net/~gephi.team/gephi/0.7/annotate/head:/ToolsPlugin/src/org/gephi/tools/plugin/NodePencil.java

The Node Pencil uses a MouseClickListener (to get the mouse position),
The Painter uses the listener you need
(http://bazaar.launchpad.net/~gephi.team/gephi/0.7/annotate/head:/ToolsPlugin/src/org/gephi/tools/plugin/Painter.java)

-- 
You received this question notification because you are a member of
Gephi Team, which is an answer contact for Gephi.

_______________________________________________
Mailing list: https://launchpad.net/~gephi.team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~gephi.team
More help   : https://help.launchpad.net/ListHelp

Répondre à