* @see #createEdgeTool(String, String, Edge.Routing)
*/
protected void addTools(JGraphEditor editor, JGraphEditorKit kit) {
kit.addTool(new JGraphEditorTool(NAME_SELECTTOOL, false));
JGraphpadVertexTool tool = createVertexTool(NAME_TEXTTOOL,
new JGraphpadRichTextValue(""), -1, null, true);
tool.setPreviewEnabled(false);
kit.addTool(tool);
kit.addTool(createVertexTool(NAME_VERTEXTOOL,
new JGraphpadRichTextValue(""),
JGraphpadVertexRenderer.SHAPE_RECTANGLE, null));
JComponent c = new JGraphpadHeavyweightRenderer();
kit.addTool(createVertexTool(NAME_HEAVYTOOL, c,
JGraphpadVertexRenderer.SHAPE_RECTANGLE, null));
kit.addTool(createVertexTool(NAME_ROUNDEDTOOL,
new JGraphpadRichTextValue(""),
JGraphpadVertexRenderer.SHAPE_ROUNDED, null));
kit.addTool(createVertexTool(NAME_CIRCLETOOL,
new JGraphpadRichTextValue(""),
JGraphpadVertexRenderer.SHAPE_CIRCLE, null));
kit.addTool(createVertexTool(NAME_DIAMONDTOOL,
new JGraphpadRichTextValue(""),
JGraphpadVertexRenderer.SHAPE_DIAMOND, null));
kit.addTool(createVertexTool(NAME_TRIANGLETOOL,
new JGraphpadRichTextValue(""),
JGraphpadVertexRenderer.SHAPE_TRIANGLE, null));
kit.addTool(createVertexTool(NAME_CYLINDERTOOL,
new JGraphpadRichTextValue(""),
JGraphpadVertexRenderer.SHAPE_CYLINDER, null));
JGraphpadImageIcon icon = new JGraphpadImageIcon(
"/com/jgraph/pad/images/noimage.gif");
kit.addTool(createVertexTool(NAME_IMAGETOOL, "",
JGraphpadVertexRenderer.SHAPE_RECTANGLE, icon));
kit.addTool(createEdgeTool(NAME_EDGETOOL, new JGraphpadRichTextValue(""), null));
kit.addTool(createEdgeTool(NAME_ORTHOGONALEDGETOOL, new JGraphpadRichTextValue(""),
GraphConstants.ROUTING_SIMPLE));
}