Diagram plugin example/API Follow
Hi All,
I'm a new IntelliJ developer, trying to implement a visual plugin. Basically I would like to create a drawing plugin (a diagram), supporting add/remove, scale and move figures.
Does IntelliJ offer an API to do it? is there a tutorial or example explaning how to draw diagrams inside plugins?
Thanks,
Andre
Please sign in to leave a comment.
Hi, Andre.
Idea has new open api for graph/diagrams developers... there are default
scale/move/layout/... actions.
To use it you have to:
1. implement com.intellij.openapi.graph.builder.GraphDataModel interface
(and if you want customize presentation -
com.intellij.openapi.graph.builder.GraphPresentationModel)
2. create GraphBuilder: GraphBuilderFactory.getInstance(project).createGraphBuilder();
3. now you can get graph environment(JComponent): builder.getView() (see
also BasicGraphComponent class - it's graph view + default toolbar)
in addition you can find struts diagram example in Struts plugin (com.intellij.struts.diagram
package)
Serega.
Thanks Sergey!
I'll try follow these steps.
Where can I find Struts plugin source code?
Andre
Hello Andre,
A> I'll try follow these steps.
A>
A> Where can I find Struts plugin source code?
In the Plugin Development Package which you can download from http://www.intellij.net/eap/
(Note that all graph API is only supported in IntelliJ IDEA 6.0.)
--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"
Thanks Dmitry!