protected JGraphpadVertexTool createVertexTool(String name, Object defaultValue,
int shape, ImageIcon icon, boolean postEdit) {
JGraphpadVertexTool vertextTool = null;
Object userObject = createVertexUserObject(defaultValue);
GraphCell vertex = createVertex(userObject);
if (shape >= 0) {
JGraphpadGraphConstants.setVertexShape(vertex.getAttributes(),
shape);
} else {
vertex.getAttributes().remove(GraphConstants.BORDERCOLOR);
vertex.getAttributes().remove(GraphConstants.BORDER);
}
if (icon != null) {
GraphConstants.setIcon(vertex.getAttributes(), icon);
}
if (postEdit) {
vertextTool = new JGraphpadVertexTool(name, vertex) {
protected void execute(JGraph graph, Object cell) {
super.execute(graph, cell);